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:
authorHeiko Voigt <hvoigt@hvoigt.net>2011-02-22 22:30:21 +0300
committerPat Thoyts <patthoyts@users.sourceforge.net>2011-02-24 03:11:50 +0300
commit4c2519e5a287709e3306449fc05bcdd2aefe8c7b (patch)
treed270936687e78127a0332c5fd839bcaabd567e39
parent4bfa2502f7e2dac52d8af46ee5abe0acf848607b (diff)
git-gui: fetch/prune all entry appears last
The user might have got used to the order the remotes appeared previously. Lets add the all entry last so the all entry does not confuse previous users. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Tested-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r--lib/remote.tcl22
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/remote.tcl b/lib/remote.tcl
index 18d3d06585..5e4e7f4c83 100644
--- a/lib/remote.tcl
+++ b/lib/remote.tcl
@@ -245,29 +245,27 @@ proc update_all_remotes_menu_entry {} {
set prune_m $remote_m.prune
if {$have_remote > 1} {
make_sure_remote_submenues_exist $remote_m
- set index [expr {[$fetch_m type 0] eq "tearoff" ? 1 : 0}]
- if {[$fetch_m entrycget $index -label] ne "All"} {
+ if {[$fetch_m entrycget end -label] ne "All"} {
- $fetch_m insert $index separator
- $fetch_m insert $index command \
+ $fetch_m insert end separator
+ $fetch_m insert end command \
-label "All" \
-command fetch_from_all
- $prune_m insert $index separator
- $prune_m insert $index command \
+ $prune_m insert end separator
+ $prune_m insert end command \
-label "All" \
-command prune_from_all
}
} else {
if {[winfo exists $fetch_m]} {
- set index [expr {[$fetch_m type 0] eq "tearoff" ? 1 : 0}]
- if {[$fetch_m type end] eq "separator"} {
+ if {[$fetch_m entrycget end -label] eq "All"} {
- delete_from_menu $fetch_m $index
- delete_from_menu $fetch_m $index
+ delete_from_menu $fetch_m end
+ delete_from_menu $fetch_m end
- delete_from_menu $prune_m $index
- delete_from_menu $prune_m $index
+ delete_from_menu $prune_m end
+ delete_from_menu $prune_m end
}
}
}