summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-03-17 16:46:06 -0400
committerTom Rondeau <tom@trondeau.com>2014-03-17 16:46:06 -0400
commit719ef7ecdfe956cf49a4966dbc79fad5b834ac1a (patch)
treea95bc900dcd6846b1f2afc0bb2e8710e13a7580b
parente7942e24a48cde22e7503fec763983230bf65354 (diff)
parent56b13077335a814f3a72c8c759209bcc484ec712 (diff)
Merge remote-tracking branch 'gnuradio-wg-grc/grc_pygtk_backw_compat_fixes'
-rw-r--r--grc/gui/ActionHandler.py12
-rw-r--r--grc/gui/DrawingArea.py10
2 files changed, 14 insertions, 8 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 86f06aad58..0d8998753d 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 9fac791284..05e69e7bc6 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()