git-gui: Allow double-click in checkout dialog to start checkout
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>
Shawn O. Pearce committed
Jul 8, 2007 at 21:34 UTC
827c71199da9b762e0758fe96302d0c8b7a04bb9
2 files changed
+5
lib/branch_checkout.tcl
+1
@@ -30,6 +30,7 @@ constructor dialog {} {
30
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
31
32
set w_rev [::choose_rev::new $w.rev {Revision}]
33
+ $w_rev bind_listbox <Double-Button-1> [cb _checkout]
34
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
35
36
labelframe $w.options -text {Options}
lib/choose_rev.tcl
+4
@@ -185,6 +185,10 @@ method focus_filter {} {
185
}
186
}
187
188
+method bind_listbox {event script} {
189
+ bind $w_list $event $script
190
+}
191
+
192
method get_local_branch {} {
193
if {$revtype eq {head}} {
194
return [_expr $this]