aboutsummaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorDaniel A. Steffen <das@users.sourceforge.net>2008-08-16 03:20:09 +0200
committerShawn O. Pearce <spearce@spearce.org>2009-05-01 15:04:52 -0700
commita91be3fcbe92c24e809b1ec85881a6da40a9a340 (patch)
tree11725e38a6e69361a04141e4e97dc5f0304da434 /git-gui.sh
parentc736b4c83b929bdcb3fac2cc9e063258cc75cbe2 (diff)
downloadgit-a91be3fcbe92c24e809b1ec85881a6da40a9a340.tar.gz
git-a91be3fcbe92c24e809b1ec85881a6da40a9a340.tar.xz
git-gui: Fixes for Mac OS X TkAqua
- detect more Tk.framework variants - fix apple menu setup, use native preferences menu item - don't set menu font Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/git-gui.sh b/git-gui.sh
index c8f850d1e..14b92ba78 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -663,10 +663,13 @@ font create font_diffbold
font create font_diffitalic
foreach class {Button Checkbutton Entry Label
- Labelframe Listbox Menu Message
+ Labelframe Listbox Message
Radiobutton Spinbox Text} {
option add *$class.font font_ui
}
+if {![is_MacOSX]} {
+ option add *Menu.font font_ui
+}
unset class
if {[is_Windows] || [is_MacOSX]} {
@@ -2301,6 +2304,12 @@ set ui_comm {}
# -- Menu Bar
#
menu .mbar -tearoff 0
+if {[is_MacOSX]} {
+ # -- Apple Menu (Mac OS X only)
+ #
+ .mbar add cascade -label Apple -menu .mbar.apple
+ menu .mbar.apple
+}
.mbar add cascade -label [mc Repository] -menu .mbar.repository
.mbar add cascade -label [mc Edit] -menu .mbar.edit
if {[is_enabled branch]} {
@@ -2316,7 +2325,6 @@ if {[is_enabled transport]} {
if {[is_enabled multicommit] || [is_enabled singlecommit]} {
.mbar add cascade -label [mc Tools] -menu .mbar.tools
}
-. configure -menu .mbar
# -- Repository Menu
#
@@ -2569,19 +2577,7 @@ if {[is_enabled transport]} {
}
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 [mc "About %s" [appname]] \
- -command do_about
- .mbar.apple add separator
- .mbar.apple add command \
- -label [mc "Preferences..."] \
- -command do_options \
- -accelerator $M1T-,
- bind . <$M1B-,> do_options
+ proc ::tk::mac::ShowPreferences {} {do_options}
} else {
# -- Edit Menu
#
@@ -2609,11 +2605,15 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
.mbar add cascade -label [mc Help] -menu .mbar.help
menu .mbar.help
-if {![is_MacOSX]} {
+if {[is_MacOSX]} {
+ .mbar.apple add command -label [mc "About %s" [appname]] \
+ -command do_about
+ .mbar.apple add separator
+} else {
.mbar.help add command -label [mc "About %s" [appname]] \
-command do_about
}
-
+. configure -menu .mbar
set doc_path [githtmldir]
if {$doc_path ne {}} {