⚠️ key "accelerator" is duplicated and overwritten in Tk samples

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
a_matsuda 2015-12-28 15:10:25 +00:00
Родитель 58d698af35
Коммит d21c54ffbd
5 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -88,7 +88,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
add('command', 'label'=>'Long entry that does nothing') add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c| ['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"", add('command', 'label'=>"Print letter \"#{c}\"",
'underline'=>14, 'accelerator'=>"Meta+#{c}", 'underline'=>14,
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
} }

Просмотреть файл

@ -94,7 +94,7 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('command', 'label'=>'Long entry that does nothing') add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c| ['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"", add('command', 'label'=>"Print letter \"#{c}\"",
'underline'=>14, 'accelerator'=>"Meta+#{c}", 'underline'=>14,
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
} }

Просмотреть файл

@ -91,7 +91,7 @@ TkMenubutton.new($menu_frame, 'text'=>'Basic', 'underline'=>0) {|m|
['A','B','C','D','E','F','G'].each{|c| ['A','B','C','D','E','F','G'].each{|c|
# add('command', 'label'=>"文字 \"#{c}\" を印字", 'underline'=>4, # add('command', 'label'=>"文字 \"#{c}\" を印字", 'underline'=>4,
add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" を印字)", add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" を印字)",
'underline'=>14, 'accelerator'=>"Meta+#{c}", 'underline'=>14,
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) $menu_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
} }

Просмотреть файл

@ -96,7 +96,7 @@ TkMenu.new($menu84_frame, 'tearoff'=>false) {|m|
add('command', 'label'=>'Long entry that does nothing') add('command', 'label'=>'Long entry that does nothing')
['A','B','C','D','E','F','G'].each{|c| ['A','B','C','D','E','F','G'].each{|c|
add('command', 'label'=>"Print letter \"#{c}\"", add('command', 'label'=>"Print letter \"#{c}\"",
'underline'=>14, 'accelerator'=>"Meta+#{c}", 'underline'=>14,
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) $menu84_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
} }

Просмотреть файл

@ -119,7 +119,7 @@ TkMenu.new($menu8x_demo, 'tearoff'=>false) {|m|
['A','B','C','D','E','F','G'].each{|c| ['A','B','C','D','E','F','G'].each{|c|
# add('command', 'label'=>"文字 \"#{c}\" を印字", 'underline'=>4, # add('command', 'label'=>"文字 \"#{c}\" を印字", 'underline'=>4,
add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" を印字)", add('command', 'label'=>"Print letter \"#{c}\" (文字 \"#{c}\" を印字)",
'underline'=>14, 'accelerator'=>"Meta+#{c}", 'underline'=>14,
'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}") 'command'=>proc{print c,"\n"}, 'accelerator'=>"#{modifier}+#{c}")
$menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"}) $menu8x_demo.bind("#{modifier}-#{c.downcase}", proc{print c,"\n"})
} }