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 | c1566b74903da07910103c143cb2a38f4a7c86ba (patch) | |
tree | a11ae6ff53618056ef3d4945f2b022a7d099946e /ext/tk/lib/tkextlib/iwidgets | |
parent | 09d57b8e0c3bb80d43798d7a2bfc239229126e9a (diff) | |
download | ruby-c1566b74903da07910103c143cb2a38f4a7c86ba.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/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 f382cfd143..97688bb7d0 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 ae7d63f3f3..7a54b7c803 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 077d84c7a4..862876ee9f 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 89669ea815..363047018f 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 f847922386..cbd5fa0957 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 b60349be17..ba4bb5f40d 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 a60059f744..c933bf2985 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 4dac4ed582..174b9bd506 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 a2a7f31627..74bb0cc96c 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 |