* ext/tk/lib/tkentry.rb: fix the encoding trouble of percent
substitutions on validatecommand option of TkEntry widget * ext/tk/lib/tk.rb: fix bug on {pack|grid}_propagate() method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ef85e302c8
commit
cf971d47b9
@ -1,3 +1,10 @@
|
|||||||
|
Fri Nov 21 16:44:18 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tkentry.rb: fix the encoding trouble of percent
|
||||||
|
substitutions on validatecommand option of TkEntry widget
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: fix bug on {pack|grid}_propagate() method
|
||||||
|
|
||||||
Fri Nov 21 16:12:11 2003 Akinori MUSHA <knu@iDaemons.org>
|
Fri Nov 21 16:12:11 2003 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* ruby.1: Fix markups and grammar.
|
* ruby.1: Fix markups and grammar.
|
||||||
|
@ -4053,8 +4053,8 @@ class TkWindow<TkObject
|
|||||||
return info
|
return info
|
||||||
end
|
end
|
||||||
|
|
||||||
def pack_propagate(mode = nil)
|
def pack_propagate(mode=None)
|
||||||
if mode
|
if mode == None
|
||||||
tk_call('pack', 'propagate', epath, mode)
|
tk_call('pack', 'propagate', epath, mode)
|
||||||
else
|
else
|
||||||
bool(tk_call('pack', 'propagate', epath))
|
bool(tk_call('pack', 'propagate', epath))
|
||||||
@ -4141,8 +4141,8 @@ class TkWindow<TkObject
|
|||||||
list(tk_call('grid', 'location', epath, x, y))
|
list(tk_call('grid', 'location', epath, x, y))
|
||||||
end
|
end
|
||||||
|
|
||||||
def grid_propagate(mode=nil)
|
def grid_propagate(mode=None)
|
||||||
if mode
|
if mode == None
|
||||||
tk_call('grid', 'propagate', epath, mode)
|
tk_call('grid', 'propagate', epath, mode)
|
||||||
else
|
else
|
||||||
bool(tk_call('grid', 'propagate', epath))
|
bool(tk_call('grid', 'propagate', epath))
|
||||||
|
@ -27,9 +27,10 @@ class TkEntry<TkLabel
|
|||||||
|
|
||||||
class ValidateArgs
|
class ValidateArgs
|
||||||
VARG_KEY = 'disvPSVW'
|
VARG_KEY = 'disvPSVW'
|
||||||
VARG_TYPE = 'nxsssssw'
|
VARG_TYPE = 'nxeseesw'
|
||||||
|
|
||||||
def self.scan_args(arg_str, arg_val)
|
def self.scan_args(arg_str, arg_val)
|
||||||
|
enc = Tk.encoding
|
||||||
arg_cnv = []
|
arg_cnv = []
|
||||||
arg_str.strip.split(/\s+/).each_with_index{|kwd,idx|
|
arg_str.strip.split(/\s+/).each_with_index{|kwd,idx|
|
||||||
if kwd =~ /^%(.)$/
|
if kwd =~ /^%(.)$/
|
||||||
@ -39,6 +40,12 @@ class TkEntry<TkLabel
|
|||||||
arg_cnv << TkComm::number(arg_val[idx])
|
arg_cnv << TkComm::number(arg_val[idx])
|
||||||
when ?s
|
when ?s
|
||||||
arg_cnv << TkComm::string(arg_val[idx])
|
arg_cnv << TkComm::string(arg_val[idx])
|
||||||
|
when ?e
|
||||||
|
if enc
|
||||||
|
arg_cnv << Tk.fromUTF8(TkComm::string(arg_val[idx]), enc)
|
||||||
|
else
|
||||||
|
arg_cnv << TkComm::string(arg_val[idx])
|
||||||
|
end
|
||||||
when ?w
|
when ?w
|
||||||
arg_cnv << TkComm::window(arg_val[idx])
|
arg_cnv << TkComm::window(arg_val[idx])
|
||||||
when ?x
|
when ?x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user