From 89f7c30a7ecbd699145e31344f5e31d9a65d42d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 13 Jan 2014 05:22:52 +0100 Subject: [PATCH] backups/restore: improve handling "Back" button Do not reset entered data, but recheck selected VMs dependencies. --- qubesmanager/restore.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qubesmanager/restore.py b/qubesmanager/restore.py index 97f4e5c..27aaf4a 100644 --- a/qubesmanager/restore.py +++ b/qubesmanager/restore.py @@ -64,7 +64,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard): self.dev_mount_path = None self.restore_options = None - self.backup_vms_list = None + self.vms_to_restore = None self.func_output = [] self.feedback_queue = Queue() @@ -121,9 +121,14 @@ class RestoreVMsWindow(Ui_Restore, QWizard): def on_skip_dom0_toggled(self, checked): self.restore_options['dom0-home'] = checked + def cleanupPage(self, p_int): + if self.page(p_int) is self.select_vms_page: + self.vms_to_restore = None + else: + super(RestoreVMsWindow, self).cleanupPage(p_int) def __fill_vms_list__(self): - if self.backup_vms_list != None: + if self.vms_to_restore is not None: return self.select_vms_widget.selected_list.clear() @@ -219,6 +224,8 @@ class RestoreVMsWindow(Ui_Restore, QWizard): del self.vms_to_restore[str(vmname)] del self.func_output[:] + self.vms_to_restore = backup.restore_info_verify(self.vms_to_restore, + self.qvm_collection) backup.backup_restore_print_summary( self.vms_to_restore, print_callback = self.gather_output) self.confirm_text_edit.setReadOnly(True)