usb-creator-hackers team mailing list archive
-
usb-creator-hackers team
-
Mailing list archive
-
Message #00117
[Merge] lp:~apachelogger/usb-creator/kdefixes into lp:usb-creator
Harald Sitter has proposed merging lp:~apachelogger/usb-creator/kdefixes into lp:usb-creator.
Requested reviews:
usb-creator hackers (usb-creator-hackers)
Related bugs:
Bug #761745 in usb-creator (Ubuntu): "usb-creator-kde does not search desktop/downloads folders for iso files"
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/761745
Bug #992061 in usb-creator (Ubuntu): "USB Startup Disk Creator displays one USB device multiple times"
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/992061
For more details, see:
https://code.launchpad.net/~apachelogger/usb-creator/kdefixes/+merge/113733
various kde frontend related fixes
--
https://code.launchpad.net/~apachelogger/usb-creator/kdefixes/+merge/113733
Your team usb-creator hackers is requested to review the proposed merge of lp:~apachelogger/usb-creator/kdefixes into lp:usb-creator.
=== modified file 'debian/changelog'
--- debian/changelog 2012-06-12 17:25:04 +0000
+++ debian/changelog 2012-07-06 12:51:17 +0000
@@ -8,7 +8,16 @@
* Update debian/copyright to copyright specification 1.0
* Bump standards version to 3.8.3
- -- Dmitrijs Ledkovs <dmitrij.ledkov@xxxxxxxxxx> Fri, 08 Jun 2012 13:10:10 +0100
+ [ Harald Sitter ]
+ * KDE: don't duplicate entries by improper removal of entries on update
+ (LP: #992061)
+ * udisks: on successful format the ended callback must be called
+ * KDE: strip() ISO labels as some derivates end up having newlines in
+ their label (e.g. netrunner)
+ * KDE: auto-populate the ISO list with files found in downloads dir
+ (LP: #761745)
+
+ -- Harald Sitter <apachelogger@xxxxxxxxxx> Fri, 06 Jul 2012 13:22:46 +0200
usb-creator (0.2.39) quantal; urgency=low
=== modified file 'po/usbcreator.pot'
--- po/usbcreator.pot 2012-05-18 13:59:37 +0000
+++ po/usbcreator.pot 2012-07-06 12:51:17 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-17 09:43+0100\n"
+"POT-Creation-Date: 2012-07-06 13:57+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -125,60 +125,60 @@
msgid "Checksums do not match."
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:346 usbcreator-kde.ui.py:12
+#: .././usbcreator/frontends/gtk/frontend.py:347 usbcreator-kde.ui.py:12
msgid "CD-Drive/Image"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:359
+#: .././usbcreator/frontends/gtk/frontend.py:360
#: .././usbcreator/frontends/winui/main_dialog.py:28 usbcreator-kde.ui.py:15
msgid "OS Version"
msgstr ""
#. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
#. encode to UTF-8 to work around GNOME #620579
-#: .././usbcreator/frontends/gtk/frontend.py:370
+#: .././usbcreator/frontends/gtk/frontend.py:371
#: .././usbcreator/frontends/winui/main_dialog.py:29 usbcreator-kde.ui.py:18
msgid "Size"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:442
-#: .././usbcreator/frontends/kde/frontend.py:372
-#: usbcreator/frontends/kde/frontend.py:372
+#: .././usbcreator/frontends/gtk/frontend.py:443
+#: .././usbcreator/frontends/kde/frontend.py:376
+#: usbcreator/frontends/kde/frontend.py:376
msgid "The device is not large enough to hold this image."
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:444
-#: .././usbcreator/frontends/kde/frontend.py:374
-#: usbcreator/frontends/kde/frontend.py:374
+#: .././usbcreator/frontends/gtk/frontend.py:445
+#: .././usbcreator/frontends/kde/frontend.py:378
+#: usbcreator/frontends/kde/frontend.py:378
msgid "There is not enough free space for this image."
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:476
-#: .././usbcreator/frontends/gtk/frontend.py:745
+#: .././usbcreator/frontends/gtk/frontend.py:477
+#: .././usbcreator/frontends/gtk/frontend.py:746
msgid "Erasing..."
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:481
+#: .././usbcreator/frontends/gtk/frontend.py:482
#: .././gui/usbcreator-gtk.ui.h:15 usbcreator-kde.ui.py:42
msgid "Erase Disk"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:535
+#: .././usbcreator/frontends/gtk/frontend.py:536
#: .././usbcreator/frontends/winui/main_dialog.py:36 usbcreator-kde.ui.py:30
msgid "Device"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:551
+#: .././usbcreator/frontends/gtk/frontend.py:552
#: .././usbcreator/frontends/winui/main_dialog.py:37 usbcreator-kde.ui.py:33
msgid "Label"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:561
+#: .././usbcreator/frontends/gtk/frontend.py:562
#: .././usbcreator/frontends/winui/main_dialog.py:38 usbcreator-kde.ui.py:36
msgid "Capacity"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:571
+#: .././usbcreator/frontends/gtk/frontend.py:572
#: .././usbcreator/frontends/winui/main_dialog.py:39 usbcreator-kde.ui.py:39
msgid "Free Space"
msgstr ""
@@ -187,34 +187,34 @@
#. TODO evand 2009-07-28: The list itself needs to be moved into the
#. base frontend.
#. To be displayed as a list of file type filters.
-#: .././usbcreator/frontends/gtk/frontend.py:583
+#: .././usbcreator/frontends/gtk/frontend.py:584
#: .././usbcreator/frontends/winui/frontend.py:181
-#: .././usbcreator/frontends/kde/frontend.py:410
-#: usbcreator/frontends/kde/frontend.py:410
+#: .././usbcreator/frontends/kde/frontend.py:414
+#: usbcreator/frontends/kde/frontend.py:414
msgid "CD Images"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:583
+#: .././usbcreator/frontends/gtk/frontend.py:584
#: .././usbcreator/frontends/winui/frontend.py:182
-#: .././usbcreator/frontends/kde/frontend.py:410
-#: usbcreator/frontends/kde/frontend.py:410
+#: .././usbcreator/frontends/kde/frontend.py:414
+#: usbcreator/frontends/kde/frontend.py:414
msgid "Disk Images"
msgstr ""
#. TODO evand 2009-07-31: Make these the default values in the
#. GtkBuilder file.
-#: .././usbcreator/frontends/gtk/frontend.py:604
+#: .././usbcreator/frontends/gtk/frontend.py:605
#: .././usbcreator/frontends/winui/install_window.py:28
msgid "Starting up..."
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:633
+#: .././usbcreator/frontends/gtk/frontend.py:634
#: .././usbcreator/frontends/winui/frontend.py:155
#, python-format
msgid "%d%% complete (%dm%ss remaining)"
msgstr ""
-#: .././usbcreator/frontends/gtk/frontend.py:637
+#: .././usbcreator/frontends/gtk/frontend.py:638
#: .././usbcreator/frontends/winui/frontend.py:159
#, python-format
msgid "%d%% complete"
@@ -222,26 +222,26 @@
#. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
#. TODO evand 2009-07-28: Better error message.
-#: .././usbcreator/frontends/gtk/frontend.py:683
+#: .././usbcreator/frontends/gtk/frontend.py:684
#: .././usbcreator/frontends/winui/frontend.py:87
-#: .././usbcreator/frontends/kde/frontend.py:211
-#: usbcreator/frontends/kde/frontend.py:211
+#: .././usbcreator/frontends/kde/frontend.py:215
+#: usbcreator/frontends/kde/frontend.py:215
msgid "Installation failed."
msgstr ""
#. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
#. TODO information about the device we're about to format.
-#: .././usbcreator/frontends/gtk/frontend.py:740
-#: .././usbcreator/frontends/kde/frontend.py:519
-#: usbcreator/frontends/kde/frontend.py:519
+#: .././usbcreator/frontends/gtk/frontend.py:741
+#: .././usbcreator/frontends/kde/frontend.py:523
+#: usbcreator/frontends/kde/frontend.py:523
msgid "Are you sure you want to erase the entire disk?"
msgstr ""
#. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
#. set title of progress window (same as gtk frontend)
#: .././usbcreator/frontends/winui/install_window.py:23
-#: .././usbcreator/frontends/kde/frontend.py:183
-#: .././gui/usbcreator-gtk.ui.h:7 usbcreator/frontends/kde/frontend.py:183
+#: .././usbcreator/frontends/kde/frontend.py:187
+#: .././gui/usbcreator-gtk.ui.h:7 usbcreator/frontends/kde/frontend.py:187
msgid "Installing"
msgstr ""
@@ -250,8 +250,8 @@
msgstr ""
#: .././usbcreator/frontends/winui/frontend.py:73
-#: .././usbcreator/frontends/kde/frontend.py:462
-#: usbcreator/frontends/kde/frontend.py:462
+#: .././usbcreator/frontends/kde/frontend.py:466
+#: usbcreator/frontends/kde/frontend.py:466
msgid ""
"The installation is complete. You may now reboot your computer with this "
"device inserted to try or install Ubuntu."
@@ -327,33 +327,33 @@
msgid "Make startup disk"
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:377
-#: usbcreator/frontends/kde/frontend.py:377
+#: .././usbcreator/frontends/kde/frontend.py:381
+#: usbcreator/frontends/kde/frontend.py:381
msgid "The device needs to be formatted for use."
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:426
-#: usbcreator/frontends/kde/frontend.py:426
+#: .././usbcreator/frontends/kde/frontend.py:430
+#: usbcreator/frontends/kde/frontend.py:430
msgid "Starting up"
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:435
-#: usbcreator/frontends/kde/frontend.py:435
+#: .././usbcreator/frontends/kde/frontend.py:439
+#: usbcreator/frontends/kde/frontend.py:439
msgid "You must select both source image and target device first."
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:473
-#: usbcreator/frontends/kde/frontend.py:473
+#: .././usbcreator/frontends/kde/frontend.py:477
+#: usbcreator/frontends/kde/frontend.py:477
msgid "Retry?"
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:485
-#: .././gui/usbcreator-gtk.ui.h:8 usbcreator/frontends/kde/frontend.py:485
+#: .././usbcreator/frontends/kde/frontend.py:489
+#: .././gui/usbcreator-gtk.ui.h:8 usbcreator/frontends/kde/frontend.py:489
msgid "Quit the installation?"
msgstr ""
-#: .././usbcreator/frontends/kde/frontend.py:486
-#: .././gui/usbcreator-gtk.ui.h:9 usbcreator/frontends/kde/frontend.py:486
+#: .././usbcreator/frontends/kde/frontend.py:490
+#: .././gui/usbcreator-gtk.ui.h:9 usbcreator/frontends/kde/frontend.py:490
msgid "Do you really want to quit the installation now?"
msgstr ""
@@ -458,6 +458,6 @@
msgid "0.0 MB"
msgstr ""
-#: usbcreator/frontends/kde/frontend.py:181
+#: usbcreator/frontends/kde/frontend.py:185
msgid "Cancel"
msgstr ""
=== modified file 'usbcreator/backends/udisks/backend.py'
--- usbcreator/backends/udisks/backend.py 2012-05-18 17:36:26 +0000
+++ usbcreator/backends/udisks/backend.py 2012-07-06 12:51:17 +0000
@@ -276,6 +276,10 @@
self.targets[dev]['formatting'] = False
self.formatting.remove(dev)
+ def format_ended(self, dev=None):
+ self.format_done(dev)
+ self.format_ended_cb()
+
def format_failed(self, message, dev=None):
self.format_done(dev)
self.format_failed_cb(message)
@@ -293,7 +297,7 @@
self.targets[device]['formatting'] = True
self.helper.Format(dev, self.allow_system_internal,
# There must be a better way...
- reply_handler=lambda: self.format_done(device),
+ reply_handler=lambda: self.format_ended(device),
error_handler=lambda x: self.format_failed(x, device))
except dbus.DBusException:
# Could not talk to usb-creator-helper or devkit.
=== modified file 'usbcreator/frontends/kde/frontend.py'
--- usbcreator/frontends/kde/frontend.py 2012-05-04 10:38:33 +0000
+++ usbcreator/frontends/kde/frontend.py 2012-07-06 12:51:17 +0000
@@ -24,7 +24,7 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import uic
-from PyKDE4.kdeui import KIcon, KMessageBox
+from PyKDE4.kdeui import KIcon, KMessageBox, KGlobalSettings
from PyKDE4.kdecore import KProcess, KStandardDirs, KUrl, i18n
from PyKDE4.kio import KFileDialog
@@ -91,6 +91,12 @@
if self.__img is not None:
self.__backend.add_image(misc.text_type(self.__img))
+ downloadsDir = QDir(KGlobalSettings.self().downloadPath())
+ isoFilter = QStringList()
+ isoFilter.append("*.iso")
+ for iso in downloadsDir.entryList(isoFilter, QDir.Files):
+ self.__backend.add_image(misc.text_type(downloadsDir.absoluteFilePath(iso)))
+
def test_func(*a):
if not queue.empty():
func = queue.get_nowait()
@@ -266,7 +272,7 @@
for i in range(0,self.__mainWindow.ui_dest_list.topLevelItemCount()):
item = self.__mainWindow.ui_dest_list.topLevelItem(i)
if item.data(0,Qt.UserRole).toPyObject() == target:
- self.__mainWindow.ui_dest_list.removeItemWidget(item,0)
+ self.__mainWindow.ui_dest_list.takeTopLevelItem(i)
break
if not self.__mainWindow.ui_dest_list.currentItem():
@@ -294,7 +300,8 @@
# populate from device data
if self.__backend is not None:
new_item.setText(0,self.__backend.sources[source]['device'])
- new_item.setText(1,self.__backend.sources[source]['label'])
+ # Strip as some derivates like to have whitespaces/newlines (e.g. netrunner)
+ new_item.setText(1,self.__backend.sources[source]['label'].strip())
new_item.setText(2,misc.format_size(self.__backend.sources[source]['size']))
def remove_source(self, source):
Follow ups