Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-08 09:23:54 +0400
committerShawn O. Pearce <spearce@spearce.org>2007-10-10 09:12:17 +0400
commit6bdf5e5f20c792ad0c5d5ba941d7e637aca86d32 (patch)
tree31afd464266edb04697bfa21b8a9a454abfb8136 /git-gui.sh
parent1cad232f92794834c8e70dfc0a1f35431d2c05cd (diff)
git-gui: Consolidate the Fetch and Push menus into a Remote menu
Sometimes the Fetch menu looks really odd, such as if you are in a repository that has no remotes configured when you start git-gui. Here we didn't have any items to add to the Fetch menu so it was a tad confusing for the end-user to see an empty menu on the menu bar. We now place all of the commands related to fetching and pushing of changes into a single "Remote" menu. This way we have a better class of bucket that we can drop additional remote related items into such as doing a remote merge or editing the remote configuration specs. The shortcuts to execute fetch/remote prune/push on existing remote specifications are now actually submenus listing the remotes by name. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/git-gui.sh b/git-gui.sh
index ca391136c8..c8307a6eef 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1792,8 +1792,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
}
if {[is_enabled transport]} {
.mbar add cascade -label [mc Merge] -menu .mbar.merge
- .mbar add cascade -label [mc Fetch] -menu .mbar.fetch
- .mbar add cascade -label [mc Push] -menu .mbar.push
+ .mbar add cascade -label [mc Remote] -menu .mbar.remote
}
. configure -menu .mbar
@@ -2000,13 +1999,14 @@ if {[is_enabled branch]} {
# -- Transport Menu
#
if {[is_enabled transport]} {
- menu .mbar.fetch
+ menu .mbar.remote
- menu .mbar.push
- .mbar.push add command -label [mc "Push..."] \
+ .mbar.remote add command \
+ -label [mc "Push..."] \
-command do_push_anywhere \
-accelerator $M1T-P
- .mbar.push add command -label [mc "Delete..."] \
+ .mbar.remote add command \
+ -label [mc "Delete..."] \
-command remote_branch_delete::dialog
}
@@ -2720,8 +2720,14 @@ user.email settings into your personal
if {[is_enabled transport]} {
load_all_remotes
- populate_fetch_menu
+ set n [.mbar.remote index end]
populate_push_menu
+ populate_fetch_menu
+ set n [expr {[.mbar.remote index end] - $n}]
+ if {$n > 0} {
+ .mbar.remote insert $n separator
+ }
+ unset n
}
if {[winfo exists $ui_comm]} {