summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-19 07:43:54 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-19 07:43:54 +0000
commit87fb86bbb3238e5254851b836e99bb415491a332 (patch)
tree49036b5576d08b84c87c1850d30a5d40b7b98784
parenta23bc676658106e96a00bd294e64ce53249b1392 (diff)
* ext/tk/lib/tk.rb: Fail to treat a hash value of 'font' option.
* ext/tk/lib/tk.rb: bindinfo cannot return '%' substiturion infomation. * ext/tk/lib/menu.rb: typo bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--ext/tk/lib/tk.rb5
-rw-r--r--ext/tk/lib/tk/menu.rb2
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e3ca223a37..5ad9776455 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Thu Aug 19 16:29:45 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
+
+ * ext/tk/lib/tk.rb: Fail to treat a hash value of 'font' option.
+
+ * ext/tk/lib/tk.rb: bindinfo cannot return '%' substiturion infomation.
+
+ * ext/tk/lib/menu.rb: typo bug.
+
Thu Aug 20 11:00:00 2004 Akiyoshi, Masamichi <masamichi.akiyoshi@hp.com>
* dln.c (dln_load): Modify to call lib$find_image_symbol for VMS.
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index e91ba92df1..800031a682 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -840,7 +840,7 @@ module TkComm
def _bindinfo(what, context=nil)
if context
tk_call_without_enc(*what+["<#{tk_event_sequence(context)}>"]) .collect {|cmdline|
- if cmdline =~ /^rb_out\S* (c(_\d+_)?\d+)\s+(.*)$/
+ if cmdline =~ /^rb_out\S* (c(?:_\d+_)?\d+)\s+(.*)$/
#[Tk_CMDTBL[$1], $2]
[TkCore::INTERP.tk_cmd_tbl[$1], $2]
else
@@ -2124,6 +2124,7 @@ module TkTreatFont
*(__config_cmd << {}))
next
else
+ fnt = hash_kv(fnt) if fnt.kind_of?(Hash)
tk_call(*(__config_cmd << "-#{optkey}" << fnt))
end
end
@@ -2177,6 +2178,7 @@ module TkTreatFont
elsif Tk::JAPANIZED_TK
fobj = fontobj # create a new TkFont object
else
+ ltn = hash_kv(ltn) if ltn.kind_of?(Hash)
tk_call(*(__config_cmd << "-#{optkey}" << ltn))
next
end
@@ -2228,6 +2230,7 @@ module TkTreatFont
elsif Tk::JAPANIZED_TK
fobj = fontobj # create a new TkFont object
else
+ knj = hash_kv(knj) if knj.kind_of?(Hash)
tk_call(*(__config_cmd << "-#{optkey}" << knj))
next
end
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb
index 4b94ccd915..2b4c8bcd9b 100644
--- a/ext/tk/lib/tk/menu.rb
+++ b/ext/tk/lib/tk/menu.rb
@@ -340,7 +340,7 @@ module TkSystemMenu
# fail ArgumentError, "parent must be a TkMenu object"
#end
# @path = Kernel.format("%s.%s", parent.path, self.class::SYSMENU_NAME)
- @path = parent_path + '.' + self.class::SYSMENU_NAME
+ @path = parent.path + '.' + self.class::SYSMENU_NAME
#TkComm::Tk_WINDOWS[@path] = self
TkCore::INTERP.tk_windows[@path] = self
if self.method(:create_self).arity == 0