[Pkg-privacy-commits] [tails-installer] 08/27: Have a better separation for different release categories

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


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

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

commit fc2d4ad080e33481881660fd2b8171478af74f6a
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Mar 1 14:15:00 2016 +0100

    Have a better separation for different release categories
---
 liveusb/components/DelegateImage.qml          |  99 +++++++++++++++++-------
 liveusb/components/DelegateImageSeparator.qml |  45 -----------
 liveusb/components/DownloadDialog.qml         |  87 ++++-----------------
 liveusb/components/ImageList.qml              |  60 ++++++++++-----
 liveusb/creator.py                            | 105 ++++++++++++--------------
 liveusb/gui.py                                |  44 +++++------
 liveusb/liveusb.qml                           |   2 +-
 liveusb/releases.py                           |  18 -----
 8 files changed, 202 insertions(+), 258 deletions(-)

diff --git a/liveusb/components/DelegateImage.qml b/liveusb/components/DelegateImage.qml
index d8fcc95..5583c0f 100644
--- a/liveusb/components/DelegateImage.qml
+++ b/liveusb/components/DelegateImage.qml
@@ -1,15 +1,27 @@
 import QtQuick 2.0
 
 Item {
+    id: root
     width: parent.width
     height: $(84)
+
+    readonly property bool isTop: !liveUSBData.releaseProxyModel.get(index-1) || release.category != liveUSBData.releaseProxyModel.get(index-1).category
+    readonly property bool isBottom: !liveUSBData.releaseProxyModel.get(index+1) || (release.category != liveUSBData.releaseProxyModel.get(index+1).category &&  !liveUSBData.releaseProxyModel.isFront)
+
+    readonly property color color: mouse.containsPress ? "#ededed" : mouse.containsMouse ? "#f8f8f8" : "white"
+
     Rectangle {
         width: parent.width - $(2)
-        height: index == 0 ? parent.height - $(1) : parent.height
+        //height: index == 0 ? parent.height - $(1) : parent.height
+        height: parent.height + 1
         x: $(1)
-        y: index == 0 ? $(1) : 0
-        radius: $(4)
-        color: "transparent"
+        //y: index == 0 ? $(1) : 0
+        //radius: $(4)
+        color: root.color
+        border {
+            color: "#c3c3c3"
+            width: 1
+        }
         Item {
             id: iconRect
             anchors {
@@ -72,33 +84,66 @@ Item {
             }
         }
         Rectangle {
-            height: 1
-            color: "#c3c3c3"
-            width: parent.width
-            anchors.bottom: parent.bottom
-        }
-        MouseArea {
-            anchors.fill: parent
-            hoverEnabled: true
-            onHoveredChanged: {
-                if (containsMouse && !pressed)
-                    parent.color = "#f8f8f8"
-                if (!containsMouse)
-                    parent.color = "transparent"
-            }
-            onClicked: {
-                root.currentIndex = index
-                root.stepForward(release.index)
+            id: topRounding
+            visible: root.isTop
+            height: $(5)
+            color: palette.window
+            clip: true
+            anchors {
+                left: parent.left
+                right: parent.right
+                top: parent.top
             }
-            onPressed: {
-                parent.color = "#ededed"
+            Rectangle {
+                height: $(10)
+                radius: $(5)
+                color: root.color
+                border {
+                    color: "#c3c3c3"
+                    width: $(1)
+                }
+                anchors {
+                    left: parent.left
+                    right: parent.right
+                    top: parent.top
+                }
             }
-            onReleased: {
-                parent.color = "transparent"
+        }
+        Rectangle {
+            id: bottomRounding
+            visible: root.isBottom
+            height: $(5)
+            color: palette.window
+            clip: true
+            anchors {
+                left: parent.left
+                right: parent.right
+                bottom: parent.bottom
             }
-            onCanceled: {
-                parent.color = "transparent"
+            Rectangle {
+                height: $(10)
+                radius: $(5)
+                color: root.color
+                border {
+                    color: "#c3c3c3"
+                    width: $(1)
+                }
+                anchors {
+                    left: parent.left
+                    right: parent.right
+                    bottom: parent.bottom
+                }
             }
         }
     }
+
+    MouseArea {
+        id: mouse
+        anchors.fill: parent
+        hoverEnabled: true
+        onClicked: {
+            imageList.currentIndex = index
+            imageList.stepForward(release.index)
+        }
+    }
 }
diff --git a/liveusb/components/DelegateImageSeparator.qml b/liveusb/components/DelegateImageSeparator.qml
deleted file mode 100644
index d34fce7..0000000
--- a/liveusb/components/DelegateImageSeparator.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Layouts 1.0
-
-Rectangle {
-    id: root
-
-    color: "#12000000"
-    width: parent.width
-    height: $(32)
-    Behavior on height {
-        NumberAnimation {
-            duration: 60
-        }
-    }
-
-    RowLayout {
-        anchors.fill: parent
-        anchors.leftMargin: 32
-        spacing: 12
-        Text {
-            Layout.alignment: Qt.AlignVCenter
-            font.pixelSize: $(12)
-            text: release.name
-        }
-        Text {
-            Layout.fillWidth: true
-            Layout.alignment: Qt.AlignVCenter
-            text: release.summary
-            font.pixelSize: $(12)
-            color: "#707070"
-            Behavior on opacity {
-                NumberAnimation {
-                    duration: 60
-                }
-            }
-        }
-    }
-    Rectangle {
-        height: 1
-        color: "#c3c3c3"
-        width: parent.width
-        anchors.bottom: parent.bottom
-    }
-}
-
diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index b9ebeeb..9888053 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -6,7 +6,7 @@ import QtQuick.Window 2.0
 
 Dialog {
     id: root
-    title: qsTranslate("", "Write %1 to USB").arg(liveUSBData.currentImage.name)
+    title: qsTranslate("", "Write %1").arg(liveUSBData.currentImage.name)
 
     height: layout.height + $(56)
     standardButtons: StandardButton.NoButton
@@ -183,6 +183,20 @@ Dialog {
                                 progressColor: liveUSBData.currentImage.writer.checking ? Qt.lighter("green") : "red"
                             }
                         }
+                        AdwaitaCheckBox {
+                            id: writeImmediately
+                            enabled: driveCombo.count
+                            opacity: liveUSBData.currentImage.download.running && liveUSBData.currentImage.download.progress / liveUSBData.currentImage.download.maxProgress < 0.95 ? 1.0 : 0.0
+                            property bool confirmed: false
+                            text: qsTranslate("", "Write the image immediately when the download is finished")
+                            onCheckedChanged: {
+                                liveUSBData.currentImage.writer.finished = true
+                                if (checked)
+                                    acceptButton.pressedOnce = true
+                                else
+                                    acceptButton.pressedOnce = false
+                            }
+                        }
                     }
 
                     RowLayout {
@@ -230,6 +244,7 @@ Dialog {
                             }
                         }
                         AdwaitaComboBox {
+                            id: driveCombo
                             Layout.preferredWidth: implicitWidth * 2.5
                             model: liveUSBData.usbDriveNames
                             currentIndex: liveUSBData.currentDrive
@@ -272,39 +287,6 @@ Dialog {
                             height: acceptButton.height
                             width: parent.width
                             spacing: $(10)
-                            AdwaitaButton  {
-                                id: optionGroup
-                                implicitHeight: parent.height / 8 * 5
-                                implicitWidth: parent.height / 8 * 5
-                                Layout.alignment: Qt.AlignVCenter
-                                checkable: true
-                                checked: false
-                                enabled: liveUSBData.optionNames && liveUSBData.optionNames[0] && !liveUSBData.currentImage.writer.running
-                                onEnabledChanged: {
-                                    if (!liveUSBData.currentImage.writer.running)
-                                        checked = false
-                                }
-                                Text {
-                                    anchors.fill: parent
-                                    horizontalAlignment: Text.AlignHCenter
-                                    verticalAlignment: Text.AlignVCenter
-                                    text: "+"
-                                    font.bold: true
-                                    font.pixelSize: $(16)
-                                }
-                            }
-
-                            Text {
-                                Layout.fillHeight: true
-                                verticalAlignment: Text.AlignVCenter
-                                text: qsTranslate("", "Options")
-                                enabled: optionGroup.enabled
-                                font.pixelSize: $(12)
-                                MouseArea {
-                                    anchors.fill: parent
-                                    onClicked: optionGroup.checked = !optionGroup.checked
-                                }
-                            }
 
                             Item {
                                 Layout.fillWidth: true
@@ -417,43 +399,6 @@ Dialog {
                                 }
                             }
                         }
-                        Column {
-                            id: advancedOptions
-                            spacing: $(6)
-                            Repeater {
-                                id: groupLayoutRepeater
-                                model: optionGroup.checked ? liveUSBData.optionValues : null
-                                AdwaitaCheckBox {
-                                    checked: liveUSBData.optionValues[index]
-                                    enabled: !liveUSBData.currentImage.writer.running
-                                    height: implicitHeight
-                                    width: implicitWidth
-                                    text: liveUSBData.optionNames[index]
-                                    onClicked: {
-                                        liveUSBData.currentImage.writer.finished = false
-                                        if (!writeImmediately.checked)
-                                            acceptButton.pressedOnce = false
-                                        liveUSBData.setOption(index, checked)
-                                    }
-                                }
-                            }
-                            // It's better to have this one separately to have the confirmation clearer
-                            AdwaitaCheckBox {
-                                id: writeImmediately
-                                height: optionGroup.checked ? implicitHeight : 0
-                                visible: optionGroup.checked
-                                width: implicitWidth
-                                property bool confirmed: false
-                                text: qsTranslate("", "Write the image immediately when the download is finished")
-                                onCheckedChanged: {
-                                    liveUSBData.currentImage.writer.finished = true
-                                    if (checked)
-                                        acceptButton.pressedOnce = true
-                                    else
-                                        acceptButton.pressedOnce = false
-                                }
-                            }
-                        }
                     }
                 }
             }
diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
index b96edc7..7d6206a 100644
--- a/liveusb/components/ImageList.qml
+++ b/liveusb/components/ImageList.qml
@@ -4,7 +4,7 @@ import QtQuick.Controls.Styles 1.3
 import QtQuick.Layouts 1.1
 
 Item {
-    id: root
+    id: imageList
 
     property alias currentIndex: osListView.currentIndex
     property real fadeDuration: 200
@@ -98,7 +98,7 @@ Item {
         opacity: !liveUSBData.releaseProxyModel.isFront ? 1.0 : 0.0
         Behavior on opacity {
             NumberAnimation {
-                duration: root.fadeDuration
+                duration: imageList.fadeDuration
             }
         }
 
@@ -134,7 +134,7 @@ Item {
         z: -1
         clip: true
         radius: $(6)
-        color: "white"
+        color: "transparent"
         y: liveUSBData.releaseProxyModel.isFront || moveUp.running ? parent.height / 2 - height / 2 : $(54)
         Behavior on y {
             id: moveUp
@@ -149,7 +149,7 @@ Item {
         height: liveUSBData.releaseProxyModel.isFront ? $(84) * 3 + $(36) : parent.height
 
         /*Behavior on height {
-            NumberAnimation { duration: root.fadeDuration }
+            NumberAnimation { duration: imageList.fadeDuration }
         }*/
         anchors {
             left: parent.left
@@ -157,10 +157,12 @@ Item {
             rightMargin: mainWindow.margin
             leftMargin: anchors.rightMargin
         }
+        /*
         border {
             color: "#c3c3c3"
             width: 1
         }
+        */
     }
 
     ScrollView {
@@ -177,6 +179,28 @@ Item {
                 rightMargin: anchors.leftMargin - (fullList.width - fullList.viewport.width)
                 topMargin: whiteBackground.y
             }
+
+            section {
+                property: "release.category"
+                criteria: ViewSection.FullString
+                labelPositioning: ViewSection.InlineLabels
+                delegate: Item {
+                    height: section.length > 0 ? $(64) : 0
+                    width: parent.width
+                    Text {
+                        text: section
+                        textFormat: Text.RichText
+                        font.pixelSize: $(12)
+                        anchors {
+                            left: parent.left
+                            bottom: parent.bottom
+                            leftMargin: $(18)
+                            bottomMargin: $(12)
+                        }
+                    }
+                }
+            }
+
             footer: Item {
                 height: !liveUSBData.releaseProxyModel.isFront ? $(54) : $(36)
                 width: osListView.width
@@ -186,6 +210,18 @@ Item {
                     anchors.fill: parent
                     anchors.margins: 1
                     radius: 3
+                    color: palette.window
+                    Rectangle {
+                        anchors.fill: parent
+                        anchors.topMargin: $(-10)
+                        color: mouse.containsPress ? "#ededed" : mouse.containsMouse ? "#f8f8f8" : "white"
+                        radius: $(5)
+                        border {
+                            color: "#c3c3c3"
+                            width: $(1)
+                        }
+                    }
+
                     Column {
                         id: threeDotDots
                         property bool hidden: false
@@ -220,15 +256,14 @@ Item {
                         }
                     }
                     MouseArea {
+                        id: mouse
                         anchors.fill: parent
                         hoverEnabled: true
                         onHoveredChanged: {
                             if (containsMouse && !pressed) {
-                                parent.color = "#f8f8f8"
                                 threeDotTimer.start()
                             }
                             if (!containsMouse) {
-                                parent.color = "transparent"
                                 threeDotTimer.stop()
                                 threeDotDots.hidden = false
                             }
@@ -237,23 +272,14 @@ Item {
                             moveUp.enabled = true
                             liveUSBData.releaseProxyModel.isFront = false
                         }
-                        onPressed: {
-                            parent.color = "#ededed"
-                        }
-                        onReleased: {
-                            parent.color = "transparent"
-                        }
-                        onCanceled: {
-                            parent.color = "transparent"
-                        }
                     }
                 }
             }
 
             model: liveUSBData.releaseProxyModel
-            delegate: Loader {
+
+            delegate: DelegateImage {
                 width: parent.width
-                source: release.isSeparator ? "DelegateImageSeparator.qml" : "DelegateImage.qml"
             }
 
             remove: Transition {
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 6058607..1b84774 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -54,6 +54,7 @@ class Drive(object):
     device = ''
     size = 0
     type = 'usb'  # so far only this, mmc/sd in the future
+    mount = []
     isIso9660 = False
 
 
@@ -63,7 +64,6 @@ class LiveUSBCreator(object):
     iso = None  # the path to our live image
     drives = {}  # {device: {'label': label, 'mount': mountpoint}}
     dest = None  # the mount point of of our selected drive
-    uuid = None  # the uuid of our selected drive
     pids = []  # a list of pids of all of our subprocesses
     output = StringIO()  # log subprocess output in case of errors
     isosize = 0  # the size of the selected iso
@@ -213,7 +213,6 @@ class LiveUSBCreator(object):
                 raise LiveUSBError(_("Cannot find device %s" % drive))
         self.log.debug("%s selected: %s" % (drive, self.drives[drive]))
         self._drive = drive
-        self.uuid = self.drives[drive].uuid
 
     def get_proxies(self):
         """ Return a dictionary of proxy settings """
@@ -467,46 +466,45 @@ class MacOsLiveUSBCreator(LiveUSBCreator):
 class WindowsLiveUSBCreator(LiveUSBCreator):
 
     def detect_removable_drives(self, callback=None):
-        import win32file, win32api, pywintypes
         self.drives = {}
         self.callback = callback
 
         def detect():
-            d = {}
-            for drive in [l + ':' for l in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']:
-                try:
-                    if win32file.GetDriveType(drive) == win32file.DRIVE_REMOVABLE or \
-                                    drive == self.opts.force:
-                        vol = [None]
-                        try:
-                            vol = win32api.GetVolumeInformation(drive)
-                        except pywintypes.error, e:
-                            self.log.error(_('Unable to get GetVolumeInformation(%r): %r') % (drive, e))
-                            continue
-                        d[drive] = {
-                            'label': vol[0],
-                            'mount': drive,
-                            'uuid': self._get_device_uuid(drive),
-                            'free': self.get_free_bytes(drive) / 1024 ** 2,
-                            'fstype': 'vfat',
-                            'device': drive,
-                            'fsversion': vol[-1],
-                            'size': self._get_device_size(drive)
-                        }
-                except Exception, e:
-                    self.log.exception(e)
-                    self.log.error(_("Error probing device"))
-            self.drives = d
-            # if callback:
-            #    callback()
-
-            self.drive_callback()
+            import wmi
+            c = wmi.WMI()
+            drives = {}
+            for d in c.Win32_DiskDrive():
+                if 7 not in d.Capabilities or 'USB' != d.InterfaceType: # does not support removable media
+                    continue
+
+                data = Drive()
+                data.device = str(d.Index)
+                data.friendlyName = unicode(d.Caption).encode('utf-8').replace(' USB Device', '')
+                data.size = float(d.Size)
+
+                for p in d.associators('Win32_DiskDriveToDiskPartition'):
+                    for l in p.associators('Win32_LogicalDiskToPartition'):
+                        data.mount.append(unicode(l.DeviceID).encode('utf-8'))
+
+                data.isIso9660 = not data.mount
+
+                drives[unicode(d.Name).encode('utf-8')] = data
+
+            changed = False
+            if self.drives != drives:
+                changed = True
+            self.drives = drives
+            if changed and self.callback:
+                self.callback()
 
         if callback:
             from PyQt5.QtCore import QObject, QTimer, pyqtSlot
             """
             A helper class for the UI to detect the drives periodically, not only when started.
             In contrary to the rest of this code, it utilizes Qt - to be able to use the UI event loop
+
+            TODO: I found no other _clean_ and reliable way to do this. WMI provides some kind of drive and device
+            watchers. Those however seem to break the Python interpreter, at least on the Windows machine I use.
             """
 
             class DriveWatcher(QObject):
@@ -521,7 +519,6 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
                 @pyqtSlot()
                 def doWork(self):
                     self.work()
-                    self.callback()
 
             self.watcher = DriveWatcher(callback, detect)
 
@@ -529,28 +526,37 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
 
     def dd_image(self, update_function=None):
         import re
-        if self.drive['mount']:
-            mountvol = subprocess.Popen(['mountvol', self.drive['mount'], '/d'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+        if update_function:
+            update_function(-1.0)
+
+        for i in self.drive.mount:
+            mountvol = subprocess.Popen(['mountvol', i, '/d'], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
             mountvol.wait()
 
-        diskpart = subprocess.Popen(['diskpart'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-        diskpart.communicate('select disk '+self.drive['index']+'\r\nclean\r\nexit')
+        diskpart = subprocess.Popen(['diskpart'], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        diskpart.communicate('select disk '+self.drive.device+'\r\nclean\r\nexit')
         diskpart.wait()
         if diskpart.returncode != 0:
-            self.log("Diskpart exited with a nonzero status")
+            self.log('Diskpart exited with a nonzero status')
             return
 
-        dd = subprocess.Popen(['dd', 'bs=1M', 'if='+self.iso, 'of=\\\\.\\PHYSICALDRIVE'+self.drive['index']], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        if update_function:
+            update_function(0.0)
+        dd = subprocess.Popen([os.path.dirname(sys.argv[0])+'/tools/dd.exe', 'bs=1M', 'if='+self.iso, 'of=\\\\.\\PHYSICALDRIVE'+self.drive.device], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         if update_function:
             while dd.poll() is None:
                 buf = dd.stdout.read(256)
-                r = re.match('^[^ ]+ ([0-9]+)\%')
+                r = re.match(buf, '^[^ ]+ ([0-9]+)%')
                 if r:
-                    update_function(int(r.group(1)))
+                    update_function(float(r.group(1)/100.0))
+        else:
+            dd.wait()
 
 
 
         """
+        Notes to self:
         To write the image:
 
         mountvol d: /d
@@ -600,23 +606,6 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
             self.log.error("Unable to get Win32_LogicalDisk")
         return obj
 
-    def _get_device_uuid(self, drive):
-        """ Return the UUID of our selected drive """
-        if self.uuid:
-            return self.uuid
-        uuid = None
-        try:
-            uuid = self._get_win32_logicaldisk(drive).VolumeSerialNumber
-            if uuid in (None, 'None', ''):
-                uuid = None
-            else:
-                uuid = uuid[:4] + '-' + uuid[4:]
-            self.log.debug(_("Found UUID %s for %s") % (uuid, drive))
-        except Exception, e:
-            self.log.exception(e)
-            self.log.warning(_("Exception while fetching UUID: %r") % e)
-        return uuid
-
     def _get_device_size(self, drive):
         """ Return the size of the given drive """
         size = None
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 14f1f6f..5acbb53 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -401,13 +401,13 @@ class Release(QObject):
         self._warning = []
         self._error = []
 
+        self.addWarning(_('You are about to perform a destructive install. This will erase all data and partitions on your USB drive'))
+
         self._download = ReleaseDownload(self)
         self._download.pathChanged.connect(self.pathChanged)
 
         self._writer = ReleaseWriter(self)
 
-        self._download.runningChanged.connect(self.inspectDestination)
-
         self.pathChanged.connect(self.statusChanged)
         self._download.runningChanged.connect(self.statusChanged)
         self._writer.runningChanged.connect(self.statusChanged)
@@ -424,27 +424,16 @@ class Release(QObject):
 
     @pyqtSlot()
     def write(self):
+        self._info = []
         self._warning = []
         self._error = []
-        self.errorChanged.emit()
-        self.warningChanged.emit()
-        self._writer.run()
-
-    @pyqtSlot()
-    def inspectDestination(self):
-        if self._writer.running:
-            return
-        self._warning = []
-        self.warningChanged.emit()
-        self._info = []
         self.infoChanged.emit()
-        self._error = []
         self.errorChanged.emit()
+        self.warningChanged.emit()
 
-        if not self.live.drive:
-            return
+        self.addInfo(_('You can use Fedora Media Writer to restore the original size of your flash drive after you will have tried or installed Fedora.'))
 
-        self.addWarning(_('You are about to perform a destructive install. This will erase all data and partitions on your USB drive'))
+        self._writer.run()
 
     @pyqtProperty(int, constant=True)
     def index(self):
@@ -501,6 +490,17 @@ class Release(QObject):
     def description(self):
         return self._data['description']
 
+    @pyqtProperty(str, constant=True)
+    def category(self):
+        if self._data['source'] in ['Local', 'Fedora Workstation', 'Fedora Server']:
+            return ''
+        elif self._data['source'] == 'Spins':
+            return '<b>Fedora Spins </b>   Alternative desktops for Fedora'
+        elif self._data['source'] == 'Labs':
+            return '<b>Fedora Labs </b>   Functional bundles for Fedora'
+        else:
+            return '<b>Other</b>'
+
     @pyqtProperty(bool, constant=True)
     def isLocal(self):
         return self._data['source'] == 'Local'
@@ -620,6 +620,12 @@ class ReleaseListProxy(QSortFilterProxyModel):
         QSortFilterProxyModel.__init__(self, parent)
         self.setSourceModel(sourceModel)
 
+    @pyqtSlot(int, result=Release)
+    def get(self, i):
+        if i < 0 or i >= len(self.parent().releaseData):
+            return None
+        return self.parent().releaseData[i]
+
     def rowCount(self, parent=QModelIndex()):
         if self._frontPage and self.sourceModel().rowCount(parent) > 3:
             return 3
@@ -734,7 +740,6 @@ class LiveUSBData(QObject):
                                             release
                                     ))
         self._usbDrives = []
-        self.currentDriveChanged.connect(self.currentImage.inspectDestination)
 
         self.live.detect_removable_drives(callback=self.USBDeviceCallback)
 
@@ -789,10 +794,8 @@ class LiveUSBData(QObject):
     @currentIndex.setter
     def currentIndex(self, value):
         if value != self._currentIndex:
-            self.currentDriveChanged.disconnect(self.currentImage.inspectDestination)
             self._currentIndex = value
             self.currentImageChanged.emit()
-            self.currentDriveChanged.connect(self.currentImage.inspectDestination)
 
     @pyqtProperty(Release, notify=currentImageChanged)
     def currentImage(self):
@@ -847,7 +850,6 @@ class LiveUSBData(QObject):
         if self._optionValues[key] != value:
             self._optionValues[key] = value
             self.optionsChanged.emit()
-            self.currentImage.inspectDestination()
 
     @pyqtSlot()
     def option(self, index):
diff --git a/liveusb/liveusb.qml b/liveusb/liveusb.qml
index a7e7729..a2d5683 100644
--- a/liveusb/liveusb.qml
+++ b/liveusb/liveusb.qml
@@ -13,7 +13,7 @@ ApplicationWindow {
     minimumHeight: $(480)
     width: $(800)
     height: $(480)
-    title: qsTranslate("", "Fedora LiveUSB Creator")
+    title: qsTranslate("", "Fedora Media Writer")
 
     SystemPalette {
         id: palette
diff --git a/liveusb/releases.py b/liveusb/releases.py
index e1dccbf..0b85405 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -287,15 +287,6 @@ fedora_releases =  [{'description': u"<p>Fedora Workstation is a reliable, user-
   'summary': u'Pick a file from your drive(s)',
   'variants': {'': {'sha256': '', 'size': 0, 'url': ''}},
   'version': ''},
- {'description': '',
-  'logo': '',
-  'name': 'Fedora Spins',
-  'releaseDate': '',
-  'screenshots': [],
-  'source': '',
-  'summary': 'Alternative desktops for Fedora',
-  'variants': {},
-  'version': ''},
  {'description': u'<p>The Fedora KDE Plasma Desktop Edition is a powerful Fedora-based operating system utilizing the KDE Plasma Desktop as the main user interface.</p><p>Fedora KDE Plasma Desktop comes with many pre-selected top quality applications that suit all modern desktop use cases - from online communication like web browsing, instant messaging and electronic mail correspondence, through multimedia and entertainment, to an advanced productivity suite, including office application [...]
   'logo': 'qrc:/logo_plasma',
   'name': 'Fedora KDE Plasma Desktop',
@@ -380,15 +371,6 @@ fedora_releases =  [{'description': u"<p>Fedora Workstation is a reliable, user-
                           'size': 732954624,
                           'url': 'https://download.fedoraproject.org/pub/fedora/linux/releases/23/Live/x86_64/Fedora-Live-SoaS-x86_64-23-10.iso'}},
   'version': '23'},
- {'description': '',
-  'logo': '',
-  'name': 'Fedora Labs',
-  'releaseDate': '',
-  'screenshots': [],
-  'source': '',
-  'summary': 'Functional bundles for Fedora',
-  'variants': {},
-  'version': ''},
  {'description': u'<p>Looking for a ready-to-go desktop environment brimming with free and open source multimedia production and publishing tools? Try the Design Suite, a Fedora Spin created by designers, for designers.</p><p>The Design Suite includes the favorite tools of the Fedora Design Team. These are the same programs we use to create all the artwork that you see within the Fedora Project, from desktop backgrounds to CD sleeves, web page designs, application interfaces, flyers, pos [...]
   'logo': 'qrc:/logo_design',
   'name': 'Fedora Design Suite',

-- 
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