diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-29 04:06:12 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-29 04:06:12 +0000 |
commit | 11dbedfaad4a9a9521ece2198a8dc491678b1902 (patch) | |
tree | 4806dc0ff0c3827ecc40921838c4507340cfdb3a /ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1 | |
parent | 29e8d8b439b34c2a394407dc598fc01d14be0c20 (diff) |
add tag v1_8_6_5001v1_8_6_5001
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_6_5001@13304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1')
-rw-r--r-- | ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1 | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1 b/ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1 new file mode 100644 index 0000000000..d3952e71eb --- /dev/null +++ b/ruby_1_8_6/ext/tk/sample/demos-en/patch_1.1c1 @@ -0,0 +1,93 @@ +--- /usr/src/ruby-1.1c1/lib/tkcanvas.rb Tue Jul 21 18:18:02 1998 ++++ tkcanvas.rb Fri Jul 24 20:38:24 1998 +@@ -310,7 +310,7 @@ + || key == 'latinfont' || key == 'asciifont' ) + tagfont_configure(tagid(tagOrId), {key=>value}) + else +- tk_call 'itemconfigure', tagid(tagOrId), "-#{key}", value ++ tk_send 'itemconfigure', tagid(tagOrId), "-#{key}", value + end + end + end +--- /usr/src/ruby-1.1c1/lib/tkfont.rb Fri Jul 17 23:43:28 1998 ++++ tkfont.rb Fri Jul 24 17:46:22 1998 +@@ -42,7 +42,7 @@ + r | [] + + when /^8\.*/ +- list(tk_call('font', 'names')) ++ tk_split_simplelist(tk_call('font', 'names')) + + end + end +@@ -89,10 +89,14 @@ + if fnt == [] + TkFont.new(nil, nil).call_font_configure(path, *(args + [{}])) + else +- compound = Hash[*list(tk_call('font', 'configure', +- fnt))].collect{|key,value| +- [key[1..-1], value] +- }.assoc('compound')[1] ++ begin ++ compound = Hash[*list(tk_call('font', 'configure', ++ fnt))].collect{|key,value| ++ [key[1..-1], value] ++ }.assoc('compound')[1] ++ rescue ++ compound = [] ++ end + if compound == [] + TkFont.new(fnt, DEFAULT_KANJI_FONT_NAME) \ + .call_font_configure(path, *(args + [{}])) +@@ -156,14 +160,19 @@ + elsif font.kind_of? Array + finfo = {} + finfo['family'] = font[0].to_s +- if font[1] && font[1] != '0' && font[1] =~ /^(|\+|-)([0-9]+)$/ +- if $1 == '-' +- finfo['pixels'] = font[1].to_s ++ if font[1] ++ fsize = font[1].to_s ++ if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/ ++ if $1 == '-' ++ finfo['pixels'] = $2 ++ else ++ finfo['points'] = $2 ++ end + else +- finfo['points'] = font[1].to_s ++ finfo['points'] = '13' + end + end +- finfo[2..-1].each{|style| ++ font[2..-1].each{|style| + case (style) + when 'normal' + finfo['weight'] = style +@@ -199,16 +208,19 @@ + elsif font.kind_of? Array + finfo = {} + finfo['family'] = font[0].to_s +- if font[1] && font[1] != '0' && font[1] =~ /^(|\+|-)([0-9]+)$/ +- if $1 == '-' +- finfo['pixels'] = $2 ++ if font[1] ++ fsize = font[1].to_s ++ if fsize != '0' && fsize =~ /^(|\+|-)([0-9]+)$/ ++ if $1 == '-' ++ finfo['pixels'] = $2 ++ else ++ finfo['points'] = $2 ++ end + else +- finfo['points'] = $2 ++ finfo['points'] = '13' + end +- else +- finfo['points'] = '13' + end +- finfo[2..-1].each{|style| ++ font[2..-1].each{|style| + case (style) + when 'normal' + finfo['weight'] = style |