[Pkg-privacy-commits] [tails-installer] 26/210: Download the images, amongst other less important changes

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:24 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 6ae0339cf89c735453f7fa6176d7dd0861c0fb1c
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Feb 24 13:51:11 2015 +0100

    Download the images, amongst other less important changes
---
 data/logo-fedora.svg                  |  36 ++++++++
 data/logo-lxde.png                    | Bin 0 -> 34910 bytes
 data/logo-plasma5.png                 | Bin 0 -> 23345 bytes
 data/logo-xfce.svg                    |  46 ++++++++++
 liveusb/components/DownloadDialog.qml |  21 +++--
 liveusb/components/ImageDetails.qml   |  20 ++--
 liveusb/components/ImageList.qml      |   1 +
 liveusb/gui.py                        | 168 +++++++++++++++++++++++++++-------
 liveusb/liveusb.qml                   |   4 +-
 9 files changed, 245 insertions(+), 51 deletions(-)

diff --git a/data/logo-fedora.svg b/data/logo-fedora.svg
new file mode 100644
index 0000000..40668e2
--- /dev/null
+++ b/data/logo-fedora.svg
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   version="1.0"
+   width="267"
+   height="267"
+   id="svg2">
+  <defs
+     id="defs5" />
+  <path
+     d="M 266.62575,133.50613 C 266.62575,59.98128 207.02222,0.37583 133.49792,0.37583 C 60.00668,0.37583 0.42639,59.93123 0.37425,133.41225 L 0.37425,236.4333 C 0.4138,253.11763 13.94545,266.62417 30.64027,266.62417 L 133.55192,266.62417 C 207.05167,266.59532 266.62575,207.01142 266.62575,133.50613"
+     id="voice"
+     style="fill:#294172" />
+  <path
+     d="M 77.126289,142.09756 C 77.126289,142.09756 124.97104,142.09756 124.97104,142.09756 C 124.97104,142.09756 124.97104,189.94234 124.97104,189.94234 C 124.97104,216.35263 103.53659,237.78707 77.126289,237.78707 C 50.715979,237.78707 29.28153,216.35263 29.28153,189.94234 C 29.28153,163.53203 50.715979,142.09756 77.126289,142.09756 z"
+     id="in"
+     style="fill:none;stroke:#3c6eb4;stroke-width:29.21" />
+  <use
+     transform="matrix(-1,0,0,-1,249.71151,284.2882)"
+     id="finity"
+     xlink:href="#in" />
+  <path
+     d="M 139.6074,127.52923 L 139.6074,189.87541 C 139.6074,224.37943 111.63203,252.35541 77.12679,252.35541 C 71.89185,252.35541 68.1703,251.7644 63.32444,250.49771 C 56.25849,248.64859 50.48398,242.85518 50.48158,236.1166 C 50.48158,227.97147 56.39394,222.0467 65.23187,222.0467 C 69.43824,222.0467 70.96454,222.85435 77.12679,222.85435 C 95.3184,222.85435 110.07443,208.11916 110.10634,189.92756 L 110.10634,161.27099 C 110.10634,158.70324 108.01971,156.62274 105.44767,156.62274 L 83.782 [...]
+     id="free"
+     style="fill:#ffffff" />
+  <use
+     transform="matrix(-1,0,0,-1,249.71152,284.28821)"
+     id="dom"
+     xlink:href="#free" />
+  <path
+     d="M 243.65456,243.58425 C 243.65456,243.58425 243.6546,238.05286 243.6546,238.05286 L 241.12607,243.85062 C 241.12607,243.85062 238.66466,238.05286 238.66466,238.05286 L 238.66513,243.58425 L 237.24683,243.58425 L 237.24683,234.84933 L 238.73387,234.84933 C 238.73387,234.84933 241.16784,240.42984 241.16784,240.42984 L 243.56495,234.84933 L 245.07039,234.84933 L 245.07039,243.58425 L 243.65456,243.58425 z M 233.32154,236.31241 L 233.32154,243.58425 L 231.83941,243.58425 L 231.83941, [...]
+     id="TM"
+     style="fill:#3c6eb4" />
+</svg>
\ No newline at end of file
diff --git a/data/logo-lxde.png b/data/logo-lxde.png
new file mode 100644
index 0000000..2ee06fc
Binary files /dev/null and b/data/logo-lxde.png differ
diff --git a/data/logo-plasma5.png b/data/logo-plasma5.png
new file mode 100644
index 0000000..b467f50
Binary files /dev/null and b/data/logo-plasma5.png differ
diff --git a/data/logo-xfce.svg b/data/logo-xfce.svg
new file mode 100644
index 0000000..0ba85bd
--- /dev/null
+++ b/data/logo-xfce.svg
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="176"
+   height="91"
+   id="svg1">
+  <path
+     d="m 1.6218838,0.91587741 c 0.538,-0.09 13.9530002,6.991 22.9700002,9.4379996 16.079,4.109 30.756,16.476 37.85,23.58 0.526,0.608 6.093,-4.168 11.919,-3.824 7.958,0.482 32.581996,7.406 35.871996,2.691 1.995,-2.768 1.852,-6.164 4.341,-7.555 1.34,-0.375 -4.981,-11.936 1.737,-15.64 4.79,-2.3939996 8.849,11.009 10.079,12.511 0.551,0.672 3.474,0.836 3.128,-0.695 -0.375,-1.663 -5.103,-14.5239996 0.695,-16.6819996 9.417,-3.729 7.748,16.4559996 7.993,17.0299996 0.521,1.222 32.797,2.164 34.75 [...]
+     id="path14"
+     style="fill:#020202;stroke:#000002;stroke-width:1pt" />
+  <path
+     d="m 139.93424,49.143277 c -0.169,-0.59 10.503,-7.045 12.048,-5.561 2.781,1.008 -11.95,6.31 -12.048,5.561 z"
+     id="path7"
+     style="fill:#ffffff;stroke:#000000;stroke-width:0.6pt" />
+  <path
+     d="m 145.03124,55.013277 c -0.94,-0.568 6.389,-9.114 8.187,-8.187 2.625,2.608 -8.31,8.39 -8.187,8.187 z"
+     id="path8"
+     style="fill:#ffffff;stroke:#000000;stroke-width:0.6pt" />
+  <path
+     d="m 173.91624,15.470277 c -0.891,-0.737 -7.878,10.287 -6.333,11.431 0.929,0.695 6.731,-11.038 6.333,-11.431 z"
+     id="path13"
+     style="fill:#020202;stroke:#000000;stroke-width:0.6pt" />
+  <ellipse
+     cx="288.86475"
+     cy="374.58655"
+     rx="3.012037"
+     ry="3.398196"
+     transform="matrix(0.9253,0,0,0.933788,-124.97146,-318.53572)"
+     id="ellipse17"
+     style="fill:#ffffff;stroke:#000000;stroke-width:0.6pt" />
+  <path
+     d="m 165.88414,13.925647 c -0.441,-0.512 -2.781,11.368 -1.699,11.894 0.929,0.695 2.547,-11.276 1.699,-11.894 z"
+     id="path18"
+     style="fill:#020202;stroke:#000000;stroke-width:0.6pt" />
+  <path
+     d="m 136.05934,30.003277 c -2.771,1.959 1.521,13.045 8.58,6.572 -5.546,0.163 -7.396,-1.461 -8.58,-6.572 z"
+     id="path21"
+     style="fill:#ffffff;stroke:#000000;stroke-width:0.6pt" />
+</svg>
\ No newline at end of file
diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index 20203b8..d9b720f 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -27,18 +27,24 @@ Dialog {
                 Layout.fillWidth: true
                 width: layout.width
                 wrapMode: Text.WordWrap
-                text: "Writing the image of Fedora Workstation will delete everything that's currently on the drive."
+                text: "Writing the image of " + liveUSBData.currentImage.name +" will delete everything that's currently on the drive."
             }
 
             ColumnLayout {
                 Text {
                     Layout.fillWidth: true
                     horizontalAlignment: Text.AlignHCenter
-                    text: "Downloading (895MB left)"
+                    property double leftSize: liveUSBData.downloader.maxProgress - liveUSBData.downloader.progress
+                    property string leftStr: leftSize <= 0 ? "" :
+                                             (leftSize < 1024) ? (leftSize + " B") :
+                                             (leftSize < (1024 * 1024)) ? ((leftSize / 1024).toFixed(1) + " KB") :
+                                             (leftSize < (1024 * 1024 * 1024)) ? ((leftSize / 1024 / 1024).toFixed(1) + " MB") :
+                                             ((leftSize / 1024 / 1024 / 1024).toFixed(1) + " GB")
+                    text: liveUSBData.downloader.status + (liveUSBData.downloader.maxProgress > 0 ? " (" + leftStr + " left)" : "")
                 }
                 AdwaitaProgressBar {
                     Layout.fillWidth: true
-                    value: 0.2
+                    value: liveUSBData.downloader.progress / liveUSBData.downloader.maxProgress
                 }
             }
 
@@ -46,8 +52,8 @@ Dialog {
                 Layout.fillWidth: true
                 Layout.alignment: Qt.AlignCenter
                 spacing: 32
-                Image {
-                    source: "http://upload.wikimedia.org/wikipedia/commons/3/3f/Fedora_logo.svg"
+                IndicatedImage {
+                    source: liveUSBData.currentImage.logo
                     sourceSize.width: 64
                     sourceSize.height: 64
                     fillMode: Image.PreserveAspectFit
@@ -85,7 +91,10 @@ Dialog {
                 }
                 width: implicitWidth * 1.2
                 text: "Cancel"
-                onClicked: root.close()
+                onClicked: {
+                    liveUSBData.downloader.cancel()
+                    root.close()
+                }
             }
             AdwaitaButton {
                 id: acceptButton
diff --git a/liveusb/components/ImageDetails.qml b/liveusb/components/ImageDetails.qml
index 61c1e21..e628ed1 100644
--- a/liveusb/components/ImageDetails.qml
+++ b/liveusb/components/ImageDetails.qml
@@ -45,7 +45,11 @@ Item {
             color: "#729fcf"
             textColor: "white"
             width: implicitWidth + 16
-            onClicked: dlDialog.visible = true
+            onClicked: {
+                dlDialog.visible = true
+                console.log(liveUSBData.currentImage.url)
+                liveUSBData.downloader.run(liveUSBData.currentImage.url)
+            }
             enabled: mainWindow.currentImageIndex != 0 || fileDialog.fileUrl.length > 0
             anchors {
                 right: parent.right
@@ -83,7 +87,7 @@ Item {
                         IndicatedImage {
                             id: iconRect
                             anchors.centerIn: parent
-                            source: liveUSBData.releases[mainWindow.currentImageIndex].logo
+                            source: liveUSBData.currentImage.logo
                             sourceSize.width: parent.width
                             sourceSize.height: parent.height
                             fillMode: Image.PreserveAspectFit
@@ -98,12 +102,12 @@ Item {
                                 Layout.fillWidth: true
                                 anchors.left: parent.left
                                 font.pointSize: 11
-                                text: liveUSBData.releases[mainWindow.currentImageIndex].name
+                                text: liveUSBData.currentImage.name
                             }
                             Text {
                                 anchors.right: parent.right
                                 font.pointSize: 11
-                                property double size: liveUSBData.releases[mainWindow.currentImageIndex].size
+                                property double size: liveUSBData.currentImage.size
                                 text: size <= 0 ? "" :
                                       (size < 1024) ? (size + " B") :
                                       (size < (1024 * 1024)) ? ((size / 1024).toFixed(1) + " KB") :
@@ -114,12 +118,12 @@ Item {
                             }
                         }
                         Text {
-                            text: liveUSBData.releases[mainWindow.currentImageIndex].arch
+                            text: liveUSBData.currentImage.arch
                             color: "gray"
                         }
                         Text {
                             // I'm sorry, everyone, I can't find a better way to determine if the date is valid
-                            text: liveUSBData.releases[mainWindow.currentImageIndex].releaseDate.toLocaleDateString().length > 0 ? ("Released on " + liveUSBData.releases[mainWindow.currentImageIndex].releaseDate.toLocaleDateString()) : ""
+                            text: liveUSBData.currentImage.releaseDate.toLocaleDateString().length > 0 ? ("Released on " + liveUSBData.currentImage.releaseDate.toLocaleDateString()) : ""
                             font.pointSize: 8
                             color: "gray"
                         }
@@ -129,12 +133,12 @@ Item {
                     Layout.fillWidth: true
                     width: Layout.width
                     wrapMode: Text.WordWrap
-                    text: liveUSBData.releases[mainWindow.currentImageIndex].fullDescription
+                    text: liveUSBData.currentImage.fullDescription
                     font.pointSize: 9
                 }
                 Repeater {
                     id: screenshotRepeater
-                    model: liveUSBData.releases[mainWindow.currentImageIndex].screenshots
+                    model: liveUSBData.currentImage.screenshots
                     IndicatedImage {
                         Layout.fillWidth: true
                         fillMode: Image.PreserveAspectFit
diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
index 6a61109..e3a43f8 100644
--- a/liveusb/components/ImageList.qml
+++ b/liveusb/components/ImageList.qml
@@ -276,6 +276,7 @@ Item {
                     }
                     width: height
                     smooth: true
+                    fillMode: Image.PreserveAspectFit
 
                     source: logo
                 }
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 53eac46..b97df1f 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -32,7 +32,7 @@ import urlparse
 
 from time import sleep
 from datetime import datetime
-from PyQt5.QtCore import pyqtProperty, pyqtSlot, QObject, QUrl, QDateTime, pyqtSignal
+from PyQt5.QtCore import pyqtProperty, pyqtSlot, QObject, QUrl, QDateTime, pyqtSignal, QThread
 from PyQt5.QtWidgets import QApplication
 from PyQt5.QtQml import qmlRegisterType, qmlRegisterUncreatableType, QQmlComponent, QQmlApplicationEngine, QQmlListProperty
 from PyQt5.QtQuick import QQuickView
@@ -58,18 +58,9 @@ MAX_FAT32 = 3999
 MAX_EXT = 2097152
 
 class Release(QObject):
-    nameChanged = pyqtSignal()
-    logoChanged = pyqtSignal()
-    sizeChanged = pyqtSignal()
-    archChanged = pyqtSignal()
-    fullNameChanged = pyqtSignal()
-    releaseDateChanged = pyqtSignal()
-    shortDescriptionChanged = pyqtSignal()
-    fullDescriptionChanged = pyqtSignal()
-    hasDetailsChanged = pyqtSignal()
     screenshotsChanged = pyqtSignal()
 
-    def __init__(self, parent=None, name = '', logo = '', size = 0, arch = '', fullName = '', releaseDate = QDateTime(), shortDescription = '', fullDescription = '', hasDetails = True, screenshots = []):
+    def __init__(self, parent=None, name = '', logo = '', size = 0, arch = '', fullName = '', releaseDate = QDateTime(), shortDescription = '', fullDescription = '', hasDetails = True, screenshots = [], url=''):
         QObject.__init__(self, parent)
 
         self._name = name.replace('_', ' ')
@@ -82,6 +73,7 @@ class Release(QObject):
         self._fullDescription = fullDescription
         self._hasDetails = hasDetails
         self._screenshots = screenshots
+        self._url = url
 
         if self._logo == '':
             if self._name == 'Fedora Workstation':
@@ -90,42 +82,48 @@ class Release(QObject):
                 self._logo = '../../data/logo-color-server.png'
             elif self._name == 'Fedora Cloud':
                 self._logo = '../../data/logo-color-cloud.png'
+            elif self._name == 'Fedora KDE':
+                self._logo = '../../data/logo-plasma5.png'
+            elif self._name == 'Fedora Xfce':
+                self._logo = '../../data/logo-xfce.svg'
+            elif self._name == 'Fedora LXDE':
+                self._logo = '../../data/logo-lxde.png'
             else:
                 self._logo = '../../data/logo-fedora.svg'
 
-    @pyqtProperty(str, notify=nameChanged)
+    @pyqtProperty(str, constant=True)
     def name(self):
         return self._name
 
-    @pyqtProperty(str, notify=logoChanged)
+    @pyqtProperty(str, constant=True)
     def logo(self):
         return self._logo
 
-    @pyqtProperty(float, notify=sizeChanged)
+    @pyqtProperty(float, constant=True)
     def size(self):
         return self._size
 
-    @pyqtProperty(str, notify=archChanged)
+    @pyqtProperty(str, constant=True)
     def arch(self):
         return self._arch
 
-    @pyqtProperty(str, notify=fullNameChanged)
+    @pyqtProperty(str, constant=True)
     def fullName(self):
         return self._fullName
 
-    @pyqtProperty('QDateTime', notify=releaseDateChanged)
+    @pyqtProperty('QDateTime', constant=True)
     def releaseDate(self):
         return self._releaseDate
 
-    @pyqtProperty(str, notify=shortDescriptionChanged)
+    @pyqtProperty(str, constant=True)
     def shortDescription(self):
         return self._shortDescription
 
-    @pyqtProperty(str, notify=fullDescriptionChanged)
+    @pyqtProperty(str, constant=True)
     def fullDescription(self):
         return self._fullDescription
 
-    @pyqtProperty(bool, notify=hasDetailsChanged)
+    @pyqtProperty(bool, constant=True)
     def hasDetails(self):
         return self._hasDetails
 
@@ -133,20 +131,120 @@ class Release(QObject):
     def screenshots(self):
         return QQmlListProperty(str, self, self._screenshots)
 
+    @pyqtProperty(str, constant=True)
+    def url(self):
+        return self._url
+
+class IsoDownloaderThread(QThread):
+    def __init__(self, url, progress, proxies):
+        QThread.__init__(self)
+        self.url = url
+        self.progress = progress
+        self.proxies = proxies
+
+    def run(self):
+        self.grabber = URLGrabber(progress_obj=self.progress, proxies=self.proxies)
+        home = os.getenv('HOME', 'USERPROFILE')
+        filename = os.path.basename(urlparse.urlparse(self.url).path)
+        for folder in ('Downloads', 'My Documents'):
+            if os.path.isdir(os.path.join(home, folder)):
+                filename = os.path.join(home, folder, filename)
+                break
+        try:
+            iso = self.grabber.urlgrab(self.url, reget='simple')
+        except URLGrabError, e:
+            pass
+            self.emit(QtCore.SIGNAL("dlcomplete(PyQt_PyObject)"), e.strerror)
+        else:
+            pass
+            self.emit(QtCore.SIGNAL("dlcomplete(PyQt_PyObject)"), iso)
+
+class IsoDownloader(QObject, BaseMeter):
+    maxProgressChanged = pyqtSignal()
+    progressChanged = pyqtSignal()
+    statusChanged = pyqtSignal()
+
+    _status = "Initializing"
+    _maximum = -1.0
+    _current = -1.0
+
+    """ A QObject urlgrabber BaseMeter class.
+
+    This class is called automatically by urlgrabber with our download details.
+    This class then sends signals to our main dialog window to update the
+    progress bar.
+    """
+    def __init__(self, parent, live):
+        QObject.__init__(self, parent)
+
+        self._live = live
+
+    def start(self, filename=None, url=None, basename=None, size=None, now=None, text=None):
+        self._maximum = size
+        self._status = "Starting"
+        self.statusChanged.emit()
+
+    def update(self, amount_read, now=None):
+        """ Update our download progressbar.
+
+        :read: the number of bytes read so far
+        """
+        if self._current < amount_read:
+            self._current = amount_read
+            self.progressChanged.emit()
+        self._status = "Downloading"
+        self.statusChanged.emit()
+
+    def end(self, amount_read):
+        self._current = amount_read
+        self.progressChanged.emit()
+
+    @pyqtSlot(str)
+    def run(self, url):
+        self._grabber = IsoDownloaderThread(url, self, self._live.get_proxies())
+        self._grabber.start()
+
+    @pyqtSlot()
+    def cancel(self):
+        self._grabber.terminate()
+        self._status = "Initializing..."
+        self._maximum = -1.0
+        self._current = 1.0
+        self.statusChanged.emit()
+        self.progressChanged.emit()
+        self.maxProgressChanged.emit()
+
+    @pyqtProperty(str, notify=statusChanged)
+    def status(self):
+        return self._status
+
+    @pyqtProperty(float, notify=maxProgressChanged)
+    def maxProgress(self):
+        return self._maximum
+
+    @pyqtProperty(float, notify=progressChanged)
+    def progress(self):
+        return self._current
+
 
 class LiveUSBData(QObject):
     releasesChanged = pyqtSignal()
+    currentImageChanged = pyqtSignal()
+
+    _currentIndex = 0
 
     def __init__(self, opts):
         QObject.__init__(self)
         self.live = LiveUSBCreator(opts=opts)
+        self._downloader = IsoDownloader(self, self.live)
         self.releaseData = [Release(self, name='Custom OS...', shortDescription='<pick from file chooser>', fullDescription='Here you can choose a OS image from your hard drive to be written to your flash disk', hasDetails=False, logo='../../data/icon-folder.svg')]
         for release in releases:
             self.releaseData.append(Release(self,
                                             name='Fedora '+release['variant'],
                                             shortDescription='Fedora '+release['variant']+' '+release['version']+(' 64bit' if release['arch']=='x86_64' else ' 32bit'),
                                             arch=release['arch'],
-                                            size=release['size']
+                                            size=release['size'],
+                                            url=release['url']
                                     ))
 
     @pyqtProperty(QQmlListProperty, notify=releasesChanged)
@@ -157,28 +255,28 @@ class LiveUSBData(QObject):
     def titleReleases(self):
         return QQmlListProperty(Release, self, self.releaseData[0:4])
 
-class ImageDownloader(QObject):
-    percentageChanged = pyqtSignal()
-
-    def __init(self, parent, url, opts):
-        QObject.__init__(self, parent)
+    @pyqtProperty(IsoDownloader, constant=True)
+    def downloader(self):
+        return self._downloader
 
-        self._url = url
-        self._percentage = 0
+    @pyqtProperty(int, notify=currentImageChanged)
+    def currentIndex(self):
+        return self._currentIndex
 
-    @pyqtSlot
-    def start(self):
-        pass
+    @currentIndex.setter
+    def currentIndex(self, value):
+        self._currentIndex = value
+        self.currentImageChanged.emit()
 
-    @pyqtProperty(int, notify=percentageChanged)
-    def percentage(self):
-        return self._percentage
+    @pyqtProperty(Release, notify=currentImageChanged)
+    def currentImage(self):
+        return self.releaseData[self._currentIndex]
 
 class LiveUSBApp(QApplication):
     """ Main application class """
     def __init__(self, opts, args):
         QApplication.__init__(self, args)
-        qmlRegisterUncreatableType(ImageDownloader, "LiveUSB", 1, 0, "Downloader", "Not creatable directly, use the liveUSBData instance instead")
+        qmlRegisterUncreatableType(IsoDownloader, "LiveUSB", 1, 0, "Downloader", "Not creatable directly, use the liveUSBData instance instead")
         qmlRegisterUncreatableType(Release, "LiveUSB", 1, 0, "Release", "Not creatable directly, use the liveUSBData instance instead")
         qmlRegisterUncreatableType(LiveUSBData, "LiveUSB", 1, 0, "Data", "Use the liveUSBData root instance")
         view = QQmlApplicationEngine()
diff --git a/liveusb/liveusb.qml b/liveusb/liveusb.qml
index 73e6edc..4993ec4 100644
--- a/liveusb/liveusb.qml
+++ b/liveusb/liveusb.qml
@@ -19,7 +19,7 @@ ApplicationWindow {
         id: palette
     }
 
-    property int currentImageIndex: 0
+    //property int currentImageIndex: 0
     property bool canGoBack: false
 
     Behavior on x {
@@ -251,7 +251,7 @@ ApplicationWindow {
                 Connections {
                     target: contentLoader.item
                     onStepForward: {
-                        mainWindow.currentImageIndex = index
+                        liveUSBData.currentIndex = index
                         contentList.currentIndex = 1
                         canGoBack = true
                     }

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