summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 82aa235)
raw | patch | inline | side by side (parent: 82aa235)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 21 Nov 2006 07:33:56 +0000 (02:33 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 21 Nov 2006 07:33:56 +0000 (02:33 -0500) |
It is tradition for applications to store their about and preferences
menu options within the application menu. This is the first menu in
the menu bar, just after the apple menu. Apparently the way to access
this menu from Tk on Mac OS X systems is to create a special menu whose
name ends in ".apple" and place it into the menu bar.
So now if we are on Mac OS X we move our about menu and our options menu
into the application menu, like other Mac OS X applications.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
menu options within the application menu. This is the first menu in
the menu bar, just after the apple menu. Apparently the way to access
this menu from Tk on Mac OS X systems is to create a special menu whose
name ends in ".apple" and place it into the menu bar.
So now if we are on Mac OS X we move our about menu and our options menu
into the application menu, like other Mac OS X applications.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 57120bd2b42e27acef5e201307068d7fd067995d..4b07612f580290d590d10a44c244dfa48c1c2083 100755 (executable)
--- a/git-gui
+++ b/git-gui
.mbar add cascade -label Pull -menu .mbar.pull
.mbar add cascade -label Push -menu .mbar.push
}
-.mbar add cascade -label Help -menu .mbar.help
. configure -menu .mbar
# -- Repository Menu
-command {catch {[focus] tag add sel 0.0 end}} \
-accelerator $M1T-A \
-font font_ui
-.mbar.edit add separator
-.mbar.edit add command -label {Options...} \
- -command do_options \
- -font font_ui
# -- Commit Menu
#
menu .mbar.push
}
-# -- Help Menm
-#
-menu .mbar.help
+if {[is_MacOSX]} {
+ # -- Apple Menu (Mac OS X only)
+ #
+ .mbar add cascade -label Apple -menu .mbar.apple
+ menu .mbar.apple
+
+ .mbar.apple add command -label "About $appname" \
+ -command do_about \
+ -font font_ui
+ .mbar.apple add command -label "$appname Options..." \
+ -command do_options \
+ -font font_ui
+} else {
+ # -- Edit Menu
+ #
+ .mbar.edit add separator
+ .mbar.edit add command -label {Options...} \
+ -command do_options \
+ -font font_ui
+
+ # -- Help Menu
+ #
+ .mbar add cascade -label Help -menu .mbar.help
+ menu .mbar.help
+
+ .mbar.help add command -label "About $appname" \
+ -command do_about \
+ -font font_ui
+}
-.mbar.help add command -label "About $appname" \
- -command do_about \
- -font font_ui
# -- Main Window Layout
#