Merge lp:~apachelogger/usb-creator/kdefixes into lp:usb-creator

Proposed by Harald Sitter
Status: Merged
Merged at revision: 395
Proposed branch: lp:~apachelogger/usb-creator/kdefixes
Merge into: lp:usb-creator
Diff against target: 324 lines (+74/-54)
4 files modified
debian/changelog (+10/-1)
po/usbcreator.pot (+49/-49)
usbcreator/backends/udisks/backend.py (+5/-1)
usbcreator/frontends/kde/frontend.py (+10/-3)
To merge this branch: bzr merge lp:~apachelogger/usb-creator/kdefixes
Reviewer Review Type Date Requested Status
usb-creator hackers Pending
Review via email: mp+113733@code.launchpad.net

Description of the change

various kde frontend related fixes

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-06-12 17:25:04 +0000
3+++ debian/changelog 2012-07-06 12:51:17 +0000
4@@ -8,7 +8,16 @@
5 * Update debian/copyright to copyright specification 1.0
6 * Bump standards version to 3.8.3
7
8- -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Fri, 08 Jun 2012 13:10:10 +0100
9+ [ Harald Sitter ]
10+ * KDE: don't duplicate entries by improper removal of entries on update
11+ (LP: #992061)
12+ * udisks: on successful format the ended callback must be called
13+ * KDE: strip() ISO labels as some derivates end up having newlines in
14+ their label (e.g. netrunner)
15+ * KDE: auto-populate the ISO list with files found in downloads dir
16+ (LP: #761745)
17+
18+ -- Harald Sitter <apachelogger@ubuntu.com> Fri, 06 Jul 2012 13:22:46 +0200
19
20 usb-creator (0.2.39) quantal; urgency=low
21
22
23=== modified file 'po/usbcreator.pot'
24--- po/usbcreator.pot 2012-05-18 13:59:37 +0000
25+++ po/usbcreator.pot 2012-07-06 12:51:17 +0000
26@@ -8,7 +8,7 @@
27 msgstr ""
28 "Project-Id-Version: PACKAGE VERSION\n"
29 "Report-Msgid-Bugs-To: \n"
30-"POT-Creation-Date: 2012-05-17 09:43+0100\n"
31+"POT-Creation-Date: 2012-07-06 13:57+0200\n"
32 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
33 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
34 "Language-Team: LANGUAGE <LL@li.org>\n"
35@@ -125,60 +125,60 @@
36 msgid "Checksums do not match."
37 msgstr ""
38
39-#: .././usbcreator/frontends/gtk/frontend.py:346 usbcreator-kde.ui.py:12
40+#: .././usbcreator/frontends/gtk/frontend.py:347 usbcreator-kde.ui.py:12
41 msgid "CD-Drive/Image"
42 msgstr ""
43
44-#: .././usbcreator/frontends/gtk/frontend.py:359
45+#: .././usbcreator/frontends/gtk/frontend.py:360
46 #: .././usbcreator/frontends/winui/main_dialog.py:28 usbcreator-kde.ui.py:15
47 msgid "OS Version"
48 msgstr ""
49
50 #. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
51 #. encode to UTF-8 to work around GNOME #620579
52-#: .././usbcreator/frontends/gtk/frontend.py:370
53+#: .././usbcreator/frontends/gtk/frontend.py:371
54 #: .././usbcreator/frontends/winui/main_dialog.py:29 usbcreator-kde.ui.py:18
55 msgid "Size"
56 msgstr ""
57
58-#: .././usbcreator/frontends/gtk/frontend.py:442
59-#: .././usbcreator/frontends/kde/frontend.py:372
60-#: usbcreator/frontends/kde/frontend.py:372
61+#: .././usbcreator/frontends/gtk/frontend.py:443
62+#: .././usbcreator/frontends/kde/frontend.py:376
63+#: usbcreator/frontends/kde/frontend.py:376
64 msgid "The device is not large enough to hold this image."
65 msgstr ""
66
67-#: .././usbcreator/frontends/gtk/frontend.py:444
68-#: .././usbcreator/frontends/kde/frontend.py:374
69-#: usbcreator/frontends/kde/frontend.py:374
70+#: .././usbcreator/frontends/gtk/frontend.py:445
71+#: .././usbcreator/frontends/kde/frontend.py:378
72+#: usbcreator/frontends/kde/frontend.py:378
73 msgid "There is not enough free space for this image."
74 msgstr ""
75
76-#: .././usbcreator/frontends/gtk/frontend.py:476
77-#: .././usbcreator/frontends/gtk/frontend.py:745
78+#: .././usbcreator/frontends/gtk/frontend.py:477
79+#: .././usbcreator/frontends/gtk/frontend.py:746
80 msgid "Erasing..."
81 msgstr ""
82
83-#: .././usbcreator/frontends/gtk/frontend.py:481
84+#: .././usbcreator/frontends/gtk/frontend.py:482
85 #: .././gui/usbcreator-gtk.ui.h:15 usbcreator-kde.ui.py:42
86 msgid "Erase Disk"
87 msgstr ""
88
89-#: .././usbcreator/frontends/gtk/frontend.py:535
90+#: .././usbcreator/frontends/gtk/frontend.py:536
91 #: .././usbcreator/frontends/winui/main_dialog.py:36 usbcreator-kde.ui.py:30
92 msgid "Device"
93 msgstr ""
94
95-#: .././usbcreator/frontends/gtk/frontend.py:551
96+#: .././usbcreator/frontends/gtk/frontend.py:552
97 #: .././usbcreator/frontends/winui/main_dialog.py:37 usbcreator-kde.ui.py:33
98 msgid "Label"
99 msgstr ""
100
101-#: .././usbcreator/frontends/gtk/frontend.py:561
102+#: .././usbcreator/frontends/gtk/frontend.py:562
103 #: .././usbcreator/frontends/winui/main_dialog.py:38 usbcreator-kde.ui.py:36
104 msgid "Capacity"
105 msgstr ""
106
107-#: .././usbcreator/frontends/gtk/frontend.py:571
108+#: .././usbcreator/frontends/gtk/frontend.py:572
109 #: .././usbcreator/frontends/winui/main_dialog.py:39 usbcreator-kde.ui.py:39
110 msgid "Free Space"
111 msgstr ""
112@@ -187,34 +187,34 @@
113 #. TODO evand 2009-07-28: The list itself needs to be moved into the
114 #. base frontend.
115 #. To be displayed as a list of file type filters.
116-#: .././usbcreator/frontends/gtk/frontend.py:583
117+#: .././usbcreator/frontends/gtk/frontend.py:584
118 #: .././usbcreator/frontends/winui/frontend.py:181
119-#: .././usbcreator/frontends/kde/frontend.py:410
120-#: usbcreator/frontends/kde/frontend.py:410
121+#: .././usbcreator/frontends/kde/frontend.py:414
122+#: usbcreator/frontends/kde/frontend.py:414
123 msgid "CD Images"
124 msgstr ""
125
126-#: .././usbcreator/frontends/gtk/frontend.py:583
127+#: .././usbcreator/frontends/gtk/frontend.py:584
128 #: .././usbcreator/frontends/winui/frontend.py:182
129-#: .././usbcreator/frontends/kde/frontend.py:410
130-#: usbcreator/frontends/kde/frontend.py:410
131+#: .././usbcreator/frontends/kde/frontend.py:414
132+#: usbcreator/frontends/kde/frontend.py:414
133 msgid "Disk Images"
134 msgstr ""
135
136 #. TODO evand 2009-07-31: Make these the default values in the
137 #. GtkBuilder file.
138-#: .././usbcreator/frontends/gtk/frontend.py:604
139+#: .././usbcreator/frontends/gtk/frontend.py:605
140 #: .././usbcreator/frontends/winui/install_window.py:28
141 msgid "Starting up..."
142 msgstr ""
143
144-#: .././usbcreator/frontends/gtk/frontend.py:633
145+#: .././usbcreator/frontends/gtk/frontend.py:634
146 #: .././usbcreator/frontends/winui/frontend.py:155
147 #, python-format
148 msgid "%d%% complete (%dm%ss remaining)"
149 msgstr ""
150
151-#: .././usbcreator/frontends/gtk/frontend.py:637
152+#: .././usbcreator/frontends/gtk/frontend.py:638
153 #: .././usbcreator/frontends/winui/frontend.py:159
154 #, python-format
155 msgid "%d%% complete"
156@@ -222,26 +222,26 @@
157
158 #. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
159 #. TODO evand 2009-07-28: Better error message.
160-#: .././usbcreator/frontends/gtk/frontend.py:683
161+#: .././usbcreator/frontends/gtk/frontend.py:684
162 #: .././usbcreator/frontends/winui/frontend.py:87
163-#: .././usbcreator/frontends/kde/frontend.py:211
164-#: usbcreator/frontends/kde/frontend.py:211
165+#: .././usbcreator/frontends/kde/frontend.py:215
166+#: usbcreator/frontends/kde/frontend.py:215
167 msgid "Installation failed."
168 msgstr ""
169
170 #. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
171 #. TODO information about the device we're about to format.
172-#: .././usbcreator/frontends/gtk/frontend.py:740
173-#: .././usbcreator/frontends/kde/frontend.py:519
174-#: usbcreator/frontends/kde/frontend.py:519
175+#: .././usbcreator/frontends/gtk/frontend.py:741
176+#: .././usbcreator/frontends/kde/frontend.py:523
177+#: usbcreator/frontends/kde/frontend.py:523
178 msgid "Are you sure you want to erase the entire disk?"
179 msgstr ""
180
181 #. #-#-#-#-# usbcreator.pot (PACKAGE VERSION) #-#-#-#-#
182 #. set title of progress window (same as gtk frontend)
183 #: .././usbcreator/frontends/winui/install_window.py:23
184-#: .././usbcreator/frontends/kde/frontend.py:183
185-#: .././gui/usbcreator-gtk.ui.h:7 usbcreator/frontends/kde/frontend.py:183
186+#: .././usbcreator/frontends/kde/frontend.py:187
187+#: .././gui/usbcreator-gtk.ui.h:7 usbcreator/frontends/kde/frontend.py:187
188 msgid "Installing"
189 msgstr ""
190
191@@ -250,8 +250,8 @@
192 msgstr ""
193
194 #: .././usbcreator/frontends/winui/frontend.py:73
195-#: .././usbcreator/frontends/kde/frontend.py:462
196-#: usbcreator/frontends/kde/frontend.py:462
197+#: .././usbcreator/frontends/kde/frontend.py:466
198+#: usbcreator/frontends/kde/frontend.py:466
199 msgid ""
200 "The installation is complete. You may now reboot your computer with this "
201 "device inserted to try or install Ubuntu."
202@@ -327,33 +327,33 @@
203 msgid "Make startup disk"
204 msgstr ""
205
206-#: .././usbcreator/frontends/kde/frontend.py:377
207-#: usbcreator/frontends/kde/frontend.py:377
208+#: .././usbcreator/frontends/kde/frontend.py:381
209+#: usbcreator/frontends/kde/frontend.py:381
210 msgid "The device needs to be formatted for use."
211 msgstr ""
212
213-#: .././usbcreator/frontends/kde/frontend.py:426
214-#: usbcreator/frontends/kde/frontend.py:426
215+#: .././usbcreator/frontends/kde/frontend.py:430
216+#: usbcreator/frontends/kde/frontend.py:430
217 msgid "Starting up"
218 msgstr ""
219
220-#: .././usbcreator/frontends/kde/frontend.py:435
221-#: usbcreator/frontends/kde/frontend.py:435
222+#: .././usbcreator/frontends/kde/frontend.py:439
223+#: usbcreator/frontends/kde/frontend.py:439
224 msgid "You must select both source image and target device first."
225 msgstr ""
226
227-#: .././usbcreator/frontends/kde/frontend.py:473
228-#: usbcreator/frontends/kde/frontend.py:473
229+#: .././usbcreator/frontends/kde/frontend.py:477
230+#: usbcreator/frontends/kde/frontend.py:477
231 msgid "Retry?"
232 msgstr ""
233
234-#: .././usbcreator/frontends/kde/frontend.py:485
235-#: .././gui/usbcreator-gtk.ui.h:8 usbcreator/frontends/kde/frontend.py:485
236+#: .././usbcreator/frontends/kde/frontend.py:489
237+#: .././gui/usbcreator-gtk.ui.h:8 usbcreator/frontends/kde/frontend.py:489
238 msgid "Quit the installation?"
239 msgstr ""
240
241-#: .././usbcreator/frontends/kde/frontend.py:486
242-#: .././gui/usbcreator-gtk.ui.h:9 usbcreator/frontends/kde/frontend.py:486
243+#: .././usbcreator/frontends/kde/frontend.py:490
244+#: .././gui/usbcreator-gtk.ui.h:9 usbcreator/frontends/kde/frontend.py:490
245 msgid "Do you really want to quit the installation now?"
246 msgstr ""
247
248@@ -458,6 +458,6 @@
249 msgid "0.0 MB"
250 msgstr ""
251
252-#: usbcreator/frontends/kde/frontend.py:181
253+#: usbcreator/frontends/kde/frontend.py:185
254 msgid "Cancel"
255 msgstr ""
256
257=== modified file 'usbcreator/backends/udisks/backend.py'
258--- usbcreator/backends/udisks/backend.py 2012-05-18 17:36:26 +0000
259+++ usbcreator/backends/udisks/backend.py 2012-07-06 12:51:17 +0000
260@@ -276,6 +276,10 @@
261 self.targets[dev]['formatting'] = False
262 self.formatting.remove(dev)
263
264+ def format_ended(self, dev=None):
265+ self.format_done(dev)
266+ self.format_ended_cb()
267+
268 def format_failed(self, message, dev=None):
269 self.format_done(dev)
270 self.format_failed_cb(message)
271@@ -293,7 +297,7 @@
272 self.targets[device]['formatting'] = True
273 self.helper.Format(dev, self.allow_system_internal,
274 # There must be a better way...
275- reply_handler=lambda: self.format_done(device),
276+ reply_handler=lambda: self.format_ended(device),
277 error_handler=lambda x: self.format_failed(x, device))
278 except dbus.DBusException:
279 # Could not talk to usb-creator-helper or devkit.
280
281=== modified file 'usbcreator/frontends/kde/frontend.py'
282--- usbcreator/frontends/kde/frontend.py 2012-05-04 10:38:33 +0000
283+++ usbcreator/frontends/kde/frontend.py 2012-07-06 12:51:17 +0000
284@@ -24,7 +24,7 @@
285 from PyQt4.QtCore import *
286 from PyQt4.QtGui import *
287 from PyQt4 import uic
288-from PyKDE4.kdeui import KIcon, KMessageBox
289+from PyKDE4.kdeui import KIcon, KMessageBox, KGlobalSettings
290 from PyKDE4.kdecore import KProcess, KStandardDirs, KUrl, i18n
291 from PyKDE4.kio import KFileDialog
292
293@@ -91,6 +91,12 @@
294 if self.__img is not None:
295 self.__backend.add_image(misc.text_type(self.__img))
296
297+ downloadsDir = QDir(KGlobalSettings.self().downloadPath())
298+ isoFilter = QStringList()
299+ isoFilter.append("*.iso")
300+ for iso in downloadsDir.entryList(isoFilter, QDir.Files):
301+ self.__backend.add_image(misc.text_type(downloadsDir.absoluteFilePath(iso)))
302+
303 def test_func(*a):
304 if not queue.empty():
305 func = queue.get_nowait()
306@@ -266,7 +272,7 @@
307 for i in range(0,self.__mainWindow.ui_dest_list.topLevelItemCount()):
308 item = self.__mainWindow.ui_dest_list.topLevelItem(i)
309 if item.data(0,Qt.UserRole).toPyObject() == target:
310- self.__mainWindow.ui_dest_list.removeItemWidget(item,0)
311+ self.__mainWindow.ui_dest_list.takeTopLevelItem(i)
312 break
313
314 if not self.__mainWindow.ui_dest_list.currentItem():
315@@ -294,7 +300,8 @@
316 # populate from device data
317 if self.__backend is not None:
318 new_item.setText(0,self.__backend.sources[source]['device'])
319- new_item.setText(1,self.__backend.sources[source]['label'])
320+ # Strip as some derivates like to have whitespaces/newlines (e.g. netrunner)
321+ new_item.setText(1,self.__backend.sources[source]['label'].strip())
322 new_item.setText(2,misc.format_size(self.__backend.sources[source]['size']))
323
324 def remove_source(self, source):

Subscribers

People subscribed via source and target branches