[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/13: grc: added horizontal mouse wheel sc
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/13: grc: added horizontal mouse wheel scrolling |
Date: |
Sat, 17 Oct 2015 17:26:53 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit c0251c952e0a5c0644c4395a747466781d696cf2
Author: Glenn Richardson <address@hidden>
Date: Wed Oct 14 20:05:19 2015 -0400
grc: added horizontal mouse wheel scrolling
---
grc/gui/DrawingArea.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/grc/gui/DrawingArea.py b/grc/gui/DrawingArea.py
index d22a2c6..4412129 100644
--- a/grc/gui/DrawingArea.py
+++ b/grc/gui/DrawingArea.py
@@ -47,6 +47,7 @@ class DrawingArea(gtk.DrawingArea):
self.connect('motion-notify-event', self._handle_mouse_motion)
self.connect('button-press-event', self._handle_mouse_button_press)
self.connect('button-release-event', self._handle_mouse_button_release)
+ self.connect('scroll-event', self._handle_mouse_scroll)
self.add_events(
gtk.gdk.BUTTON_PRESS_MASK | \
gtk.gdk.POINTER_MOTION_MASK | \
@@ -83,6 +84,13 @@ class DrawingArea(gtk.DrawingArea):
"""
self._flow_graph.add_new_block(selection_data.data, (x, y))
+ def _handle_mouse_scroll(self, widget, event):
+ if event.state & gtk.gdk.SHIFT_MASK:
+ if event.direction == gtk.gdk.SCROLL_UP:
+ event.direction = gtk.gdk.SCROLL_LEFT
+ else:
+ event.direction = gtk.gdk.SCROLL_RIGHT
+
def _handle_mouse_button_press(self, widget, event):
"""
Forward button click information to the flow graph.
- [Commit-gnuradio] [gnuradio] branch master updated (616fee5 -> 83da789), git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 12/13: Merge remote-tracking branch 'tom/ctrlport_extending0', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 11/13: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 08/13: uhd: open support for controlport in static builds., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 01/13: grc: added horizontal mouse wheel scrolling,
git <=
- [Commit-gnuradio] [gnuradio] 05/13: ctrlport: fixed copy-paste error for setting short data., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 09/13: uhd: Adds ControlPort support to USRP source block's command message port., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 03/13: freq_xlating_fir: added pmt::dict command handling, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 02/13: grc: made flow graph python files the UTF-8 they always should have been, git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 13/13: Merge branch 'maint', git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 04/13: ctrlport: blocks: added controlport support to multiply_const_XXX blocks., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 06/13: ctrlport: blocks: added controlport support to add_const_XX blocks., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 10/13: ctrlport: adding new examples., git, 2015/10/17
- [Commit-gnuradio] [gnuradio] 07/13: ctrlport: provides a ControlPort model that connects directly with a block's message handler., git, 2015/10/17