summaryrefslogtreecommitdiff
path: root/grc/gui/ActionHandler.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2013-10-16 14:08:20 +0200
committerSebastian Koslowski <koslowski@kit.edu>2013-10-24 19:06:46 +0200
commite58fcceb221eeb8d9c54a303d76719283a27565c (patch)
tree6578816325c4cc9e3a16db609fcd34179cc11f85 /grc/gui/ActionHandler.py
parent510a96615da4b2511e08da2d7a16e77e1b58a1b5 (diff)
Add 'Find Blocks' action and auto-hide search entry box
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r--grc/gui/ActionHandler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 71d62fc8f5..29222b515b 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -121,6 +121,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 +444,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 +489,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