[Pkg-privacy-commits] [tails-installer] 49/210: Changed the info messages to a set-like list
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:27 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 266867afb72d3de5e6f493e8950ff1ff449dc0c8
Author: Martin Briza <mbriza at redhat.com>
Date: Thu Apr 2 16:30:20 2015 +0200
Changed the info messages to a set-like list
---
liveusb/components/DownloadDialog.qml | 23 +++++++++++++++--------
liveusb/gui.py | 19 ++++++++++++-------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/liveusb/components/DownloadDialog.qml b/liveusb/components/DownloadDialog.qml
index cbbd5d2..60a4e79 100644
--- a/liveusb/components/DownloadDialog.qml
+++ b/liveusb/components/DownloadDialog.qml
@@ -8,7 +8,7 @@ Dialog {
id: root
title: "Write " + liveUSBData.currentImage.name + " to USB"
- height: layout.height + 64 + (group.checked ? 48 : 0)
+ height: layout.height + 48 + (group.checked ? 48 : 0)
standardButtons: StandardButton.NoButton
width: 640
@@ -24,14 +24,21 @@ Dialog {
top: parent.top
left: parent.left
right: parent.right
- topMargin: 48
- leftMargin: 64
+ topMargin: 32
+ leftMargin: 48
rightMargin: anchors.leftMargin
}
- Text {
- wrapMode: Text.WordWrap
- //text: "Writing the image of " + liveUSBData.currentImage.name +" will delete everything that's currently on the drive."
- text: liveUSBData.currentImage.info
+ Column {
+ spacing: 8
+ width: parent.width
+ Repeater {
+ model: liveUSBData.currentImage.info
+ Text {
+ wrapMode: Text.WordWrap
+ textFormat: Text.RichText
+ text: liveUSBData.currentImage.info[index]
+ }
+ }
}
ColumnLayout {
@@ -125,7 +132,7 @@ Dialog {
right: parent.right
bottom: parent.bottom
bottomMargin: 24
- leftMargin: 16
+ leftMargin: 24
rightMargin: anchors.leftMargin
}
diff --git a/liveusb/gui.py b/liveusb/gui.py
index c37bf96..ae5d21d 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -418,7 +418,7 @@ class Release(QObject):
self._screenshots = screenshots
self._url = url
self._path = ''
- self._info = ''
+ self._info = []
if self._logo == '':
if self._name == 'Fedora Workstation':
@@ -468,10 +468,10 @@ class Release(QObject):
@pyqtSlot()
def inspectDestination(self):
if self.live.blank_mbr():
- self.info = _("The Master Boot Record on your device is blank. Writing the image will reset the MBR on this device")
+ 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():
- self.info = _("The Master Boot Record on your device does not match your system's syslinux MBR.\n"
- "If you have trouble booting it, try setting the \"Reset the MBR\" advanced option.")
+ self.addInfo(_("The Master Boot Record on your device does not match your system's syslinux MBR.<br>"
+ "If you have trouble booting it, try setting the \"Reset the MBR\" advanced option."))
try:
self.live.mount_device()
@@ -480,12 +480,12 @@ class Release(QObject):
self._running = False
self.runningChanged.emit()
except OSError, e:
- self.info = _('Unable to mount device')
+ self.addInfo(_('Unable to mount device'))
self._running = False
self.runningChanged.emit()
if self.live.existing_liveos():
- self.info += _("\nYour device already contains a LiveOS. If you continue, it will be overwritten.")
+ self.addInfo(_("\nYour device already contains a LiveOS. If you continue, it will be overwritten."))
#TODO
self.live.verify_filesystem()
@@ -587,7 +587,7 @@ class Release(QObject):
else:
return 'Finished'
- @pyqtProperty(str, notify=infoChanged)
+ @pyqtProperty('QStringList', notify=infoChanged)
def info(self):
return self._info
@@ -597,6 +597,11 @@ class Release(QObject):
self._info = value
self.infoChanged.emit()
+ def addInfo(self, value):
+ if value not in self._info:
+ self._info.append(value)
+ self.infoChanged.emit()
+
class ReleaseListModel(QAbstractListModel):
def __init__(self, parent, title=False):
QAbstractListModel.__init__(self, parent)
--
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