mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
* doc/ChangeLog-1.8.0: add changes of Ruby/Tk
* ext/tcltklib/tcltklib.c : some methods have no effect if on slave-IP * ext/tcltklib/tcltklib.c : can create a interpreter without Tk * ext/tcltklib/tcltklib.c : bug fix on handling exceptions * ext/tcltklib/MANUAL.euc : modify * ext/tk/lib/tk.rb : freeze some core modules * ext/tk/lib/multi-tk.rb : more secure * ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the Tk's list * ext/tk/lib/tk.rb: improve accessibility of TkVariable object * ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb, ext/tk/lib/tktext.rb : fix bug of font handling * ext/tk/lib/tkfont.rb TkFont.new() accepts compound fonts * process.c: bug fix * process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys} * process.c: deny handling IDs during evaluating the block given to the Process::{UID,GID}.switch method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
22a5aec4b3
commit
24ff3f4448
10 changed files with 1662 additions and 172 deletions
|
@ -330,6 +330,12 @@ class TkText<TkTextWin
|
|||
case key.to_s
|
||||
when 'text', 'label', 'show', 'data', 'file'
|
||||
tk_call(@path, 'tag', 'cget', tag, "-#{key}")
|
||||
when 'font', 'kanjifont'
|
||||
fnt = tk_tcl2ruby(tk_send('tag', 'cget', tag, "-#{key}"))
|
||||
unless fnt.kind_of?(TkFont)
|
||||
fnt = tagfontobj(tag, fnt)
|
||||
end
|
||||
fnt
|
||||
else
|
||||
tk_tcl2ruby(tk_call(@path, 'tag', 'cget', tag, "-#{key}"))
|
||||
end
|
||||
|
@ -363,13 +369,17 @@ class TkText<TkTextWin
|
|||
case key.to_s
|
||||
when 'text', 'label', 'show', 'data', 'file'
|
||||
conf = tk_split_simplelist(tk_send('tag','configure',tag,"-#{key}"))
|
||||
when 'font', 'kanjifont'
|
||||
conf = tk_split_simplelist(tk_send('tag','configure',tag,"-#{key}") )
|
||||
conf[4] = tagfont_configinfo(tag, conf[4])
|
||||
else
|
||||
conf = tk_split_list(tk_send('tag','configure',tag,"-#{key}"))
|
||||
end
|
||||
conf[0] = conf[0][1..-1]
|
||||
conf
|
||||
else
|
||||
tk_split_simplelist(tk_send('tag', 'configure', tag)).collect{|conflist|
|
||||
ret = tk_split_simplelist(tk_send('tag', 'configure',
|
||||
tag)).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
conf[0] = conf[0][1..-1]
|
||||
case conf[0]
|
||||
|
@ -392,6 +402,14 @@ class TkText<TkTextWin
|
|||
end
|
||||
conf
|
||||
}
|
||||
fontconf = ret.assoc('font')
|
||||
if fontconf
|
||||
ret.delete_if{|item| item[0] == 'font' || item[0] == 'kanjifont'}
|
||||
fontconf[4] = tagfont_configinfo(tag, fontconf[4])
|
||||
ret.push(fontconf)
|
||||
else
|
||||
ret
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -431,6 +449,12 @@ class TkText<TkTextWin
|
|||
case slot.to_s
|
||||
when 'text', 'label', 'show', 'data', 'file'
|
||||
tk_send('window', 'cget', index, "-#{slot}")
|
||||
when 'font', 'kanjifont'
|
||||
fnt = tk_tcl2ruby(tk_send('window', 'cget', index, "-#{slot}"))
|
||||
unless fnt.kind_of?(TkFont)
|
||||
fnt = tagfontobj(index, fnt)
|
||||
end
|
||||
fnt
|
||||
else
|
||||
tk_tcl2ruby(tk_send('window', 'cget', index, "-#{slot}"))
|
||||
end
|
||||
|
@ -853,8 +877,14 @@ class TkTextTag<TkObject
|
|||
case key.to_s
|
||||
when 'text', 'label', 'show', 'data', 'file'
|
||||
tk_call @t.path, 'tag', 'cget', @id, "-#{key}"
|
||||
when 'font', 'kanjifont'
|
||||
fnt = tk_tcl2ruby(tk_call(@t.path, 'tag', 'cget', @id, "-#{key}"))
|
||||
unless fnt.kind_of?(TkFont)
|
||||
fnt = tagfontobj(@id, fnt)
|
||||
end
|
||||
fnt
|
||||
else
|
||||
tk_tcl2ruby tk_call(@t.path, 'tag', 'cget', @id, "-#{key}")
|
||||
tk_tcl2ruby(tk_call(@t.path, 'tag', 'cget', @id, "-#{key}"))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue