# Tcl ignores the next line -*- tcl -*- \
exec wish "$0" -- "$@"
-# Copyright (C) 2006 Shawn Pearce, Paul Mackerras. All rights reserved.
-# This program is free software; it may be used, copied, modified
-# and distributed under the terms of the GNU General Public Licence,
-# either version 2, or (at your option) any later version.
+set copyright {
+Copyright © 2006 Shawn Pearce, Paul Mackerras.
+
+All rights reserved.
+
+This program is free software; it may be used, copied, modified
+and distributed under the terms of the GNU General Public Licence,
+either version 2, or (at your option) any later version.
+}
set appname [lindex [file split $argv0] end]
set gitdir {}
}
proc do_about {} {
- global appname
+ global appname copyright
set w .about_dialog
toplevel $w
label $w.desc \
-text "$appname - a commit creation tool for Git.
-
-Copyright © 2006 Shawn Pearce, Paul Mackerras
-
-Use and redistribute under the terms of the
-GNU General Public License, v. 2.0 or later." \
+$copyright" \
-padx 5 -pady 5 \
-justify left \
-anchor w \
.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
#