backups: allow to select backup in old format (directory instead of file)
New backup is store in one file, but old one in a whole directory. While selecting old backup, the user need to point 'qubes.xml' file.
This commit is contained in:
parent
386c155dd5
commit
e1e60f692c
@ -186,8 +186,11 @@ def select_path_button_clicked(dialog, select_file = False):
|
|||||||
new_path = file_dialog_function(dialog, "Select backup location.", "~")
|
new_path = file_dialog_function(dialog, "Select backup location.", "~")
|
||||||
|
|
||||||
if new_path != None:
|
if new_path != None:
|
||||||
dialog.dir_line_edit.setText(new_path)
|
if os.path.basename(new_path) == 'qubes.xml':
|
||||||
dialog.backup_location = new_path
|
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:
|
if (new_path or new_appvm) and len(dialog.backup_location) > 0:
|
||||||
dialog.select_dir_page.emit(SIGNAL("completeChanged()"))
|
dialog.select_dir_page.emit(SIGNAL("completeChanged()"))
|
||||||
|
@ -78,6 +78,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>132</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
@ -130,8 +136,20 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>41</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user