backups: default file select state to previously selected directory
This commit is contained in:
parent
589f2e7eb7
commit
0b0297f129
@ -167,7 +167,7 @@ def dev_combobox_activated(dialog, idx):
|
||||
|
||||
|
||||
def select_path_button_clicked(dialog, select_file = False):
|
||||
dialog.backup_location = dialog.dir_line_edit.text()
|
||||
dialog.backup_location = str(dialog.dir_line_edit.text())
|
||||
file_dialog = QFileDialog()
|
||||
file_dialog.setReadOnly(True)
|
||||
|
||||
@ -183,13 +183,14 @@ def select_path_button_clicked(dialog, select_file = False):
|
||||
elif dialog.dev_mount_path != None:
|
||||
new_path = file_dialog_function(dialog, "Select backup location.", dialog.dev_mount_path)
|
||||
else:
|
||||
new_path = file_dialog_function(dialog, "Select backup location.", "~")
|
||||
new_path = file_dialog_function(dialog, "Select backup location.", dialog.backup_location)
|
||||
|
||||
if new_path != None:
|
||||
new_path = str(new_path)
|
||||
if os.path.basename(new_path) == 'qubes.xml':
|
||||
dialog.backup_location = os.path.dirname(str(new_path))
|
||||
dialog.backup_location = os.path.dirname(new_path)
|
||||
else:
|
||||
dialog.backup_location = str(new_path)
|
||||
dialog.backup_location = new_path
|
||||
dialog.dir_line_edit.setText(dialog.backup_location)
|
||||
|
||||
if (new_path or new_appvm) and len(dialog.backup_location) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user