git-gui: Be more Macintosh like.

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>
This commit is contained in:
Shawn O. Pearce 2006-11-21 02:33:56 -05:00
parent 82aa23545f
commit 0c8d7839c9

36
git-gui
View File

@ -2659,7 +2659,6 @@ if {!$single_commit} {
.mbar add cascade -label Pull -menu .mbar.pull .mbar add cascade -label Pull -menu .mbar.pull
.mbar add cascade -label Push -menu .mbar.push .mbar add cascade -label Push -menu .mbar.push
} }
.mbar add cascade -label Help -menu .mbar.help
. configure -menu .mbar . configure -menu .mbar
# -- Repository Menu # -- Repository Menu
@ -2731,10 +2730,6 @@ menu .mbar.edit
-command {catch {[focus] tag add sel 0.0 end}} \ -command {catch {[focus] tag add sel 0.0 end}} \
-accelerator $M1T-A \ -accelerator $M1T-A \
-font font_ui -font font_ui
.mbar.edit add separator
.mbar.edit add command -label {Options...} \
-command do_options \
-font font_ui
# -- Commit Menu # -- Commit Menu
# #
@ -2808,13 +2803,36 @@ if {!$single_commit} {
menu .mbar.push menu .mbar.push
} }
# -- Help Menm if {[is_MacOSX]} {
# # -- Apple Menu (Mac OS X only)
menu .mbar.help #
.mbar add cascade -label Apple -menu .mbar.apple
menu .mbar.apple
.mbar.help add command -label "About $appname" \ .mbar.apple add command -label "About $appname" \
-command do_about \ -command do_about \
-font font_ui -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
}
# -- Main Window Layout # -- Main Window Layout
# #