diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 1d4d6a6..d974842 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -348,6 +348,12 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard): self.button(self.FinishButton).setEnabled(True) self.showFileDialog.setEnabled(False) self.cleanup_temporary_files() + + # turn off only when backup was successful + if self.thread_monitor.success and \ + self.turn_off_checkbox.isChecked(): + os.system('systemctl poweroff') + signal.signal(signal.SIGCHLD, old_sigchld_handler) def reject(self): diff --git a/ui/backupdlg.ui b/ui/backupdlg.ui index dc86b73..3dc9950 100644 --- a/ui/backupdlg.ui +++ b/ui/backupdlg.ui @@ -7,7 +7,7 @@ 0 0 737 - 420 + 618 @@ -156,28 +156,21 @@ Backup destination directory - - - - - - - - ... - - - - - - - + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + Target qube: - + + + + Backup directory or command: @@ -187,69 +180,69 @@ + + + + + + + ... + + + - + 0 0 + + + 0 + 100 + + Save backup profile - - - - 10 - 30 - 267 - 25 - - - - Save settings as default backup profile: - - - - - - 270 - 30 - 539 - 25 - - - - - - - true - - - - - - 10 - 60 - 511 - 16 - - - - - 75 - true - true - - - - WARNING: password will be saved in dom0 in plain text. - - + + + + + Save settings as default backup profile: + + + + + + + + + + true + + + + + + + + 75 + true + true + + + + WARNING: password will be saved in dom0 in plain text. + + + + @@ -310,6 +303,31 @@ + + + + + 0 + 0 + + + + Other + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + Turn computer off after backup is finished + + + + + +