diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 05:10:59 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 05:10:59 +0000 |
commit | 5cd1282f21ad79859230978ac4eaf73f0853b0b4 (patch) | |
tree | e6f4b38b78fe4b020a366a2659ea8a0f2a885431 /ext/tk/lib/tk/panedwindow.rb | |
parent | 9a6c901fc431c58c0c607483ca2b41a20ceb4a4d (diff) |
* ext/tk/lib/multi-tk.rb: supports new features of Tcl/Tk8.5a2
* ext/tk/lib/tk/clock.rb: ditto
* ext/tk/lib/tk/text.rb: ditto
* ext/tk/lib/tk/panedwindow.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/panedwindow.rb')
-rw-r--r-- | ext/tk/lib/tk/panedwindow.rb | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/ext/tk/lib/tk/panedwindow.rb b/ext/tk/lib/tk/panedwindow.rb index 37be77508f..4932478ba0 100644 --- a/ext/tk/lib/tk/panedwindow.rb +++ b/ext/tk/lib/tk/panedwindow.rb @@ -110,6 +110,10 @@ class TkPanedWindow<TkWindow conf = tk_split_list(tk_send_without_enc('paneconfigure', win, "-#{key}")) conf[0] = conf[0][1..-1] + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + conf[4] = bool(conf[4]) unless conf[4].empty? + end conf else tk_split_simplelist(tk_send_without_enc('paneconfigure', @@ -117,14 +121,18 @@ class TkPanedWindow<TkWindow conf = tk_split_simplelist(conflist) conf[0] = conf[0][1..-1] if conf[3] - if conf[3].index('{') + if conf[0] == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') conf[3] = tk_split_list(conf[3]) else conf[3] = tk_tcl2ruby(conf[3]) end end if conf[4] - if conf[4].index('{') + if conf[0] == 'hide' + conf[4] = bool(conf[4]) unless conf[4].empty? + elsif conf[4].index('{') conf[4] = tk_split_list(conf[4]) else conf[4] = tk_tcl2ruby(conf[4]) @@ -141,6 +149,10 @@ class TkPanedWindow<TkWindow conf = tk_split_list(tk_send_without_enc('paneconfigure', win, "-#{key}")) key = conf.shift[1..-1] + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + conf[3] = bool(conf[3]) unless conf[3].empty? + end { key => conf } else ret = {} @@ -149,14 +161,18 @@ class TkPanedWindow<TkWindow conf = tk_split_simplelist(conflist) key = conf.shift[1..-1] if key - if conf[2].index('{') + if key == 'hide' + conf[2] = bool(conf[2]) unless conf[2].empty? + elsif conf[2].index('{') conf[2] = tk_split_list(conf[2]) else conf[2] = tk_tcl2ruby(conf[2]) end end if conf[3] - if conf[3].index('{') + if key == 'hide' + conf[3] = bool(conf[3]) unless conf[3].empty? + elsif conf[3].index('{') conf[3] = tk_split_list(conf[3]) else conf[3] = tk_tcl2ruby(conf[3]) |