From 62a0aabd31b48e4c21cd032010325ae2ca7e7599 Mon Sep 17 00:00:00 2001 From: Glenn Richardson <glenn.richardson@live.com> Date: Tue, 27 Oct 2015 13:45:01 -0400 Subject: grc: added recently opened flowgraph submenu and toolbar button dropdown menu --- grc/gui/ActionHandler.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'grc/gui/ActionHandler.py') 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: -- cgit v1.2.3