mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
* ext/tk/lib/tk.rb, ext/tk/lib/tk/scrollbar.rb, ext/tk/lib/tk/scale.rb:
improve unknonw-option check when create a widget. * ext/tk/lib/tkextlib/blt/unix_dnd.rb, ext/tk/lib/tkextlib/blt/ted.rb, ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix on 'cget'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fefd85d9ef
commit
40e7794993
8 changed files with 49 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
|||
Fri Apr 18 07:56:18 2008 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk.rb, ext/tk/lib/tk/scrollbar.rb, ext/tk/lib/tk/scale.rb:
|
||||
improve unknonw-option check when create a widget.
|
||||
|
||||
* ext/tk/lib/tkextlib/blt/unix_dnd.rb, ext/tk/lib/tkextlib/blt/ted.rb,
|
||||
ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: bug fix on 'cget'.
|
||||
|
||||
Thu Apr 17 22:03:52 2008 akira yamada <akira@arika.org>
|
||||
|
||||
* lib/uri/ftp.rb, lib/uri/generic.rb, test/uri/test_common.rb,
|
||||
|
|
|
@ -4799,11 +4799,18 @@ class TkWindow<TkObject
|
|||
tk_call_without_enc(cmd, @path)
|
||||
keys = __check_available_configure_options(keys)
|
||||
unless keys.empty?
|
||||
begin
|
||||
tk_call_without_enc('destroy', @path)
|
||||
rescue
|
||||
# cannot destroy
|
||||
configure(keys)
|
||||
else
|
||||
# re-create widget
|
||||
tk_call_without_enc(cmd, @path, *hash_kv(keys, true))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
tk_call_without_enc(cmd, @path)
|
||||
end
|
||||
|
@ -5341,7 +5348,7 @@ TkWidget = TkWindow
|
|||
#Tk.freeze
|
||||
|
||||
module Tk
|
||||
RELEASE_DATE = '2008-04-15'.freeze
|
||||
RELEASE_DATE = '2008-04-18'.freeze
|
||||
|
||||
autoload :AUTO_PATH, 'tk/variable'
|
||||
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
||||
|
|
|
@ -26,12 +26,19 @@ class Tk::Scale<TkWindow
|
|||
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||
keys = __check_available_configure_options(keys)
|
||||
unless keys.empty?
|
||||
begin
|
||||
tk_call_without_enc('destroy', @path)
|
||||
rescue
|
||||
# cannot destroy
|
||||
configure(keys)
|
||||
else
|
||||
# re-create widget
|
||||
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||
*hash_kv(keys, true))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
#tk_call_without_enc('scale', @path)
|
||||
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||
|
|
|
@ -31,12 +31,19 @@ class Tk::Scrollbar<TkWindow
|
|||
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||
keys = __check_available_configure_options(keys)
|
||||
unless keys.empty?
|
||||
begin
|
||||
tk_call_without_enc('destroy', @path)
|
||||
rescue
|
||||
# cannot destroy
|
||||
configure(keys)
|
||||
else
|
||||
# re-create widget
|
||||
tk_call_without_enc(self.class::TkCommandNames[0], @path,
|
||||
*hash_kv(keys, true))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
#tk_call_without_enc('scrollbar', @path)
|
||||
tk_call_without_enc(self.class::TkCommandNames[0], @path)
|
||||
|
|
|
@ -34,7 +34,7 @@ module Tk::BLT
|
|||
private :itemconfiginfo, :current_itemconfiginfo
|
||||
|
||||
def cget(master, option)
|
||||
itemconfigure(master, slot, value)
|
||||
itemcget(master, option)
|
||||
end
|
||||
def configure(master, slot, value=None)
|
||||
itemconfigure(master, slot, value)
|
||||
|
|
|
@ -34,7 +34,7 @@ module Tk::BLT
|
|||
private :itemconfiginfo, :current_itemconfiginfo
|
||||
|
||||
def cget(win, option)
|
||||
itemconfigure(['cget', win], slot, value)
|
||||
itemcget(['cget', win], option)
|
||||
end
|
||||
def configure(win, slot, value=None)
|
||||
itemconfigure(['configure', win], slot, value)
|
||||
|
@ -46,8 +46,8 @@ module Tk::BLT
|
|||
current_itemconfiginfo(['configure', win], slot)
|
||||
end
|
||||
|
||||
def tokwn_cget(win, option)
|
||||
itemconfigure(['token', 'cget', win], slot, value)
|
||||
def token_cget(win, option)
|
||||
itemcget(['token', 'cget', win], option)
|
||||
end
|
||||
def token_configure(win, slot, value=None)
|
||||
itemconfigure(['token', 'configure', win], slot, value)
|
||||
|
|
|
@ -518,7 +518,8 @@ module Tk::TreeCtrl::ConfigMethod
|
|||
|
||||
def notify_cget(win, pattern, option)
|
||||
pattern = "<#{pattern}>"
|
||||
itemconfigure(['notify', [win, pattern]], option)
|
||||
# "notify" doesn't have cget subcommand.
|
||||
current_itemconfiginfo(['notify', [win, pattern]])[option.to_s]
|
||||
end
|
||||
def notify_configure(win, pattern, slot, value=None)
|
||||
pattern = "<#{pattern}>"
|
||||
|
@ -528,7 +529,10 @@ module Tk::TreeCtrl::ConfigMethod
|
|||
pattern = "<#{pattern}>"
|
||||
itemconfiginfo(['notify', [win, pattern]], slot)
|
||||
end
|
||||
alias current_notify_configinfo notify_configinfo
|
||||
def current_notify_configinfo(tagOrId, slot=nil)
|
||||
pattern = "<#{pattern}>"
|
||||
current_itemconfiginfo(['notify', [win, pattern]], slot)
|
||||
end
|
||||
|
||||
def style_cget(tagOrId, option)
|
||||
itemcget(['style', tagOrId], option)
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
# release date of tkextlib
|
||||
#
|
||||
module Tk
|
||||
Tkextlib_RELEASE_DATE = '2008-04-14'.freeze
|
||||
Tkextlib_RELEASE_DATE = '2008-04-18'.freeze
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue