From 490bb6ef2d8194452452dd421900bd56236cce62 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/dashboard/explorer.py | 8 ++++++++ artiq/frontend/artiq_dashboard.py | 1 + 2 files changed, 9 insertions(+) diff --git a/artiq/dashboard/explorer.py b/artiq/dashboard/explorer.py index e32c948e3..481596b24 100644 --- a/artiq/dashboard/explorer.py +++ b/artiq/dashboard/explorer.py @@ -298,3 +298,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"] diff --git a/artiq/frontend/artiq_dashboard.py b/artiq/frontend/artiq_dashboard.py index 62af367d9..3c9dbf080 100755 --- a/artiq/frontend/artiq_dashboard.py +++ b/artiq/frontend/artiq_dashboard.py @@ -145,6 +145,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"])