diff options
author | Glenn Richardson <glenn.richardson@live.com> | 2015-10-27 13:45:01 -0400 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-11-16 17:16:51 +0100 |
commit | 62a0aabd31b48e4c21cd032010325ae2ca7e7599 (patch) | |
tree | 33a98673ff67831f33fd892f9332488fa9569a55 /grc/gui/ActionHandler.py | |
parent | 19944f6328f1a852ed3384e750cb2b61da50d5bf (diff) |
grc: added recently opened flowgraph submenu and toolbar button dropdown menu
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r-- | grc/gui/ActionHandler.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index a2c48a7c52..ebf701553d 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -480,10 +480,14 @@ class ActionHandler: self.get_flow_graph()._options_block.get_param('generate_options').set_value(args[0]) self.get_flow_graph().update() elif action == Actions.FLOW_GRAPH_OPEN: - file_paths = OpenFlowGraphFileDialog(self.get_page().get_file_path()).run() + file_paths = args if args else OpenFlowGraphFileDialog(self.get_page().get_file_path()).run() if file_paths: #open a new page for each file, show only the first for i,file_path in enumerate(file_paths): self.main_window.new_page(file_path, show=(i==0)) + Preferences.files_recent_add(file_path) + self.main_window.tool_bar.refresh_submenus() + self.main_window.menu_bar.refresh_submenus() + elif action == Actions.FLOW_GRAPH_OPEN_QSS_THEME: file_paths = OpenQSSFileDialog(GR_PREFIX + '/share/gnuradio/themes/').run() if file_paths: @@ -513,6 +517,9 @@ class ActionHandler: if file_path is not None: self.get_page().set_file_path(file_path) Actions.FLOW_GRAPH_SAVE() + Preferences.files_recent_add(file_path) + self.main_window.tool_bar.refresh_submenus() + self.main_window.menu_bar.refresh_submenus() elif action == Actions.FLOW_GRAPH_SCREEN_CAPTURE: file_path = SaveImageFileDialog(self.get_page().get_file_path()).run() if file_path is not None: |