From 65e7ebb14fde52fee2cd08f38f467adbd4fe6e25 Mon Sep 17 00:00:00 2001 From: nagai Date: Mon, 23 Jun 2003 14:22:44 +0000 Subject: [PATCH] tk.rb : * TkRoot and TkToplevel : bug fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index f1226ba10f..dabc78753c 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -1174,8 +1174,8 @@ module Tk procedure(tk_call('wm', 'command', path)) end end - def deiconify - tk_call 'wm', 'deiconify', path + def deiconify(ex = true) + tk_call('wm', 'deiconify', path) if ex self end def focusmodel(mode = nil) @@ -1221,8 +1221,8 @@ module Tk tk_call 'wm', 'iconbitmap', path end end - def iconify - tk_call 'wm', 'iconify', path + def iconify(ex = true) + tk_call('wm', 'iconify', path) if ex self end def iconmask(bmp=nil) @@ -1351,8 +1351,8 @@ module Tk window(tk_call('wm', 'transient', path, master)) end end - def withdraw - tk_call 'wm', 'withdraw', path + def withdraw(ex = true) + tk_call('wm', 'withdraw', path) if ex self end end @@ -3544,7 +3544,15 @@ class TkRoottrue, :widgetname=>'.') - keys.each{|k,v| new.send(k,v)} if keys # wm commands + if keys # wm commands + keys.each{|k,v| + if v.kind_of? Array + new.send(k,*v) + else + new.send(k,v) + end + } + end ROOT[0] = new Tk_WINDOWS["."] = new end @@ -3599,6 +3607,7 @@ class TkToplevel