diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-06 16:24:22 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-06 16:24:22 +0000 |
commit | dfcbc92614bdaff1c16feb1d34c5bfeae810f024 (patch) | |
tree | 63efe88639239fcc6a475511f05fdeec33a46a35 /ext/tk/sample/demos-en | |
parent | ff6a6a0e28016abee5b38402bee77f04f407d8d6 (diff) | |
download | ruby-dfcbc92614bdaff1c16feb1d34c5bfeae810f024.tar.gz |
* ext/tk/tcltklib.c: forgot to update RELEASE_DATE.
* ext/tk/lib/tk.rb: ditto.
* ext/tk/sample/demos-en/menu.rb: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-en')
-rw-r--r-- | ext/tk/sample/demos-en/menu.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/tk/sample/demos-en/menu.rb b/ext/tk/sample/demos-en/menu.rb index d835d145eb..8370d2f5f0 100644 --- a/ext/tk/sample/demos-en/menu.rb +++ b/ext/tk/sample/demos-en/menu.rb @@ -19,9 +19,16 @@ $menu_demo = TkToplevel.new {|w| $menu_frame = TkFrame.new($menu_demo, 'relief'=>'raised', 'bd'=>2) $menu_frame.pack('side'=>'top', 'fill'=>'x') +begin + windowingsystem = Tk.windowingsystem() +rescue + windowingsystem = "" +end + # label TkLabel.new($menu_demo,'font'=>$font,'wraplength'=>'4i','justify'=>'left') { - if $tk_platform['platform'] == 'macintosh' + if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" text("This window contains a menubar with cascaded menus. You can invoke entries with an accelerator by typing Command+x, where \"x\" is the character next to the command key symbol. The rightmost menu can be torn off into a palette by dragging outside of its bounds and releasing the mouse.") else text("This window contains a menubar with cascaded menus. You can post a menu from the keyboard by typing Alt+x, where \"x\" is the character underlined on the menu. You can then traverse among the menus using the arrow keys. When a menu is posted, you can invoke the current entry by typing space, or you can invoke any entry by typing its underlined character. If a menu entry has an accelerator, you can invoke the entry without posting the menu just by typing the accelerator. The rightmost menu can be torn off into a palette by selecting the first item in the menu.") @@ -62,7 +69,8 @@ TkMenubutton.new($menu_frame, 'text'=>'File', 'underline'=>0) {|m| } } -if $tk_platform['platform'] == 'macintosh' +if $tk_platform['platform'] == 'macintosh' || + windowingsystem == "classic" || windowingsystem == "aqua" modifier = 'Command' elsif $tk_platform['platform'] == 'windows' modifier = 'Control' |