diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-10 10:14:13 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-10 10:14:13 +0000 |
commit | b12fcec3213fdaa1a56edf550f994ec349140588 (patch) | |
tree | 8afc849e858fd04167e578c92c2ae02f1da24f69 /ext/tk/lib/tk/palette.rb | |
parent | 1898e91c9d51bfa5d88a3e0000cb842c59ae8798 (diff) |
* ext/tcltklib/tcltklib.c (lib_eventloop_ensure): mis-delete a timer
handler when exit from a recursive called eventloop
* ext/tk/lib/tk/timer.rb: new TkRTTimer class, which can works for a
realtime operation
* ext/tk/sample/tkrttimer.rb: sample of TkRTTimer class
* ext/tk/lib/tk/textmark.rb: move TkTextMark#+ and TkTextMark#- to
TkText::IndexModMethods
* ext/tk/lib/tk/text.rb: improve TkTextMark#+ and TkTextMark#-, and
add them to TkText::IndexModMethods module
* ext/tk/sample/tktextio.rb: add test part of "seek by text index
modifiers"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/palette.rb')
-rw-r--r-- | ext/tk/lib/tk/palette.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/lib/tk/palette.rb b/ext/tk/lib/tk/palette.rb index dfe46940f3..f419822e4c 100644 --- a/ext/tk/lib/tk/palette.rb +++ b/ext/tk/lib/tk/palette.rb @@ -30,22 +30,22 @@ module TkPalette tk_call('tkDarken', color, percent) end - def TkPalette.recolorTree(window, colors) + def TkPalette.recolorTree(win, colors) if not colors.kind_of?(Hash) fail "2nd arg need to be Hash" end colors.each{|key, value| begin - if window.cget(key) == tk_call('set', "tkPalette(#{key})") - window[key] = colors[key] + if win.cget(key) == tk_call('set', "tkPalette(#{key})") + win[key] = colors[key] end rescue # ignore end } - TkWinfo.children(window).each{|w| TkPalette.recolorTree(w, colors)} + TkWinfo.children(win).each{|w| TkPalette.recolorTree(w, colors)} end def recolorTree(colors) |