diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-09 06:16:29 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-09 06:16:29 +0000 |
commit | adde1e913d960dff1cfdc54b51a7a40322faddc9 (patch) | |
tree | a11ae6ff53618056ef3d4945f2b022a7d099946e /ext/tk/lib/tkextlib/iwidgets | |
parent | 28f60a006d1b9025143758e9e391264f6a7f2747 (diff) | |
download | ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.tar.gz ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.tar.xz ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.zip |
* ext/tk/tcltklib.c: remove dangerous 'rb_jump_tag's.
* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to
help to convert option values between ruby and tcl.
* ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
__item_ruby2val_optkeys to help to convert option values between
ruby and tcl.
* ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
option (for the reason of backward compatibility).
* ext/tk/lib/tk/composite.rb: clarify the arguments of super().
* ext/tk/lib/tk/spinbox.rb: ditto.
* ext/tk/lib/tk/text.rb: ditto.
* ext/tk/lib/tk/validation.rb: ditto.
* ext/tk/lib/tkextlib/*: support to treat tkvariable-type
configure options.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets')
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/calendar.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/entryfield.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/hierarchy.rb | 8 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/labeledframe.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/menubar.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/spinner.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/iwidgets/toolbar.rb | 5 |
9 files changed, 32 insertions, 7 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/calendar.rb b/ext/tk/lib/tkextlib/iwidgets/calendar.rb index f382cfd14..97688bb7d 100644 --- a/ext/tk/lib/tkextlib/iwidgets/calendar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/calendar.rb @@ -45,7 +45,7 @@ class Tk::Iwidgets::Calendar end def __validation_class_list - super << CalendarCommand + super() << CalendarCommand end Tk::ValidateConfigure.__def_validcmd(binding, CalendarCommand) diff --git a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb b/ext/tk/lib/tkextlib/iwidgets/entryfield.rb index ae7d63f3f..7a54b7c80 100644 --- a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb +++ b/ext/tk/lib/tkextlib/iwidgets/entryfield.rb @@ -46,7 +46,7 @@ class Tk::Iwidgets::Entryfield end def __validation_class_list - super << EntryfieldValidate + super() << EntryfieldValidate end Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate) diff --git a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb b/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb index 077d84c7a..862876ee9 100644 --- a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb +++ b/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb @@ -92,7 +92,7 @@ class Tk::Iwidgets::Hierarchy end def __validation_class_list - super << QueryCommand << IndicatorCommand << IconCommand + super() << QueryCommand << IndicatorCommand << IconCommand end Tk::ValidateConfigure.__def_validcmd(binding, QueryCommand) @@ -237,13 +237,13 @@ class Tk::Iwidgets::Hierarchy args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ') # taglist args << tags.shift if tags.size > 0 # chars end - super index, *args + super(index, *args) else # single chars-taglist argument :: str, tag, tag, ... if tags.size == 0 - super index, chars + super(index, chars) else - super index, chars, tags.collect{|x|_get_eval_string(x)}.join(' ') + super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' ')) end end end diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb b/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb index 89669ea81..363047018 100644 --- a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb +++ b/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb @@ -18,6 +18,11 @@ class Tk::Iwidgets::Labeledframe WidgetClassName = 'Labeledframe'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'labelvariable' + end + private :__tkvariable_optkeys + def child_site window(tk_call(@path, 'childsite')) end diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb b/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb index f84792238..cbd5fa095 100644 --- a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb +++ b/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb @@ -20,6 +20,11 @@ class Tk::Iwidgets::Labeledwidget WidgetClassName = 'Labeledwidget'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'labelvariable' + end + private :__tkvariable_optkeys + def self.alignlabels(*wins) tk_call('::iwidgets::Labeledwidget::alignlabels', *wins) end diff --git a/ext/tk/lib/tkextlib/iwidgets/menubar.rb b/ext/tk/lib/tkextlib/iwidgets/menubar.rb index b60349be1..ba4bb5f40 100644 --- a/ext/tk/lib/tkextlib/iwidgets/menubar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/menubar.rb @@ -18,6 +18,11 @@ class Tk::Iwidgets::Menubar WidgetClassName = 'Menubar'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvariable' + end + private :__tkvariable_optkeys + #################################### include TkItemConfigMethod diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb index a60059f74..c933bf298 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb @@ -19,6 +19,11 @@ class Tk::Iwidgets::Scrolledlistbox WidgetClassName = 'Scrolledlistbox'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'listvariable' + end + private :__tkvariable_optkeys + ################################ def initialize(*args) diff --git a/ext/tk/lib/tkextlib/iwidgets/spinner.rb b/ext/tk/lib/tkextlib/iwidgets/spinner.rb index 4dac4ed58..174b9bd50 100644 --- a/ext/tk/lib/tkextlib/iwidgets/spinner.rb +++ b/ext/tk/lib/tkextlib/iwidgets/spinner.rb @@ -46,7 +46,7 @@ class Tk::Iwidgets::Spinner end def __validation_class_list - super << EntryfieldValidate + super() << EntryfieldValidate end Tk::ValidateConfigure.__def_validcmd(binding, EntryfieldValidate) diff --git a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb b/ext/tk/lib/tkextlib/iwidgets/toolbar.rb index a2a7f3162..74bb0cc96 100644 --- a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/toolbar.rb @@ -18,6 +18,11 @@ class Tk::Iwidgets::Toolbar WidgetClassName = 'Toolbar'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvariable' + end + private :__tkvariable_optkeys + #################################### include TkItemConfigMethod |