threads / patch / 10288

patch, 2 partsFixing gitk indentation

Subject: [PATCH 2/2] Fixing gitk indentation

## tl;dr

3 messages between Oct 15, 2007 and Oct 15, 2007. Diffs are folded; open one to read it.

replies: 2people: 1as markdown or json

Jonathan del Strother· Oct 15, 2007, 09:33 UTC · lore

[PATCH 0/2] gitk: Added support for OS X mouse wheel

On 15 Oct 2007, at 01:27, Lars Hjemli wrote:
> 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
Jonathan del Strother· Oct 15, 2007, 09:33 UTC · lore

[PATCH 1/2] gitk: Added support for OS X mouse wheel

From: Jonathan del Strother <jon.delStrother@bestbefore.tv>

(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.

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
 gitk |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
Show changes to gitk +6 −0
diff --git a/gitk b/gitk
index 300fdce..ee2a6f5 100755
--- a/gitk
+++ b/gitk
@@ -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"
-- 
1.5.3.1
Jonathan del Strother· Oct 15, 2007, 09:33 UTC · lore
From: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Just tweaking some minor indentation issues in gitk
Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Show changes to gitk +4 −4
diff --git a/gitk b/gitk
index ee2a6f5..9b3e627 100755
--- a/gitk
+++ b/gitk
@@ -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)}]
-- 
1.5.3.1

← back to recent threads