[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/08: grc: fix bug #856: paging/scrolling
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/08: grc: fix bug #856: paging/scrolling from keyboard |
Date: |
Tue, 5 Apr 2016 23:29:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 34f03132741fe1f7aa4e3e29272dea1d25526fbb
Author: Sebastian Koslowski <address@hidden>
Date: Tue Apr 5 17:58:55 2016 +0200
grc: fix bug #856: paging/scrolling from keyboard
---
grc/gui/NotebookPage.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/grc/gui/NotebookPage.py b/grc/gui/NotebookPage.py
index 481aca4..4c11215 100644
--- a/grc/gui/NotebookPage.py
+++ b/grc/gui/NotebookPage.py
@@ -26,9 +26,6 @@ from Constants import MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT
from DrawingArea import DrawingArea
import os
-############################################################
-## Notebook Page
-############################################################
class NotebookPage(gtk.HBox):
"""A page in the notebook."""
@@ -79,6 +76,7 @@ class NotebookPage(gtk.HBox):
self.scrolled_window = gtk.ScrolledWindow()
self.scrolled_window.set_size_request(MIN_WINDOW_WIDTH,
MIN_WINDOW_HEIGHT)
self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)
+ self.scrolled_window.connect('key-press-event',
self._handle_scroll_window_key_press)
self.drawing_area = DrawingArea(self.get_flow_graph())
self.scrolled_window.add_with_viewport(self.get_drawing_area())
self.pack_start(self.scrolled_window)
@@ -88,6 +86,15 @@ class NotebookPage(gtk.HBox):
def get_drawing_area(self): return self.drawing_area
+ def _handle_scroll_window_key_press(self, widget, event):
+ """forward Ctrl-PgUp/Down to NotebookPage (switch fg instead of horiz.
scroll"""
+ is_ctrl_pg = (
+ event.state & gtk.gdk.CONTROL_MASK and
+ event.keyval in (gtk.keysyms.Page_Up, gtk.keysyms.Page_Down)
+ )
+ if is_ctrl_pg:
+ return self.get_parent().event(event)
+
def get_generator(self):
"""
Get the generator object for this flow graph.
- [Commit-gnuradio] [gnuradio] branch maint updated (0341203 -> d0eab54), git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 02/08: ctrlport: change to doc; no -p flag required for gr-perf-monitorx, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 03/08: grc: stop overwritting modified param values in epy blocks, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 05/08: grc: ignore xml comments in block wrappers, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 06/08: grc: fix bug #856: paging/scrolling from keyboard,
git <=
- [Commit-gnuradio] [gnuradio] 01/08: ctrlport: change to doc; no -p flag required for gr-ctrlport-monitor, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 04/08: grc: rewrite block before adding connections during flowgraph import, git, 2016/04/05
- [Commit-gnuradio] [gnuradio] 07/08: Merge remote-tracking branch 'tracierenea/ctrlport_doc' into maint, git, 2016/04/05