diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
| commit | d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad (patch) | |
| tree | 5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/tk/sample/tkmsgcat-load_tk.rb | |
| parent | 101e79d7b434c01c0e6f4bcc480003858ab8e1a4 (diff) | |
| download | ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.gz ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.xz ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.zip | |
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkmsgcat-load_tk.rb')
| -rw-r--r-- | ext/tk/sample/tkmsgcat-load_tk.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/tk/sample/tkmsgcat-load_tk.rb b/ext/tk/sample/tkmsgcat-load_tk.rb index 45d68e4e0..703f471e1 100644 --- a/ext/tk/sample/tkmsgcat-load_tk.rb +++ b/ext/tk/sample/tkmsgcat-load_tk.rb @@ -14,7 +14,7 @@ col_proc = TkComm.install_bind(proc{|w, color, frame, label| TkComm.window(frame).background(color) Tk.update TkComm.window(label).text( - msgcat.mc("%1$s:: %2$s", 'Color', + msgcat.mc("%1$s:: %2$s", 'Color', color.capitalize)) w.flash; w.flash Tk.callback_break; @@ -22,7 +22,7 @@ col_proc = TkComm.install_bind(proc{|w, color, frame, label| del_proc = TkComm.install_cmd(proc{top_win.destroy; top_win = nil}) -err_proc = TkComm.install_cmd(proc{fail(RuntimeError, +err_proc = TkComm.install_cmd(proc{fail(RuntimeError, msgcat.mc('Application Error'))}) show_sample = proc{|loc| @@ -36,10 +36,10 @@ show_sample = proc{|loc| pack(:pady=>10, :padx=>10) } - lbl = TkLabel.new(top_win, :text=>msgcat.mc("%1$s:: %2$s", + lbl = TkLabel.new(top_win, :text=>msgcat.mc("%1$s:: %2$s", 'Color', '')).pack(:anchor=>'w') - bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10, + bg = TkFrame.new(top_win).pack(:ipadx=>20, :ipady=>10, :expand=>true, :fill=>:both) TkFrame.new(bg){|f| @@ -48,7 +48,7 @@ show_sample = proc{|loc| bind('ButtonRelease-1', col_proc, "#{col} #{bg.path} #{lbl.path}") }.pack(:fill=>:x) =begin - TkButton.new(f, :text=>msgcat.mc(col), + TkButton.new(f, :text=>msgcat.mc(col), :command=>proc{ bg.background col lbl.text msgcat.mc("%1$s:: %2$s", 'Color', col.capitalize) @@ -58,17 +58,17 @@ show_sample = proc{|loc| }.pack(:anchor=>'center', :pady=>15) TkFrame.new(top_win){|f| - TkButton.new(f, :text=>msgcat.mc('Delete'), + TkButton.new(f, :text=>msgcat.mc('Delete'), :command=>del_proc).pack(:side=>:right, :padx=>5) - TkButton.new(f, :text=>msgcat.mc('Error'), + TkButton.new(f, :text=>msgcat.mc('Error'), :command=>err_proc).pack(:side=>:left, :padx=>5) =begin - TkButton.new(f, :text=>msgcat.mc('Delete'), + TkButton.new(f, :text=>msgcat.mc('Delete'), :command=>proc{ top_win.destroy top_win = nil }).pack(:side=>:right, :padx=>5) - TkButton.new(f, :text=>msgcat.mc('Error'), + TkButton.new(f, :text=>msgcat.mc('Error'), :command=>proc{ fail RuntimeError, msgcat.mc('Application Error') }).pack(:side=>:left, :padx=>5) @@ -83,7 +83,7 @@ show_sample = proc{|loc| TkLabel.new(:text=>"Please click a locale.").pack(:padx=>5, :pady=>3) TkFrame.new{|f| - TkButton.new(f, :text=>msgcat.mc('Exit'), + TkButton.new(f, :text=>msgcat.mc('Exit'), :command=>proc{exit}).pack(:side=>:right, :padx=>5) }.pack(:side=>:bottom, :fill=>:x) @@ -106,7 +106,7 @@ lbox.bind('ButtonRelease-1'){|ev| lbox.insert('end', 'default') -Dir.entries(msgcat_dir).sort.each{|f| +Dir.entries(msgcat_dir).sort.each{|f| if f =~ /^(.*).msg$/ lbox.insert('end', $1) end |
