Fixing gitk indentation
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 gitk: Added support for OS X mouse wheel
From: Jonathan del Strother <[email protected]>
(Väinö Järvelä supplied this patch a while ago for 1.5.2. It no longer applied cleanly, so I'm reposting it.)
MacBook doesn't seem to recognize MouseRelease-4 and -5 events, at all. So i added a support for the MouseWheel event, which i limited to Tcl/tk aqua, as i couldn't test it neither on Linux or Windows. Tcl/tk needs to be updated from the version that is shipped with OS X 10.4 Tiger, for this patch to work.
--- gitk | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
gitk +6 -0
@@ -843,6 +843,12 @@ proc makewindow {} { } else { bindall <ButtonRelease-4> "allcanvs yview scroll -5 units" bindall <ButtonRelease-5> "allcanvs yview scroll 5 units" + if {[tk windowingsystem] eq "aqua"} { + bindall <MouseWheel> { + set delta [expr {- (%D)}] + allcanvs yview scroll $delta units + } + } } bindall <2> "canvscan mark %W %x %y" bindall <B2-Motion> "canvscan dragto %W %x %y"
Signature · 1 line
1.5.3.1
PATCH 2/2 Fixing gitk indentation
In reply to a message not in the archiveFrom: Jonathan del Strother <[email protected]>
Just tweaking some minor indentation issues in gitk
--- gitk | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
gitk +4 -4
@@ -838,11 +838,11 @@ proc makewindow {} { bindall <1> {selcanvline %W %x %y} #bindall <B1-Motion> {selcanvline %W %x %y} if {[tk windowingsystem] == "win32"} { - bind . <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D } - bind $ctext <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D ; break } + bind . <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D } + bind $ctext <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D ; break } } else { - bindall <ButtonRelease-4> "allcanvs yview scroll -5 units" - bindall <ButtonRelease-5> "allcanvs yview scroll 5 units" + bindall <ButtonRelease-4> "allcanvs yview scroll -5 units" + bindall <ButtonRelease-5> "allcanvs yview scroll 5 units" if {[tk windowingsystem] eq "aqua"} { bindall <MouseWheel> { set delta [expr {- (%D)}]
Signature · 1 line
1.5.3.1
cover gitk: Added support for OS X mouse wheel
In reply to a message not in the archiveQuoted 4 lines · Lars Hjemli
Your patch has been mangled, probably by your MUA.
Also, these -/+ 4 lines seem to only change tab into spaces: please send such cleanups in a separate patch
Alright, let's try again. First patch fixes the mouse wheel, second patch fixes the weird indentation