aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2021-01-01 21:54:33 +0100
committerPapoteur <papoteur@mageia.org>2021-01-01 21:54:33 +0100
commita6368e5c2cfe9e50051418df2ed93a2410ec6143 (patch)
tree1eb5ad8b0dc551f8f936ce54423ee0271118dde6 /lib
parentececde71973467c60b34677b60824f0c6e1f30bb (diff)
downloadisodumper-a6368e5c2cfe9e50051418df2ed93a2410ec6143.tar
isodumper-a6368e5c2cfe9e50051418df2ed93a2410ec6143.tar.gz
isodumper-a6368e5c2cfe9e50051418df2ed93a2410ec6143.tar.bz2
isodumper-a6368e5c2cfe9e50051418df2ed93a2410ec6143.tar.xz
isodumper-a6368e5c2cfe9e50051418df2ed93a2410ec6143.zip
Improve interface, name of persistent partition is editable
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index e22d793..4c3fa6b 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -293,6 +293,7 @@ class IsoDumper(basedialog.BaseDialog):
self.initial_state()
def initial_state(self):
+ self.image_is_selected = False
self.backup_select.setDisabled()
self.backup_cbox.setDisabled()
self.partition_cbox.setDisabled()
@@ -389,7 +390,7 @@ class IsoDumper(basedialog.BaseDialog):
def do_write(self):
self.wip_unsensitive()
- self.writebt.setDisabled()
+ #self.writebt.setDisabled()
self.devicelist.setDisabled()
self.backup_select.setDisabled()
self.progress.setEnabled()
@@ -412,7 +413,6 @@ class IsoDumper(basedialog.BaseDialog):
else:
return
self.ima.setDisabled()
- self.writebt.setDisabled()
#: don't translate source or target
self.progress.setLabel(_('Writing {source} to {target}').format(source=source.split('/')[-1],
target=target.split('/')[-1]))
@@ -458,7 +458,7 @@ class IsoDumper(basedialog.BaseDialog):
self.logger(message)
logging.info(message)
# Add persistent partition if asked
- if self.persistencecb.isChecked():
+ if self.partition_cbox.isChecked() and self.partition_cb.value() == _("Persistent partition"):
self.progress.setLabel(_("Adding persistent partition"))
self.progress.setValue(0)
if self.cryptcb.isChecked():
@@ -467,7 +467,7 @@ class IsoDumper(basedialog.BaseDialog):
self.logger(message)
logging.warning(message)
else:
- iface.do_persistence(target, "mgalive-persist", self.cryptkey.value())
+ iface.do_persistence(target, self.partition_label.value(), self.cryptkey.value())
while not iface.done:
progress = iface.progress
self.progress.setValue(progress)
@@ -481,7 +481,7 @@ class IsoDumper(basedialog.BaseDialog):
else:
self.logger(iface.message)
else:
- iface.do_persistence(target, "mgalive-persist", "")
+ iface.do_persistence(target, self.partition_label.value(), "")
while not iface.done:
progress = iface.progress
self.progress.setValue(progress)
@@ -809,7 +809,10 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
self.dialog.recalcLayout()
self.start_bt.setEnabled()
self.activate_devicelist()
+ self.image_is_selected = True
#self.persistencecb.setEnabled()
+ else:
+ self.image_is_selected = False
def select_backup(self):
if self.backup_cbox.isChecked():
@@ -834,6 +837,8 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
def select_partition_type(self):
if self.partition_cb.value() in ("ext4" ,"Persistent partition"):
self.cryptcb.setEnabled()
+ if self.partition_cb.value() == "Persistent partition":
+ self.partition_label.setValue("mgalive-persist")
if self.partition_cb.value() != "":
self.start_bt.setEnabled()
else: