From 39c871c925cd76c2e61d2741fdc920869da3356b Mon Sep 17 00:00:00 2001 From: nagai Date: Wed, 3 Nov 2004 08:09:55 +0000 Subject: [PATCH] * ext/tk/lib/tk.rb: support to use different Tcl commands between configure and configinfo * ext/tk/lib/font.rb: ditto. * ext/tk/lib/itemconfig.rb: support to use different Tcl commands between item_configure and item_configinfo * ext/tk/lib/itemfont.rb: ditto. * ext/tk/extconf.rb: install SUPPORT_STATUS * ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 16 ++++++++ ext/tk/ChangeLog.tkextlib | 20 +++++++++- ext/tk/extconf.rb | 1 + ext/tk/lib/tk.rb | 47 +++++++++++++----------- ext/tk/lib/tk/itemconfig.rb | 42 ++++++++++++--------- ext/tk/lib/tk/itemfont.rb | 9 +++-- ext/tk/lib/tkextlib/SUPPORT_STATUS | 6 +-- ext/tk/lib/tkextlib/itk/incr_tk.rb | 2 + ext/tk/lib/tkextlib/tcllib/autoscroll.rb | 1 + ext/tk/lib/tkextlib/tcllib/cursor.rb | 1 + ext/tk/lib/tkextlib/tcllib/plotchart.rb | 1 + ext/tk/lib/tkextlib/tcllib/style.rb | 2 + ext/tk/lib/tkextlib/tile/style.rb | 1 + ext/tk/lib/tkextlib/tkDND/shape.rb | 1 + ext/tk/sample/tkextlib/bwidget/tree.rb | 2 +- 15 files changed, 105 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3fd99e15e..f1e8548df7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Wed Nov 3 17:02:48 2004 Hidetoshi NAGAI + + * ext/tk/lib/tk.rb: support to use different Tcl commands between + configure and configinfo + + * ext/tk/lib/font.rb: ditto. + + * ext/tk/lib/itemconfig.rb: support to use different Tcl commands + between item_configure and item_configinfo + + * ext/tk/lib/itemfont.rb: ditto. + + * ext/tk/extconf.rb: install SUPPORT_STATUS + + * ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib) + Wed Nov 3 15:38:28 2004 Kouhei Sutou * test/rss/*.rb: removed tab width configuration headers. diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index fae1b5cbfc..6386f727f6 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,6 +1,24 @@ +2004-11-03 Hidetoshi NAGAI + + * SUPPORT_STATUS: BLT moves to 'plan to support' from 'not determined' + + * itk/incr_tk.rb: __cget_cmd and __config_cmd are private methods + + * tcllib/autoscroll.rb: extend TkCore + + * tcllib/cursor.rb: ditto. + + * tcllib/plotchart.rb: ditto. + + * tcllib/style.rb: ditto. + + * tile/style.rb: ditto. + + * tkDND/shape.rb: ditto. + 2004-10-24 Hidetoshi NAGAI - * ext/tk/sample/tkextlib/bwidget/tree.rb: bug fix + * bwidget/tree.rb: bug fix on Windows 2004-10-16 Hidetoshi NAGAI diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb index 4f87d527ae..8b10353d1a 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -1,3 +1,4 @@ require 'mkmf' $preload = ["tcltklib"] +($INSTALLFILES||=[]) << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"] create_makefile("tkutil") diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 5fa4665922..404f8bf9f8 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -2098,11 +2098,11 @@ module TkTreatFont if key pathname = [win, tag, key].join(';') TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *__config_cmd) + TkFont.init_widget_font(pathname, *__confinfo_cmd) elsif optkeys.size == 1 pathname = [win, tag, optkeys[0]].join(';') TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *__config_cmd) + TkFont.init_widget_font(pathname, *__confinfo_cmd) else fonts = {} optkeys.each{|key| @@ -2110,7 +2110,7 @@ module TkTreatFont pathname = [win, tag, key].join(';') fonts[key] = TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *__config_cmd) + TkFont.init_widget_font(pathname, *__confinfo_cmd) } fonts end @@ -2373,6 +2373,11 @@ module TkConfigMethod end private :__config_cmd + def __confinfo_cmd + __config_cmd + end + private :__config_cmd + def __configinfo_struct {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, :default_value=>3, :current_value=>4} @@ -2574,7 +2579,7 @@ module TkConfigMethod if TkComm::GET_CONFIGINFO_AS_ARRAY if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/) fontkey = $2 - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{fontkey}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")))) conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] if ( ! __configinfo_struct[:alias] \ @@ -2596,7 +2601,7 @@ module TkConfigMethod return [slot, '', '', '', self.__send__(method)] when /^(#{__numval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]]) @@ -2617,7 +2622,7 @@ module TkConfigMethod end when /^(#{__numstrval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]]) @@ -2630,7 +2635,7 @@ module TkConfigMethod end when /^(#{__boolval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]]) @@ -2651,7 +2656,7 @@ module TkConfigMethod end when /^(#{__listval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]]) @@ -2664,7 +2669,7 @@ module TkConfigMethod end when /^(#{__numlistval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] \ @@ -2679,9 +2684,9 @@ module TkConfigMethod end when /^(#{__strval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) else - conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) end conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] @@ -2696,7 +2701,7 @@ module TkConfigMethod conf else - ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__config_cmd))).collect{|conflist| + ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist| conf = tk_split_simplelist(conflist) conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] @@ -2831,7 +2836,7 @@ module TkConfigMethod else # ! TkComm::GET_CONFIGINFO_AS_ARRAY if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/) fontkey = $2 - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{fontkey}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")))) conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] @@ -2858,7 +2863,7 @@ module TkConfigMethod return {slot => ['', '', '', self.__send__(method)]} when /^(#{__numval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] ) @@ -2879,7 +2884,7 @@ module TkConfigMethod end when /^(#{__numstrval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] ) @@ -2892,7 +2897,7 @@ module TkConfigMethod end when /^(#{__boolval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] ) @@ -2913,7 +2918,7 @@ module TkConfigMethod end when /^(#{__listval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] ) @@ -2926,7 +2931,7 @@ module TkConfigMethod end when /^(#{__numlistval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) if ( __configinfo_struct[:default_value] \ && conf[__configinfo_struct[:default_value]] \ @@ -2941,9 +2946,9 @@ module TkConfigMethod end when /^(#{__strval_optkeys.join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")))) else - conf = tk_split_list(_fromUTF8(tk_send_without_enc(*(__config_cmd << "-#{slot}")))) + conf = tk_split_list(_fromUTF8(tk_send_without_enc(*(__confinfo_cmd << "-#{slot}")))) end conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] @@ -2961,7 +2966,7 @@ module TkConfigMethod else ret = {} - tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__config_cmd))).each{|conflist| + tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist| conf = tk_split_simplelist(conflist) conf[__configinfo_struct[:key]] = conf[__configinfo_struct[:key]][1..-1] diff --git a/ext/tk/lib/tk/itemconfig.rb b/ext/tk/lib/tk/itemconfig.rb index 34c64adb2c..f0f13e63bd 100644 --- a/ext/tk/lib/tk/itemconfig.rb +++ b/ext/tk/lib/tk/itemconfig.rb @@ -96,6 +96,12 @@ module TkItemConfigMethod end private :__item_config_cmd + def __item_confinfo_cmd(id) + # maybe need to override + __item_config_cmd(id) + end + private :__item_confinfo_cmd + def __item_configinfo_struct(id) # maybe need to override {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, @@ -225,7 +231,7 @@ module TkItemConfigMethod if TkComm::GET_CONFIGINFO_AS_ARRAY if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) fontkey = $2 - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{fontkey}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")))) conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ @@ -247,7 +253,7 @@ module TkItemConfigMethod return [slot, '', '', '', self.__send__(method, tagOrId)] when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -268,7 +274,7 @@ module TkItemConfigMethod end when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -281,7 +287,7 @@ module TkItemConfigMethod end when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -302,7 +308,7 @@ module TkItemConfigMethod end when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -315,7 +321,7 @@ module TkItemConfigMethod end when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ @@ -330,10 +336,10 @@ module TkItemConfigMethod end when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) else - conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) end conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] @@ -348,7 +354,7 @@ module TkItemConfigMethod conf else - ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)))))).collect{|conflist| + ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).collect{|conflist| conf = tk_split_simplelist(conflist) conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] @@ -483,7 +489,7 @@ module TkItemConfigMethod else # ! TkComm::GET_CONFIGINFO_AS_ARRAY if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) fontkey = $2 - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{fontkey}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")))) conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] @@ -510,7 +516,7 @@ module TkItemConfigMethod return {slot => ['', '', '', self.__send__(method, tagOrId)]} when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -531,7 +537,7 @@ module TkItemConfigMethod end when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -544,7 +550,7 @@ module TkItemConfigMethod end when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -565,7 +571,7 @@ module TkItemConfigMethod end when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] ) @@ -578,7 +584,7 @@ module TkItemConfigMethod end when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \ && conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \ @@ -593,10 +599,10 @@ module TkItemConfigMethod end when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ - conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) else - conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}")))) + conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")))) end conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] @@ -614,7 +620,7 @@ module TkItemConfigMethod else ret = {} - tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)))))).each{|conflist| + tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).each{|conflist| conf = tk_split_simplelist(conflist) conf[__item_configinfo_struct(tagid(tagOrId))[:key]] = conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1] diff --git a/ext/tk/lib/tk/itemfont.rb b/ext/tk/lib/tk/itemfont.rb index 1f77ad11e7..e4a1a50912 100644 --- a/ext/tk/lib/tk/itemfont.rb +++ b/ext/tk/lib/tk/itemfont.rb @@ -33,11 +33,13 @@ module TkTreatItemFont if key pathname = [win, tag, key].join(';') TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId)))) + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) elsif optkeys.size == 1 pathname = [win, tag, optkeys[0]].join(';') TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId)))) + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) else fonts = {} optkeys.each{|key| @@ -45,7 +47,8 @@ module TkTreatItemFont pathname = [win, tag, key].join(';') fonts[key] = TkFont.used_on(pathname) || - TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId)))) + TkFont.init_widget_font(pathname, + *(__item_confinfo_cmd(tagid(tagOrId)))) } fonts end diff --git a/ext/tk/lib/tkextlib/SUPPORT_STATUS b/ext/tk/lib/tkextlib/SUPPORT_STATUS index a13e2751e8..6bc87bab98 100644 --- a/ext/tk/lib/tkextlib/SUPPORT_STATUS +++ b/ext/tk/lib/tkextlib/SUPPORT_STATUS @@ -95,6 +95,9 @@ TkDND http://sourceforge.net/projects/tkdnd ==> tkDND ===< plan to support (alpha quality libraries may be included) >============== +BLT http://sourceforge.net/projects/blt + * see tcltk-ext library on RAA (http://raa.ruby-lang.org/) + GraphViz http://www.graphviz.org/ Tkgeomap http://tkgeomap.sourceforge.net/index.html @@ -103,9 +106,6 @@ Tkgeomap http://tkgeomap.sourceforge.net/index.html ===< not determined to supprt or not >======================================== -BLT http://sourceforge.net/projects/blt - * see tcltk-ext library on RAA (http://raa.ruby-lang.org/) - Tix http://tixlibrary.sourceforge.net/ * see tcltk-ext library on RAA (http://raa.ruby-lang.org/) diff --git a/ext/tk/lib/tkextlib/itk/incr_tk.rb b/ext/tk/lib/tkextlib/itk/incr_tk.rb index a52c43e518..f11d9d7913 100644 --- a/ext/tk/lib/tkextlib/itk/incr_tk.rb +++ b/ext/tk/lib/tkextlib/itk/incr_tk.rb @@ -127,10 +127,12 @@ module Tk def __cget_cmd [self.master, 'component', self.name, 'cget'] end + private :__cget_cmd def __config_cmd [self.master, 'component', self.name, 'configure'] end + private :__config_cmd ComponentID_TBL = TkCore::INTERP.create_table Itk_Component_ID = ['itk:component'.freeze, '00000'.taint].freeze diff --git a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb index 34e34046c6..256b01ba87 100644 --- a/ext/tk/lib/tkextlib/tcllib/autoscroll.rb +++ b/ext/tk/lib/tkextlib/tcllib/autoscroll.rb @@ -129,6 +129,7 @@ module Tk end module Autoscroll + extend TkCore def self.autoscroll(win) tk_call_without_enc('::autoscroll::autoscroll', win.path) end diff --git a/ext/tk/lib/tkextlib/tcllib/cursor.rb b/ext/tk/lib/tkextlib/tcllib/cursor.rb index cbe1e2f1be..92fd7a62b5 100644 --- a/ext/tk/lib/tkextlib/tcllib/cursor.rb +++ b/ext/tk/lib/tkextlib/tcllib/cursor.rb @@ -73,6 +73,7 @@ module Tk end module Cursor + extend TkCore def self.cursor_display(win=None) tk_call_without_enc('::cursor::display', win) end diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb index 86327ceff0..5603ce1283 100644 --- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb +++ b/ext/tk/lib/tkextlib/tcllib/plotchart.rb @@ -78,6 +78,7 @@ module Tk end module Tk::Tcllib::Plotchart + extend TkCore ############################ def self.view_port(w, *args) # args := pxmin, pymin, pxmax, pymax tk_call_without_enc('::Plotchart::viewPort', w.path, *(args.flatten)) diff --git a/ext/tk/lib/tkextlib/tcllib/style.rb b/ext/tk/lib/tkextlib/tcllib/style.rb index 9fc4e92329..72a99d80fc 100644 --- a/ext/tk/lib/tkextlib/tcllib/style.rb +++ b/ext/tk/lib/tkextlib/tcllib/style.rb @@ -42,6 +42,8 @@ module Tk::Tcllib end module Style + extend TkCore + def self.names tk_split_simplelist(tk_call('style::names')) end diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb index 474c4f21b9..1e399182da 100644 --- a/ext/tk/lib/tkextlib/tile/style.rb +++ b/ext/tk/lib/tkextlib/tile/style.rb @@ -13,6 +13,7 @@ module Tk end module Tk::Tile::Style + extend TkCore end class << Tk::Tile::Style diff --git a/ext/tk/lib/tkextlib/tkDND/shape.rb b/ext/tk/lib/tkextlib/tkDND/shape.rb index 7187f0a3b3..0f6a5f0a30 100644 --- a/ext/tk/lib/tkextlib/tkDND/shape.rb +++ b/ext/tk/lib/tkextlib/tkDND/shape.rb @@ -17,6 +17,7 @@ TkPackage.require('shape') module Tk module TkDND module Shape + extend TkCore =begin def self.package_version begin diff --git a/ext/tk/sample/tkextlib/bwidget/tree.rb b/ext/tk/sample/tkextlib/bwidget/tree.rb index cbce80fda3..2b33962fa6 100644 --- a/ext/tk/sample/tkextlib/bwidget/tree.rb +++ b/ext/tk/sample/tkextlib/bwidget/tree.rb @@ -128,7 +128,7 @@ module DemoTree if Tk::PLATFORM['platform'] == 'unix' rootdir = File.expand_path('~') else - rootdir = 'c:\\' + rootdir = 'c:' end tree.insert('end', 'root', 'home',