[Pkg-privacy-commits] [tails-installer] 45/210: Visual tweaks
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:26 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 74051ea44b83ac28a477d9ba9dfa3688c5607057
Author: Martin Briza <mbriza at redhat.com>
Date: Thu Mar 19 15:52:17 2015 +0100
Visual tweaks
---
liveusb/components/DownloadDialog.qml | 4 ++--
liveusb/creator.py | 1 +
liveusb/gui.py | 10 ++++++----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index 362feba..60b24c9 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -6,7 +6,7 @@ import QtQuick.Window 2.0
Dialog {
id: root
- title: "Write Fedora Workstation to USB"
+ title: "Write " + liveUSBData.currentImage.name + " to USB"
contentItem: Rectangle {
color: palette.window
@@ -54,7 +54,7 @@ Dialog {
width: parent.width
value: liveUSBData.currentImage.writer.running ? liveUSBData.currentImage.writer.progress / liveUSBData.currentImage.writer.maxProgress : 0
visible: !liveUSBData.currentImage.download.running
- progressColor: "red"
+ progressColor: liveUSBData.currentImage.writer.status == "Checking the source image" ? Qt.lighter("green") : "red"
}
}
}
diff --git a/liveusb/creator.py b/liveusb/creator.py
index dbffdab..445c896 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -803,6 +803,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
if not os.path.exists(device):
raise LiveUSBError(_('Cannot find device: %s') % device)
stat = os.statvfs(device)
+ print(stat)
return stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
def _get_device(self, udi):
diff --git a/liveusb/gui.py b/liveusb/gui.py
index d5840ba..ac272a2 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -172,7 +172,6 @@ class ReleaseDownload(QObject, BaseMeter):
self.pathChanged.emit()
class ReleaseWriterProgressThread(QThread):
-
alive = True
get_free_bytes = None
drive = None
@@ -184,13 +183,14 @@ class ReleaseWriterProgressThread(QThread):
self.drive = drive
self.get_free_bytes = freebytes
self.orig_free = self.get_free_bytes()
- self.parent().maxprogress = self.totalSize
+ self.parent().maxProgress = self.totalSize
def run(self):
while self.alive:
free = self.get_free_bytes()
value = (self.orig_free - free) / 1024
self.parent().progress = value
+ print(self.totalSize, value)
if (value >= self.totalSize):
break
sleep(3)
@@ -290,10 +290,10 @@ class ReleaseWriterThread(QThread):
duration = str(datetime.now() - now).split('.')[0]
self.parent.status = _("Complete! (%s)" % duration)
- self.progressThread.terminate()
+ #self.progressThread.terminate()
def set_max_progress(self, maximum):
- self.parent.maxprogress = maximum
+ self.parent.maxProgress = maximum
def update_progress(self, value):
self.parent.progress = value
@@ -386,6 +386,7 @@ class ReleaseWriter(QObject):
@maxProgress.setter
def maxProgress(self, value):
+ print("MAXPROGRESS", value)
if (value != self._maximum):
self._maximum = value
self.maximumChanged.emit()
@@ -396,6 +397,7 @@ class ReleaseWriter(QObject):
@progress.setter
def progress(self, value):
+ print("PROGRESS", value)
if (value != self._current):
self._current = value
self.currentChanged.emit()
--
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