summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7f8d32)
raw | patch | inline | side by side (parent: f7f8d32)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 19:25:53 +0000 (14:25 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 19:25:53 +0000 (14:25 -0500) |
I'm not a huge fan of putting the left and right mouse actions into
the same procedure. Originally this is how Paul had implemented the
logic in gitool and I had carried some of that over into git-gui, but
now that I'm getting ready to implement right mouse click features to
act on files I really should split this apart.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
the same procedure. Originally this is how Paul had implemented the
logic in gitool and I had carried some of that over into git-gui, but
now that I'm getting ready to implement right mouse click features to
act on files I really should split this apart.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 3e3a535326d21af3923de6d916f9ec8527230d07..b8ebe31777ddfd2eff64c2fb5e44050321fc8a86 100755 (executable)
--- a/git-gui
+++ b/git-gui
destroy $w
}
-# shift == 1: left click
-# 3: right click
-proc click {w x y shift wx wy} {
- global ui_index ui_other file_lists
+proc file_left_click {w x y} {
+ global file_lists
set pos [split [$w index @$x,$y] .]
set lno [lindex $pos 0]
set path [lindex $file_lists($w) [expr $lno - 1]]
if {$path eq {}} return
- if {$col > 0 && $shift == 1} {
+ if {$col > 0} {
show_diff $path $w $lno
}
}
-proc unclick {w x y} {
+proc file_left_unclick {w x y} {
global file_lists
set pos [split [$w index @$x,$y] .]
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
foreach i [list $ui_index $ui_other] {
- bind $i <Button-1> {click %W %x %y 1 %X %Y; break}
- bind $i <ButtonRelease-1> {unclick %W %x %y; break}
- bind_button3 $i {click %W %x %y 3 %X %Y; break}
+ bind $i <Button-1> {file_left_click %W %x %y; break}
+ bind $i <ButtonRelease-1> {file_left_unclick %W %x %y; break}
}
unset i