diff options
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r-- | grc/gui/ActionHandler.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 71d62fc8f5..87576ccae1 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -83,6 +83,8 @@ class ActionHandler: Returns: false to let gtk handle the key action """ + # prevent key event stealing while the search box is active + if self.main_window.btwin.search_entry.has_focus(): return False if not self.get_focus_flag(): return False return Actions.handle_key_press(event) @@ -121,6 +123,8 @@ class ActionHandler: if Preferences.file_open() in self.init_file_paths: self.main_window.new_page(Preferences.file_open(), show=True) if not self.get_page(): self.main_window.new_page() #ensure that at least a blank page exists + + self.main_window.btwin.search_entry.hide() elif action == Actions.APPLICATION_QUIT: if self.main_window.close_pages(): gtk.main_quit() @@ -442,6 +446,9 @@ class ActionHandler: self.platform.loadblocks() self.main_window.btwin.clear(); self.platform.load_block_tree(self.main_window.btwin); + elif action == Actions.FIND_BLOCKS: + self.main_window.btwin.search_entry.show() + self.main_window.set_focus(self.main_window.btwin.search_entry) elif action == Actions.OPEN_HIER: bn = []; for b in self.get_flow_graph().get_selected_blocks(): @@ -484,6 +491,7 @@ class ActionHandler: Actions.BUSSIFY_SOURCES.set_sensitive(bool(self.get_flow_graph().get_selected_blocks())) Actions.BUSSIFY_SINKS.set_sensitive(bool(self.get_flow_graph().get_selected_blocks())) Actions.RELOAD_BLOCKS.set_sensitive(True) + Actions.FIND_BLOCKS.set_sensitive(True) #set the exec and stop buttons self.update_exec_stop() #saved status |