summaryrefslogtreecommitdiff
path: root/git-gui/lib/remote.tcl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-21 08:00:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-21 08:00:56 (GMT)
commitd794d9e70ebb8c767b04f25c03290ef305cd31ab (patch)
tree94b449643ef448eded6b3000400871913b7c0182 /git-gui/lib/remote.tcl
parent183f84365de7b4b1fe0e15cebce80a95023aa1d6 (diff)
parent41188dd1a837df08a959b63a2f56357971fa4549 (diff)
downloadgit-d794d9e70ebb8c767b04f25c03290ef305cd31ab.zip
git-d794d9e70ebb8c767b04f25c03290ef305cd31ab.tar.gz
git-d794d9e70ebb8c767b04f25c03290ef305cd31ab.tar.bz2
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: (96 commits) git-gui 0.9.0 git-gui: Bind Meta-T for "Stage To Commit" menu action git-gui: Allow users to set font weights to bold git-gui: Update Japanese strings (part 2) git-gui: Update Japanese strings Updated russian translation of git-gui po2msg: actually output statistics po2msg: ignore untranslated messages po2msg: ignore entries marked with "fuzzy" git-gui: Protect against bad translation strings git-gui: Make sure we get errors from git-update-index More updates and corrections to the russian translation of git-gui Updated Russian translation. git-gui: Update German translation git-gui: Add more terms to glossary. git-gui: Paper bag fix the global config parsing git-gui: Honor a config.mak in git-gui's top level git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows git-gui: Support cloning Cygwin based work-dirs git-gui: Use proper Windows shortcuts instead of bat files ...
Diffstat (limited to 'git-gui/lib/remote.tcl')
-rw-r--r--git-gui/lib/remote.tcl53
1 files changed, 32 insertions, 21 deletions
diff --git a/git-gui/lib/remote.tcl b/git-gui/lib/remote.tcl
index cf9b9d5..0e86dda 100644
--- a/git-gui/lib/remote.tcl
+++ b/git-gui/lib/remote.tcl
@@ -135,8 +135,10 @@ proc load_all_remotes {} {
proc populate_fetch_menu {} {
global all_remotes repo_config
- set m .mbar.fetch
- set prune_list [list]
+ set remote_m .mbar.remote
+ set fetch_m $remote_m.fetch
+ set prune_m $remote_m.prune
+
foreach r $all_remotes {
set enable 0
if {![catch {set a $repo_config(remote.$r.url)}]} {
@@ -157,28 +159,34 @@ proc populate_fetch_menu {} {
}
if {$enable} {
- lappend prune_list $r
- $m add command \
- -label "Fetch from $r..." \
+ if {![winfo exists $fetch_m]} {
+ menu $prune_m
+ $remote_m insert 0 cascade \
+ -label [mc "Prune from"] \
+ -menu $prune_m
+
+ menu $fetch_m
+ $remote_m insert 0 cascade \
+ -label [mc "Fetch from"] \
+ -menu $fetch_m
+ }
+
+ $fetch_m add command \
+ -label $r \
-command [list fetch_from $r]
+ $prune_m add command \
+ -label $r \
+ -command [list prune_from $r]
}
}
-
- if {$prune_list ne {}} {
- $m add separator
- }
- foreach r $prune_list {
- $m add command \
- -label "Prune from $r..." \
- -command [list prune_from $r]
- }
}
proc populate_push_menu {} {
global all_remotes repo_config
- set m .mbar.push
- set fast_count 0
+ set remote_m .mbar.remote
+ set push_m $remote_m.push
+
foreach r $all_remotes {
set enable 0
if {![catch {set a $repo_config(remote.$r.url)}]} {
@@ -199,13 +207,16 @@ proc populate_push_menu {} {
}
if {$enable} {
- if {!$fast_count} {
- $m add separator
+ if {![winfo exists $push_m]} {
+ menu $push_m
+ $remote_m insert 0 cascade \
+ -label [mc "Push to"] \
+ -menu $push_m
}
- $m add command \
- -label "Push to $r..." \
+
+ $push_m add command \
+ -label $r \
-command [list push_to $r]
- incr fast_count
}
}
}