mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
* backport changes from 1.9
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6a194f195c
commit
ea37276b9a
3 changed files with 78 additions and 14 deletions
|
@ -4830,16 +4830,18 @@ class TkPanedWindow<TkWindow
|
|||
fail ArgumentError, "no window in arguments" unless keys
|
||||
if keys && keys.kind_of?(Hash)
|
||||
fail ArgumentError, "no window in arguments" if args == []
|
||||
args += hash_kv(keys)
|
||||
args = args.collect{|w| w.epath}
|
||||
args.push(hash_kv(keys))
|
||||
else
|
||||
args.push(keys) if keys
|
||||
args = args.collect{|w| w.epath}
|
||||
end
|
||||
tk_send('add', *args)
|
||||
self
|
||||
end
|
||||
|
||||
def forget(win, *wins)
|
||||
tk_send('forget', win, *wins)
|
||||
tk_send('forget', win.epath, *(wins.collect{|w| w.epath}))
|
||||
self
|
||||
end
|
||||
alias del forget
|
||||
|
@ -4879,14 +4881,14 @@ class TkPanedWindow<TkWindow
|
|||
end
|
||||
|
||||
def panecget(win, key)
|
||||
tk_tcl2ruby(tk_send('panecget', win, "-#{key}"))
|
||||
tk_tcl2ruby(tk_send('panecget', win.epath, "-#{key}"))
|
||||
end
|
||||
|
||||
def paneconfigure(win, key, value=nil)
|
||||
if key.kind_of? Hash
|
||||
tk_send('paneconfigure', win, *hash_kv(key))
|
||||
tk_send('paneconfigure', win.epath, *hash_kv(key))
|
||||
else
|
||||
tk_send('paneconfigure', win, "-#{key}", value)
|
||||
tk_send('paneconfigure', win.epath, "-#{key}", value)
|
||||
end
|
||||
self
|
||||
end
|
||||
|
@ -4894,11 +4896,12 @@ class TkPanedWindow<TkWindow
|
|||
|
||||
def paneconfiginfo(win, key=nil)
|
||||
if key
|
||||
conf = tk_split_list(tk_send('paneconfigure', win, "-#{key}"))
|
||||
conf = tk_split_list(tk_send('paneconfigure', win.epath, "-#{key}"))
|
||||
conf[0] = conf[0][1..-1]
|
||||
conf
|
||||
else
|
||||
tk_split_simplelist(tk_send('paneconfigure', win)).collect{|conflist|
|
||||
tk_split_simplelist(tk_send('paneconfigure',
|
||||
win.epath)).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
conf[0] = conf[0][1..-1]
|
||||
if conf[3]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue