commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 05/24: grc: fix some PyGTK backwards compat


From: git
Subject: [Commit-gnuradio] [gnuradio] 05/24: grc: fix some PyGTK backwards compatibilty issues
Date: Tue, 18 Mar 2014 17:51:40 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 56b13077335a814f3a72c8c759209bcc484ec712
Author: Sebastian Koslowski <address@hidden>
Date:   Fri Mar 14 11:18:55 2014 +0100

    grc: fix some PyGTK backwards compatibilty issues
---
 grc/gui/ActionHandler.py | 12 +++++++++---
 grc/gui/DrawingArea.py   | 10 +++++-----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 86f06aa..0d89987 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -359,11 +359,17 @@ class ActionHandler:
             Dialogs.ErrorsDialog(self.get_flow_graph())
         elif action == Actions.TOGGLE_REPORTS_WINDOW:
             visible = action.get_active()
-            self.main_window.reports_scrolled_window.set_visible(visible)
+            if visible:
+                self.main_window.reports_scrolled_window.show()
+            else:
+                self.main_window.reports_scrolled_window.hide()
             Preferences.reports_window_visibility(visible)
         elif action == Actions.TOGGLE_BLOCKS_WINDOW:
             visible = action.get_active()
-            self.main_window.btwin.set_visible(visible)
+            if visible:
+                self.main_window.btwin.show()
+            else:
+                self.main_window.btwin.hide()
             Preferences.blocks_window_visibility(visible)
         ##################################################
         # Param Modifications
@@ -472,7 +478,7 @@ class ActionHandler:
         elif action == Actions.FIND_BLOCKS:
             self.main_window.btwin.show()
             self.main_window.btwin.search_entry.show()
-            self.main_window.set_focus(self.main_window.btwin.search_entry)
+            self.main_window.btwin.search_entry.grab_focus()
         elif action == Actions.OPEN_HIER:
             bn = [];
             for b in self.get_flow_graph().get_selected_blocks():
diff --git a/grc/gui/DrawingArea.py b/grc/gui/DrawingArea.py
index 9fac791..05e69e7 100644
--- a/grc/gui/DrawingArea.py
+++ b/grc/gui/DrawingArea.py
@@ -63,7 +63,7 @@ class DrawingArea(gtk.DrawingArea):
         def _handle_notify_event(widget, event, focus_flag): self._focus_flag 
= focus_flag
         self.connect('leave-notify-event', _handle_notify_event, False)
         self.connect('enter-notify-event', _handle_notify_event, True)
-        self.set_can_focus(True)
+        self.set_flags(gtk.CAN_FOCUS)  # self.set_can_focus(True)
         self.connect('focus-out-event', self._handle_focus_lost_event)
 
     def new_pixmap(self, width, height): return gtk.gdk.Pixmap(self.window, 
width, height, -1)
@@ -140,7 +140,7 @@ class DrawingArea(gtk.DrawingArea):
 
     def _handle_focus_lost_event(self, widget, event):
         # don't clear selection while context menu is active
-        if self._flow_graph.get_context_menu().get_visible(): return
-        self._flow_graph.unselect()
-        self._flow_graph.update_selected()
-        self._flow_graph.queue_draw()
+        if not self._flow_graph.get_context_menu().flags() & gtk.VISIBLE:
+            self._flow_graph.unselect()
+            self._flow_graph.update_selected()
+            self._flow_graph.queue_draw()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]