summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84d3d7b)
raw | patch | inline | side by side (parent: 84d3d7b)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 01:34:28 +0000 (21:34 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 9 Jul 2007 02:34:53 +0000 (22:34 -0400) |
If the user double clicks a branch in the checkout dialog then they
probably want to start the checkout process on that branch. I found
myself doing this without realizing it, and of course it did nothing
as there was no action bound to the listbox's Double-Button-1 event
handler. Since I did it without thinking, others will probably also
try, and expect the same behavior.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
probably want to start the checkout process on that branch. I found
myself doing this without realizing it, and of course it did nothing
as there was no action bound to the listbox's Double-Button-1 event
handler. Since I did it without thinking, others will probably also
try, and expect the same behavior.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/branch_checkout.tcl | patch | blob | history | |
lib/choose_rev.tcl | patch | blob | history |
index 62230efe430f93f7bbdc051cb3687e39b93283c9..72c45b45541749699460de1122c711888b389403 100644 (file)
--- a/lib/branch_checkout.tcl
+++ b/lib/branch_checkout.tcl
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
set w_rev [::choose_rev::new $w.rev {Revision}]
+ $w_rev bind_listbox <Double-Button-1> [cb _checkout]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
labelframe $w.options -text {Options}
diff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl
index 1aab56f5cc18de72d43af88b475c8c85d0f0dcb8..afd81707ceb08ccc106e76b082f892c824dfb828 100644 (file)
--- a/lib/choose_rev.tcl
+++ b/lib/choose_rev.tcl
}
}
+method bind_listbox {event script} {
+ bind $w_list $event $script
+}
+
method get_local_branch {} {
if {$revtype eq {head}} {
return [_expr $this]