{"thread":{"id":"37977","subject":"[PATCH] gitk: Enable mouse horizontal scrolling in diff pane","startedAt":"2014-11-15T14:05:06Z","lastAt":"2015-03-22T03:37:17Z","messageCount":3,"participants":["Gabriele Mazzotta","Stefan Haller","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"251943","messageId":"1416060306-4048-1-git-send-email-gabriele.mzt@gmail.com","threadId":"37977","inReplyTo":null,"subject":"[PATCH] gitk: Enable mouse horizontal scrolling in diff pane","fromName":"Gabriele Mazzotta","fromEmail":"gabriele.mzt@gmail.com","sentAt":"2014-11-15T14:05:06Z","receivedAt":"2014-11-15T14:05:06Z","isPatch":true,"sender":{"key":"gabriele.mzt@gmail.com","avatar":"https://avatars.githubusercontent.com/u/54670603?v=4"},"body":"Currently it's required to hold Shift and scroll up and down to move\nhorizontally. Listen to Button-6 and Button-7 events too to make\nhorizontal scrolling handier with touchpads and some mice.\n\nSigned-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>\n---\n gitk-git/gitk | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 78358a7..95a98e3 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2516,6 +2516,13 @@ proc makewindow {} {\n     } else {\n \tbindall <ButtonRelease-4> \"allcanvs yview scroll -5 units\"\n \tbindall <ButtonRelease-5> \"allcanvs yview scroll 5 units\"\n+        bind $ctext <Button> {\n+            if {\"%b\" eq 6} {\n+                $ctext xview scroll -5 units\n+            } elseif {\"%b\" eq 7} {\n+                $ctext xview scroll 5 units\n+            }\n+        }\n         if {[tk windowingsystem] eq \"aqua\"} {\n             bindall <MouseWheel> {\n                 set delta [expr {- (%D)}]\n-- \n2.1.3\n"},{"id":"251959","messageId":"1lv745j.1ypmc8r5ybicrM%lists@haller-berlin.de","threadId":"37977","inReplyTo":"1416060306-4048-1-git-send-email-gabriele.mzt@gmail.com","subject":"Re: [PATCH] gitk: Enable mouse horizontal scrolling in diff pane","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2014-11-16T08:00:01Z","receivedAt":"2014-11-16T08:00:01Z","isPatch":true,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"Gabriele Mazzotta <gabriele.mzt@gmail.com> wrote:\n\n> Currently it's required to hold Shift and scroll up and down to move\n> horizontally. Listen to Button-6 and Button-7 events too to make\n> horizontal scrolling handier with touchpads and some mice.\n\nHm, on my Macbook the diff pane already scrolls in all four directions\nwith two-finger scrolling on the trackpad. (Without your patch, I mean.)\n\nIn my copy of gitk I did the opposite for the commit list though; I\ncan't stand it that I accidentally scroll left or right with the\ntrackpad, so I commented out some code to restrict it to only vertical\nscrolling. I never posted this patch because I bet many people like the\ncurrent behaviour. Just so you know that such a change might be\ncontroversial.\n\n\n-- \nStefan Haller\nBerlin, Germany\nhttp://www.haller-berlin.de/\n"},{"id":"258268","messageId":"20150322033717.GA14271@iris.ozlabs.ibm.com","threadId":"37977","inReplyTo":"1416060306-4048-1-git-send-email-gabriele.mzt@gmail.com","subject":"Re: [PATCH] gitk: Enable mouse horizontal scrolling in diff pane","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2015-03-22T03:37:17Z","receivedAt":"2015-03-22T03:37:17Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Sat, Nov 15, 2014 at 03:05:06PM +0100, Gabriele Mazzotta wrote:\n> Currently it's required to hold Shift and scroll up and down to move\n> horizontally. Listen to Button-6 and Button-7 events too to make\n> horizontal scrolling handier with touchpads and some mice.\n> \n> Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>\n\nThanks, applied.\n\nPaul.\n"}]}