From 46b75dba8df5e430488611a40855295324697e2f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 12 Jun 2016 13:18:22 +0800 Subject: [PATCH] gui: save/restore last folder outside repository. Closes #476 --- artiq/frontend/artiq_gui.py | 1 + artiq/gui/explorer.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/artiq/frontend/artiq_gui.py b/artiq/frontend/artiq_gui.py index 2e05ec91a..91d785a85 100755 --- a/artiq/frontend/artiq_gui.py +++ b/artiq/frontend/artiq_gui.py @@ -132,6 +132,7 @@ def main(): sub_clients["explist_status"], rpc_clients["schedule"], rpc_clients["experiment_db"]) + smgr.register(d_explorer) d_datasets = datasets.DatasetsDock(sub_clients["datasets"], rpc_clients["dataset_db"]) diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index bddbc5ebc..1fd0c78c6 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -296,3 +296,11 @@ class ExplorerDock(QtWidgets.QDockWidget): def update_cur_rev(self, cur_rev): self.revision.setText(cur_rev) + + def save_state(self): + return { + "current_directory": self.current_directory + } + + def restore_state(self, state): + self.current_directory = state["current_directory"]