From 010373b798c76f5dd71bda030f804b22a7312e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Fri, 27 May 2011 22:33:23 +0200 Subject: [PATCH] Fixed Traceback if BookNameDialog was canceled while upgrading non webbibles Replace LineEdit in BookNameDialog with Label --- openlp/plugins/bibles/forms/bibleupgradeform.py | 2 +- openlp/plugins/bibles/forms/booknamedialog.py | 8 ++++---- openlp/plugins/bibles/forms/booknameform.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/bibles/forms/bibleupgradeform.py b/openlp/plugins/bibles/forms/bibleupgradeform.py index 8ac99d99f..bd9a3172d 100644 --- a/openlp/plugins/bibles/forms/bibleupgradeform.py +++ b/openlp/plugins/bibles/forms/bibleupgradeform.py @@ -606,7 +606,7 @@ class BibleUpgradeForm(OpenLPWizard): int(verse[u'chapter']), int(verse[u'verse']), unicode(verse[u'text'])) Receiver.send_message(u'openlp_process_events') - self.newbibles[number].session.commit() + self.newbibles[number].session.commit() if not bible_failed: self.incrementProgressBar(unicode(translate( 'BiblesPlugin.UpgradeWizardForm', diff --git a/openlp/plugins/bibles/forms/booknamedialog.py b/openlp/plugins/bibles/forms/booknamedialog.py index d2901ce23..e9211b3d5 100644 --- a/openlp/plugins/bibles/forms/booknamedialog.py +++ b/openlp/plugins/bibles/forms/booknamedialog.py @@ -41,15 +41,15 @@ class Ui_BookNameDialog(object): self.infoLabel.setObjectName(u'infoLabel') self.bookNameLayout.addWidget(self.infoLabel) self.correspondingLayout = QtGui.QGridLayout() + self.correspondingLayout.setColumnStretch(1, 1) self.correspondingLayout.setSpacing(8) self.correspondingLayout.setObjectName(u'correspondingLayout') self.currentLabel = QtGui.QLabel(bookNameDialog) self.currentLabel.setObjectName(u'currentLabel') self.correspondingLayout.addWidget(self.currentLabel, 0, 0, 1, 1) - self.currentLineEdit = QtGui.QLineEdit(bookNameDialog) - self.currentLineEdit.setReadOnly(True) - self.currentLineEdit.setObjectName(u'currentLineEdit') - self.correspondingLayout.addWidget(self.currentLineEdit, 0, 1, 1, 1) + self.currentBookLabel = QtGui.QLabel(bookNameDialog) + self.currentBookLabel.setObjectName(u'currentBookLabel') + self.correspondingLayout.addWidget(self.currentBookLabel, 0, 1, 1, 1) self.correspondingLabel = QtGui.QLabel(bookNameDialog) self.correspondingLabel.setObjectName(u'correspondingLabel') self.correspondingLayout.addWidget( diff --git a/openlp/plugins/bibles/forms/booknameform.py b/openlp/plugins/bibles/forms/booknameform.py index e2d7004ec..8ad3ad977 100644 --- a/openlp/plugins/bibles/forms/booknameform.py +++ b/openlp/plugins/bibles/forms/booknameform.py @@ -109,7 +109,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog): elif maxbooks <= 66: self.apocryphaCheckBox.setCheckState(QtCore.Qt.Unchecked) self.reloadComboBox() - self.currentLineEdit.setText(name) + self.currentBookLabel.setText(unicode(name)) self.correspondingComboBox.setFocus() return QDialog.exec_(self)