[Pkg-privacy-commits] [tails-installer] 32/210: Retrieve the USB drives right
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:25 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 4de7b679cb7905d7fdcffaabd92755325d0625e3
Author: Martin Briza <mbriza at redhat.com>
Date: Fri Feb 27 13:07:01 2015 +0100
Retrieve the USB drives right
---
liveusb/__init__.py | 5 ++++-
liveusb/components/DownloadDialog.qml | 2 +-
liveusb/gui.py | 9 ++++++---
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/liveusb/__init__.py b/liveusb/__init__.py
index 0b47050..842b4c6 100644
--- a/liveusb/__init__.py
+++ b/liveusb/__init__.py
@@ -39,6 +39,9 @@ def utf8_gettext(string):
from liveusb.creator import LiveUSBError
-from liveusb.creator import LiveUSBCreator
+if sys.platform == "win32":
+ from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
+else:
+ from liveusb.creator import LinuxLiveUSBCreator as LiveUSBCreator
__all__ = ("LiveUSBCreator", "LiveUSBError", "LiveUSBWindow", "_", "utf8_gettext")
diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index d4c48d5..030755e 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -74,7 +74,7 @@ Dialog {
}
AdwaitaComboBox {
Layout.preferredWidth: implicitWidth * 2
- model: liveUSBData.usbDrives
+ model: liveUSBData.usbDriveNames
}
}
}
diff --git a/liveusb/gui.py b/liveusb/gui.py
index b5e971b..c9e9434 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -472,7 +472,6 @@ class LiveUSBData(QObject):
# TODO for some reason it gives me 4MB for my 4GB drive... and the rounding is off on my 8GB drive
if info['size']:
- name += str(info['size'])
pass
if info['size'] < 1024:
name += ' (%d B)' % (info['size'])
@@ -514,11 +513,15 @@ class LiveUSBData(QObject):
def currentImage(self):
return self.releaseData[self._currentIndex]
- @pyqtProperty(USBDrive, notify=usbDrivesChanged)
+ @pyqtProperty(QQmlListProperty, notify=usbDrivesChanged)
def usbDrives(self):
- print(self._usbDrives)
return QQmlListProperty(USBDrive, self, self._usbDrives)
+ @pyqtProperty('QStringList', notify=usbDrivesChanged)
+ def usbDriveNames(self):
+ return list(i.text for i in self._usbDrives)
+
+
--
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