Skip to content

Commit 9b28a8b

Browse files
committed
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 <[email protected]>
1 parent 92446ab commit 9b28a8b

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

git-gui.sh

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5330,6 +5330,34 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
53305330
[list .mbar.commit entryconf [.mbar.commit index last] -state]
53315331
}
53325332

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+
53335361
if {[is_MacOSX]} {
53345362
# -- Apple Menu (Mac OS X only)
53355363
#
@@ -5502,28 +5530,6 @@ pack .branch.l1 -side left
55025530
pack .branch.cb -side left -fill x
55035531
pack .branch -side top -fill x
55045532

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-
55275533
# -- Main Window Layout
55285534
#
55295535
panedwindow .vpane -orient vertical

0 commit comments

Comments
 (0)