mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
05f5928c9d
commit
3514110b89
296 changed files with 13591 additions and 13558 deletions
|
|
@ -12,19 +12,19 @@ default_locale = msgcat.locale
|
|||
msgcat.load(msgcat_dir)
|
||||
|
||||
col_proc = TkComm.install_bind(proc{|w, color, frame, label|
|
||||
TkComm.window(frame).background(color)
|
||||
Tk.update
|
||||
TkComm.window(label).text(
|
||||
msgcat["%1$s:: %2$s", 'Color',
|
||||
color.capitalize])
|
||||
w.flash; w.flash
|
||||
Tk.callback_break;
|
||||
}, "%W")
|
||||
TkComm.window(frame).background(color)
|
||||
Tk.update
|
||||
TkComm.window(label).text(
|
||||
msgcat["%1$s:: %2$s", 'Color',
|
||||
color.capitalize])
|
||||
w.flash; w.flash
|
||||
Tk.callback_break;
|
||||
}, "%W")
|
||||
|
||||
del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil})
|
||||
|
||||
err_proc = TkComm.install_cmd(proc{fail(RuntimeError,
|
||||
msgcat['Application Error'])})
|
||||
msgcat['Application Error'])})
|
||||
|
||||
show_sample = proc{|loc|
|
||||
top_win = TkToplevel.new(:title=>loc)
|
||||
|
|
@ -39,24 +39,24 @@ show_sample = proc{|loc|
|
|||
}
|
||||
|
||||
lbl = TkLabel.new(top_win, :text=>msgcat["%1$s:: %2$s",
|
||||
'Color', '']).pack(:anchor=>'w')
|
||||
'Color', '']).pack(:anchor=>'w')
|
||||
|
||||
bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10,
|
||||
:expand=>true, :fill=>:both)
|
||||
:expand=>true, :fill=>:both)
|
||||
|
||||
TkFrame.new(bg){|f|
|
||||
['blue', 'green', 'red'].each{|col|
|
||||
TkButton.new(f, :text=>msgcat[col]){
|
||||
bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
|
||||
bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}")
|
||||
}.pack(:fill=>:x)
|
||||
}
|
||||
}.pack(:anchor=>'center', :pady=>15)
|
||||
|
||||
TkFrame.new(top_win){|f|
|
||||
TkButton.new(f, :text=>msgcat['Delete'],
|
||||
:command=>del_proc).pack(:side=>:right, :padx=>5)
|
||||
:command=>del_proc).pack(:side=>:right, :padx=>5)
|
||||
TkButton.new(f, :text=>msgcat['Error'],
|
||||
:command=>err_proc).pack(:side=>:left, :padx=>5)
|
||||
:command=>err_proc).pack(:side=>:left, :padx=>5)
|
||||
}.pack(:side=>:bottom, :fill=>:x)
|
||||
|
||||
top_win
|
||||
|
|
@ -68,7 +68,7 @@ TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3)
|
|||
|
||||
TkFrame.new{|f|
|
||||
TkButton.new(f, :text=>msgcat['Exit'],
|
||||
:command=>proc{exit}).pack(:side=>:right, :padx=>5)
|
||||
:command=>proc{exit}).pack(:side=>:right, :padx=>5)
|
||||
}.pack(:side=>:bottom, :fill=>:x)
|
||||
|
||||
f = TkFrame.new.pack(:side=>:top, :fill=>:both, :expand=>true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue