[Pkg-privacy-commits] [tails-installer] 58/210: Fixed writing, tweaked disabling of UI elements

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.

commit 7303856c8576c064c3965be078ff64e52a14b54c
Author: Martin Briza <mbriza at redhat.com>
Date:   Wed Apr 8 11:12:25 2015 +0200

    Fixed writing, tweaked disabling of UI elements
---
 liveusb/components/DownloadDialog.qml | 3 ++-
 liveusb/gui.py                        | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index f3c9c6a..2c98355 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -157,13 +157,14 @@ Dialog {
                             flat: true
                             checked: false
                             checkable: true
-                            enabled: liveUSBData.optionNames && liveUSBData.optionNames[0]
+                            enabled: liveUSBData.optionNames && liveUSBData.optionNames[0] && !liveUSBData.currentImage.writer.running
                             ColumnLayout {
                                 Repeater {
                                     id: groupLayoutRepeater
                                     model: group.checked ? liveUSBData.optionValues : null
                                     CheckBox {
                                         checked: liveUSBData.optionValues[index]
+                                        enabled: !liveUSBData.currentImage.writer.running
                                         height: 20
                                         width: 20
                                         text: liveUSBData.optionNames[index]
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 67baa71..6aca6d8 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -219,7 +219,7 @@ class ReleaseWriterThread(QThread):
         #self.live.log.addHandler(handler)
         now = datetime.now()
         try:
-            if self._useDD:
+            if self.parent.release.liveUSBData.option('dd'):
                 self.ddImage(now)
             else:
                 self.copyImage(now)
@@ -313,6 +313,7 @@ class ReleaseWriter(QObject):
     def __init__(self, parent):
         QObject.__init__(self, parent)
         self.live = parent.live
+        self.release = parent
         self.progressWatcher = ReleaseWriterProgressThread(self)
         self.worker = ReleaseWriterThread(self, self.progressWatcher)
 
@@ -405,6 +406,7 @@ class Release(QObject):
 
         self._index = index
         self.live = live
+        self.liveUSBData = parent
         self._name = name.replace('_', ' ')
         self._logo = logo
         self._size = size
@@ -470,7 +472,7 @@ class Release(QObject):
         self._warning = []
         self.info = []
         if self.parent().option('dd'):
-            self.addWarning(_("You are about to perform a destructive install. This will destroy all data and partitions on your USB drive"))
+            self.addWarning(_("You are about to perform a destructive install. This will erase all data and partitions on your USB drive"))
         if self.live.blank_mbr():
             self.addInfo(_("The Master Boot Record on your device is blank. Writing the image will reset the MBR on this device"))
         elif not self.live.mbr_matches_syslinux_bin() and not self.parent().option('resetMBR'):
@@ -490,7 +492,6 @@ class Release(QObject):
 
         if self.live.existing_liveos():
             self.addWarning(_("Your device already contains a live OS. If you continue, it will be overwritten."))
-            #TODO
 
         self.live.verify_filesystem()
         if not self.live.drive['uuid'] and not self.live.label:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list