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
=== modified file 'debian/changelog'
--- debian/changelog 2019-07-02 11:54:26 +0000
+++ debian/changelog 2019-07-15 04:22:37 +0000
@@ -1,7 +1,12 @@
1usb-creator (0.3.7) UNRELEASED; urgency=medium1usb-creator (0.3.7) UNRELEASED; urgency=medium
22
3 [ Marc Deslauriers ]
3 * Change version strings to 0.3.7 for next release4 * Change version strings to 0.3.7 for next release
45
6 [ Walter Lapchynski ]
7 * Move progress dialog setup to the install method on the KDE frontend.
8 Thanks to Paul Worrall for the patch! (LP: #1629715)
9
5 -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 02 Jul 2019 07:53:57 -040010 -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 02 Jul 2019 07:53:57 -0400
611
7usb-creator (0.3.6) eoan; urgency=medium12usb-creator (0.3.6) eoan; urgency=medium
813
=== modified file 'usbcreator/frontends/kde/frontend.py'
--- usbcreator/frontends/kde/frontend.py 2015-12-11 17:37:20 +0000
+++ usbcreator/frontends/kde/frontend.py 2019-07-15 04:22:37 +0000
@@ -179,17 +179,6 @@
179 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(0, QHeaderView.Stretch)179 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(0, QHeaderView.Stretch)
180 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(1, QHeaderView.ResizeToContents)180 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(1, QHeaderView.ResizeToContents)
181 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(2, QHeaderView.ResizeToContents)181 self.__mainWindow.ui_dest_list.header().setSectionResizeMode(2, QHeaderView.ResizeToContents)
182 self.progress_bar = QProgressDialog("",_('Cancel'),0,100,self.__mainWindow)
183 #set title of progress window (same as gtk frontend)
184 self.progress_bar.setWindowTitle(_('Installing'))
185 #prevent progress bar from emitting reset on reaching max value (and auto closing)
186 self.progress_bar.setAutoReset(False)
187 #force immediate showing, rather than waiting...
188 self.progress_bar.setMinimumDuration(0)
189 #must disconnect the canceled() SIGNAL, otherwise the progress bar is actually destroyed
190 self.progress_bar.canceled.disconnect(self.progress_bar.cancel)
191 #now we connect our own signal to display a warning dialog instead
192 self.progress_bar.canceled.connect(self.warning_dialog)
193182
194 #show the window183 #show the window
195 self.__mainWindow.show()184 self.__mainWindow.show()
@@ -434,6 +423,18 @@
434423
435 self.__mainWindow.hide()424 self.__mainWindow.hide()
436 self.delete_timeout(self.update_loop)425 self.delete_timeout(self.update_loop)
426
427 self.progress_bar = QProgressDialog("",_('Cancel'),0,100,self.__mainWindow)
428 #set title of progress window (same as gtk frontend)
429 self.progress_bar.setWindowTitle(_('Installing'))
430 #prevent progress bar from emitting reset on reaching max value (and auto closing)
431 self.progress_bar.setAutoReset(False)
432 #force immediate showing, rather than waiting...
433 self.progress_bar.setMinimumDuration(0)
434 #must disconnect the canceled() SIGNAL, otherwise the progress bar is actually destroyed
435 self.progress_bar.canceled.disconnect(self.progress_bar.cancel)
436 #now we connect our own signal to display a warning dialog instead
437 self.progress_bar.canceled.connect(self.warning_dialog)
437 starting_up = _('Starting up')438 starting_up = _('Starting up')
438 self.progress_bar.setLabelText(starting_up)439 self.progress_bar.setLabelText(starting_up)
439 self.progress_bar.show()440 self.progress_bar.show()

Subscribers

People subscribed via source and target branches