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>
Shawn O. Pearce committed
Feb 26, 2007 at 11:17 UTC
9b28a8b9c2051bf85f71cdec85c142a0ab561f10
1 file changed
+28
-22
git-gui.sh
+28
-22
@@ -5330,6 +5330,34 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
5330
[list .mbar.commit entryconf [.mbar.commit index last] -state]
5331
}
5332
5333
+# -- Merge Menu
5334
+#
5335
+if {[is_enabled branch]} {
5336
+ menu .mbar.merge
5337
+ .mbar.merge add command -label {Local Merge...} \
5338
+ -command do_local_merge \
5339
+ -font font_ui
5340
+ lappend disable_on_lock \
5341
+ [list .mbar.merge entryconf [.mbar.merge index last] -state]
5342
+ .mbar.merge add command -label {Abort Merge...} \
5343
+ -command do_reset_hard \
5344
+ -font font_ui
5345
+ lappend disable_on_lock \
5346
+ [list .mbar.merge entryconf [.mbar.merge index last] -state]
5347
+
5348
+}
5349
+
5350
+# -- Transport Menu
5351
+#
5352
+if {[is_enabled transport]} {
5353
+ menu .mbar.fetch
5354
+
5355
+ menu .mbar.push
5356
+ .mbar.push add command -label {Push...} \
5357
+ -command do_push_anywhere \
5358
+ -font font_ui
5359
+}
5360
+
5361
if {[is_MacOSX]} {
5362
# -- Apple Menu (Mac OS X only)
5363
#
@@ -5502,28 +5530,6 @@ pack .branch.l1 -side left
5530
pack .branch.cb -side left -fill x
5531
pack .branch -side top -fill x
5532
5505
-if {[is_enabled branch]} {
5506
- menu .mbar.merge
5507
- .mbar.merge add command -label {Local Merge...} \
5508
- -command do_local_merge \
5509
- -font font_ui
5510
- lappend disable_on_lock \
5511
- [list .mbar.merge entryconf [.mbar.merge index last] -state]
5512
- .mbar.merge add command -label {Abort Merge...} \
5513
- -command do_reset_hard \
5514
- -font font_ui
5515
- lappend disable_on_lock \
5516
- [list .mbar.merge entryconf [.mbar.merge index last] -state]
5517
-
5518
-
5519
- menu .mbar.fetch
5520
-
5521
- menu .mbar.push
5522
- .mbar.push add command -label {Push...} \
5523
- -command do_push_anywhere \
5524
- -font font_ui
5525
-}
5526
-
5533
# -- Main Window Layout
5534
#
5535
panedwindow .vpane -orient vertical