Merge branch 'master' of git://git.qubes-os.org/marmarek/qubes-manager
This commit is contained in:
commit
49282de660
@ -186,8 +186,11 @@ def select_path_button_clicked(dialog, select_file = False):
|
||||
new_path = file_dialog_function(dialog, "Select backup location.", "~")
|
||||
|
||||
if new_path != None:
|
||||
dialog.dir_line_edit.setText(new_path)
|
||||
dialog.backup_location = new_path
|
||||
if os.path.basename(new_path) == 'qubes.xml':
|
||||
dialog.backup_location = os.path.dirname(str(new_path))
|
||||
else:
|
||||
dialog.backup_location = str(new_path)
|
||||
dialog.dir_line_edit.setText(dialog.backup_location)
|
||||
|
||||
if (new_path or new_appvm) and len(dialog.backup_location) > 0:
|
||||
dialog.select_dir_page.emit(SIGNAL("completeChanged()"))
|
||||
|
@ -86,6 +86,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
||||
self.connect(self.dev_combobox, SIGNAL("activated(int)"), self.dev_combobox_activated)
|
||||
self.connect(self, SIGNAL("restore_progress(QString)"), self.commit_text_edit.append)
|
||||
self.connect(self, SIGNAL("backup_progress(int)"), self.progress_bar.setValue)
|
||||
self.dir_line_edit.connect(self.dir_line_edit, SIGNAL("textChanged(QString)"), self.backup_location_changed)
|
||||
|
||||
self.select_dir_page.isComplete = self.has_selected_dir
|
||||
self.select_vms_page.isComplete = self.has_selected_vms
|
||||
@ -274,6 +275,14 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
|
||||
def has_selected_vms(self):
|
||||
return self.select_vms_widget.selected_list.count() > 0
|
||||
|
||||
def backup_location_changed(self, new_dir = None):
|
||||
if self.appvm_combobox.currentText() != "dom0" or \
|
||||
os.path.isfile(str(self.dir_line_edit.text())) or \
|
||||
os.path.isfile(os.path.join(str(self.dir_line_edit.text()), 'qubes.xml')):
|
||||
self.backup_location = str(self.dir_line_edit.text())
|
||||
else:
|
||||
self.backup_location = None
|
||||
self.select_dir_page.emit(SIGNAL("completeChanged()"))
|
||||
|
||||
|
||||
# Bases on the original code by:
|
||||
|
@ -78,6 +78,12 @@
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>132</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
@ -130,8 +136,20 @@
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Backup directory:</string>
|
||||
<string><html><head/><body><p>Backup directory:<br><span style=" font-size:8pt;">(for old backup format select qubes.xml file)</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user