Merge lp:~wxl/usb-creator/usb-creator into lp:usb-creator

Proposed by ԜаӀtеr Ⅼарсһуnѕkі
Status: Merged
Merge reported by: Marc Deslauriers
Merged at revision: not available
Proposed branch: lp:~wxl/usb-creator/usb-creator
Merge into: lp:usb-creator
Diff against target: 57 lines (+17/-11)
2 files modified
debian/changelog (+5/-0)
usbcreator/frontends/kde/frontend.py (+12/-11)
To merge this branch: bzr merge lp:~wxl/usb-creator/usb-creator
Reviewer Review Type Date Requested Status
Marc Deslauriers Approve
Review via email: mp+370094@code.launchpad.net

Commit message

Move progress dialog setup to the install method on the KDE frontend. Thanks to Paul Worrall for the patch! (LP: #1629715)

Description of the change

Without this, usb-creator-kde is completely non-functional. It has been this way since at least Xenial. This is the first step to an SRU that far back.

The long story short is that it moves the progress dialog— that otherwise blocks normal function— from class initialization to the install method, so it won't launch without user input, as expected.

To post a comment you must log in.
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

LGTM!

review: Approve

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 2019-07-02 11:54:26 +0000
3+++ debian/changelog 2019-07-15 04:22:37 +0000
4@@ -1,7 +1,12 @@
5 usb-creator (0.3.7) UNRELEASED; urgency=medium
6
7+ [ Marc Deslauriers ]
8 * Change version strings to 0.3.7 for next release
9
10+ [ Walter Lapchynski ]
11+ * Move progress dialog setup to the install method on the KDE frontend.
12+ Thanks to Paul Worrall for the patch! (LP: #1629715)
13+
14 -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 02 Jul 2019 07:53:57 -0400
15
16 usb-creator (0.3.6) eoan; urgency=medium
17
18=== modified file 'usbcreator/frontends/kde/frontend.py'
19--- usbcreator/frontends/kde/frontend.py 2015-12-11 17:37:20 +0000
20+++ usbcreator/frontends/kde/frontend.py 2019-07-15 04:22:37 +0000
21@@ -179,17 +179,6 @@
22 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(0, QHeaderView.Stretch)
23 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(1, QHeaderView.ResizeToContents)
24 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(2, QHeaderView.ResizeToContents)
25- self.progress_bar = QProgressDialog("",_('Cancel'),0,100,self.__mainWindow)
26- #set title of progress window (same as gtk frontend)
27- self.progress_bar.setWindowTitle(_('Installing'))
28- #prevent progress bar from emitting reset on reaching max value (and auto closing)
29- self.progress_bar.setAutoReset(False)
30- #force immediate showing, rather than waiting...
31- self.progress_bar.setMinimumDuration(0)
32- #must disconnect the canceled() SIGNAL, otherwise the progress bar is actually destroyed
33- self.progress_bar.canceled.disconnect(self.progress_bar.cancel)
34- #now we connect our own signal to display a warning dialog instead
35- self.progress_bar.canceled.connect(self.warning_dialog)
36
37 #show the window
38 self.__mainWindow.show()
39@@ -434,6 +423,18 @@
40
41 self.__mainWindow.hide()
42 self.delete_timeout(self.update_loop)
43+
44+ self.progress_bar = QProgressDialog("",_('Cancel'),0,100,self.__mainWindow)
45+ #set title of progress window (same as gtk frontend)
46+ self.progress_bar.setWindowTitle(_('Installing'))
47+ #prevent progress bar from emitting reset on reaching max value (and auto closing)
48+ self.progress_bar.setAutoReset(False)
49+ #force immediate showing, rather than waiting...
50+ self.progress_bar.setMinimumDuration(0)
51+ #must disconnect the canceled() SIGNAL, otherwise the progress bar is actually destroyed
52+ self.progress_bar.canceled.disconnect(self.progress_bar.cancel)
53+ #now we connect our own signal to display a warning dialog instead
54+ self.progress_bar.canceled.connect(self.warning_dialog)
55 starting_up = _('Starting up')
56 self.progress_bar.setLabelText(starting_up)
57 self.progress_bar.show()

Subscribers

People subscribed via source and target branches