summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d04278)
raw | patch | inline | side by side (parent: 9d04278)
author | Heiko Voigt <hvoigt@hvoigt.net> | |
Sun, 13 Feb 2011 13:50:38 +0000 (14:50 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Mon, 14 Feb 2011 12:10:54 +0000 (12:10 +0000) |
Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
lib/remote.tcl | patch | blob | history |
diff --git a/lib/remote.tcl b/lib/remote.tcl
index 1383e9786ce76de16d6fcf9f427f685fb9bad927..cf2fc9501df78029977e0c9e360863808a6ee55f 100644 (file)
--- a/lib/remote.tcl
+++ b/lib/remote.tcl
}
if {$enable} {
- if {![winfo exists $fetch_m]} {
- menu $remove_m
- $remote_m insert 0 cascade \
- -label [mc "Remove Remote"] \
- -menu $remove_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
- }
+ make_sure_remote_submenues_exist $remote_m
$fetch_m add command \
-label $r \
}
}
+proc make_sure_remote_submenues_exist {remote_m} {
+ set fetch_m $remote_m.fetch
+ set prune_m $remote_m.prune
+ set remove_m $remote_m.remove
+
+ if {![winfo exists $fetch_m]} {
+ menu $remove_m
+ $remote_m insert 0 cascade \
+ -label [mc "Remove Remote"] \
+ -menu $remove_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
+ }
+}
+
proc populate_remotes_menu {} {
global all_remotes