summaryrefslogtreecommitdiff
path: root/lib/choose_repository.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-12 15:15:02 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-13 03:05:59 (GMT)
commit580b73de258635ca392d917cda4341ac5f1a2535 (patch)
tree34b1755521dc6d9df03459953dcae298abd9bc76 /lib/choose_repository.tcl
parent9c1b1b1e45926e6eed57f5bfbb5c3f69e063e5ab (diff)
downloadgit-580b73de258635ca392d917cda4341ac5f1a2535.zip
git-580b73de258635ca392d917cda4341ac5f1a2535.tar.gz
git-580b73de258635ca392d917cda4341ac5f1a2535.tar.bz2
git-gui: Fix bind errors when switching repository chooser panels
We need to remove any variable traces we may have installed when the panel is destroyed as the trace may attempt to use a widget that no longer exists on this panel. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/choose_repository.tcl')
-rw-r--r--lib/choose_repository.tcl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl
index 46d5b77..ab8e620 100644
--- a/lib/choose_repository.tcl
+++ b/lib/choose_repository.tcl
@@ -352,6 +352,7 @@ method _do_new {} {
pack $w_body.where -fill x
trace add variable @local_path write [cb _write_local_path]
+ bind $w_body.h <Destroy> [list trace remove variable @local_path write [cb _write_local_path]]
update
focus $w_body.where.t
}
@@ -477,6 +478,10 @@ method _do_clone {} {
trace add variable @local_path write [cb _update_clone]
trace add variable @origin_url write [cb _update_clone]
+ bind $w_body.h <Destroy> "
+ [list trace remove variable @local_path write [cb _update_clone]]
+ [list trace remove variable @origin_url write [cb _update_clone]]
+ "
update
focus $args.origin_t
}
@@ -948,6 +953,7 @@ method _do_open {} {
pack $w_body.where -fill x
trace add variable @local_path write [cb _write_local_path]
+ bind $w_body.h <Destroy> [list trace remove variable @local_path write [cb _write_local_path]]
update
focus $w_body.where.t
}