openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04736
[Merge] lp:~m2j/openlp/work into lp:openlp
m2j has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#659019 OpenLP v1.x importer does not stop importing although import was cancelled
https://bugs.launchpad.net/bugs/659019
Bug #659019
Import wizards didn't stopped to process the import files.
--
https://code.launchpad.net/~m2j/openlp/work/+merge/43148
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/work into lp:openlp.
=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py 2010-11-12 22:27:57 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py 2010-12-08 23:50:13 +0000
@@ -99,9 +99,6 @@
QtCore.QObject.connect(self.OpenSongBrowseButton,
QtCore.SIGNAL(u'clicked()'),
self.onOpenSongBrowseButtonClicked)
- QtCore.QObject.connect(self.cancelButton,
- QtCore.SIGNAL(u'clicked(bool)'),
- self.onCancelButtonClicked)
QtCore.QObject.connect(self,
QtCore.SIGNAL(u'currentIdChanged(int)'),
self.onCurrentIdChanged)
@@ -113,6 +110,16 @@
self.setDefaults()
return QtGui.QWizard.exec_(self)
+ def reject(self):
+ """
+ Stop the import on cancel button, close button or ESC key.
+ """
+ log.debug('Import canceled by user.')
+ if self.currentId() == 3:
+ Receiver.send_message(u'bibles_stop_import')
+ else:
+ self.done(QtGui.QDialog.Rejected)
+
def validateCurrentPage(self):
"""
Validate the current page before moving on to the next page.
@@ -244,14 +251,6 @@
translate('BiblesPlugin.ImportWizardForm', 'Open OpenSong Bible'),
self.OpenSongFileEdit)
- def onCancelButtonClicked(self, checked):
- """
- Stop the import on pressing the cancel button.
- """
- log.debug('Cancel button pressed!')
- if self.currentId() == 3:
- Receiver.send_message(u'bibles_stop_import')
-
def onCurrentIdChanged(self, pageId):
if pageId == 3:
self.preImport()
=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py 2010-11-26 14:23:48 +0000
+++ openlp/plugins/songs/forms/songimportform.py 2010-12-08 23:50:13 +0000
@@ -118,9 +118,6 @@
QtCore.QObject.connect(self.songBeamerRemoveButton,
QtCore.SIGNAL(u'clicked()'),
self.onSongBeamerRemoveButtonClicked)
- QtCore.QObject.connect(self.cancelButton,
- QtCore.SIGNAL(u'clicked(bool)'),
- self.onCancelButtonClicked)
QtCore.QObject.connect(self,
QtCore.SIGNAL(u'currentIdChanged(int)'),
self.onCurrentIdChanged)
@@ -132,6 +129,16 @@
self.setDefaults()
return QtGui.QWizard.exec_(self)
+ def reject(self):
+ """
+ Stop the import on cancel button, close button or ESC key.
+ """
+ log.debug('Import canceled by user.')
+ if self.currentId() == 2:
+ Receiver.send_message(u'songs_stop_import')
+ else:
+ self.done(QtGui.QDialog.Rejected)
+
def validateCurrentPage(self):
"""
Validate the current page before moving on to the next page.
@@ -394,14 +401,6 @@
def onSongBeamerRemoveButtonClicked(self):
self.removeSelectedItems(self.songBeamerFileListWidget)
- def onCancelButtonClicked(self, checked):
- """
- Stop the import on pressing the cancel button.
- """
- log.debug('Cancel button pressed!')
- if self.currentId() == 2:
- Receiver.send_message(u'songs_stop_import')
-
def onCurrentIdChanged(self, id):
if id == 2:
self.preImport()
Follow ups