summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-26 11:17:11 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-26 11:17:11 -0500
commit9b28a8b9c2051bf85f71cdec85c142a0ab561f10 (patch)
tree685a6ef014247ed9b16ca90948495ca1b05a956a
parentDon't modify CREDITS-FILE if it hasn't changed. (diff)
downloadtgif-9b28a8b9c2051bf85f71cdec85c142a0ab561f10.tar.xz
git-gui: Relocate the menu/transport menu code.
This code doesn't belong down in the main window UI creation, its really part of the menu system and probably should be located with it. I'm moving it because I could not find the code when I was looking for it earlier today, as it was not where I expected it to be found. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh50
1 files changed, 28 insertions, 22 deletions
diff --git a/git-gui.sh b/git-gui.sh
index f84ba3382b..48097ea5e8 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -5330,6 +5330,34 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
[list .mbar.commit entryconf [.mbar.commit index last] -state]
}
+# -- Merge Menu
+#
+if {[is_enabled branch]} {
+ menu .mbar.merge
+ .mbar.merge add command -label {Local Merge...} \
+ -command do_local_merge \
+ -font font_ui
+ lappend disable_on_lock \
+ [list .mbar.merge entryconf [.mbar.merge index last] -state]
+ .mbar.merge add command -label {Abort Merge...} \
+ -command do_reset_hard \
+ -font font_ui
+ lappend disable_on_lock \
+ [list .mbar.merge entryconf [.mbar.merge index last] -state]
+
+}
+
+# -- Transport Menu
+#
+if {[is_enabled transport]} {
+ menu .mbar.fetch
+
+ menu .mbar.push
+ .mbar.push add command -label {Push...} \
+ -command do_push_anywhere \
+ -font font_ui
+}
+
if {[is_MacOSX]} {
# -- Apple Menu (Mac OS X only)
#
@@ -5502,28 +5530,6 @@ pack .branch.l1 -side left
pack .branch.cb -side left -fill x
pack .branch -side top -fill x
-if {[is_enabled branch]} {
- menu .mbar.merge
- .mbar.merge add command -label {Local Merge...} \
- -command do_local_merge \
- -font font_ui
- lappend disable_on_lock \
- [list .mbar.merge entryconf [.mbar.merge index last] -state]
- .mbar.merge add command -label {Abort Merge...} \
- -command do_reset_hard \
- -font font_ui
- lappend disable_on_lock \
- [list .mbar.merge entryconf [.mbar.merge index last] -state]
-
-
- menu .mbar.fetch
-
- menu .mbar.push
- .mbar.push add command -label {Push...} \
- -command do_push_anywhere \
- -font font_ui
-}
-
# -- Main Window Layout
#
panedwindow .vpane -orient vertical