From 16ab2da4d68e3d82c9911eaa833aad09ff5d54f3 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Thu, 17 Jun 2010 22:01:30 +0100 Subject: [PATCH 1/3] Fix HTTPBible verse counts --- openlp/plugins/bibles/lib/http.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index d3d6ca5f6..073b03118 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -137,10 +137,10 @@ class HTTPBooks(object): u'verses FROM chapters WHERE book_id = ?', (book[u'id'],)) if chapters: return { - u'id': chapters[0][0], - u'book_id': chapters[0][1], - u'chapter': chapters[0][2], - u'verses': chapters[0][3] + u'id': chapters[chapter][0], + u'book_id': chapters[chapter][1], + u'chapter': chapters[chapter][2], + u'verses': chapters[chapter][3] } else: return None From 5dc87d3ede974800cbdf74216d387d239b95edcd Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Thu, 17 Jun 2010 22:07:01 +0100 Subject: [PATCH 2/3] Cleanups --- openlp/core/ui/mainwindow.py | 3 ++- openlp/core/ui/pluginform.py | 6 ++++-- openlp/core/ui/thememanager.py | 3 ++- openlp/plugins/songs/forms/songimportwizard.py | 9 ++++++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index b016afa58..9efadddd8 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -654,7 +654,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): settings.beginGroup(self.generalSettingsSection) if settings.value(u'screen blank', QtCore.QVariant(False)).toBool(): self.LiveController.mainDisplaySetBackground() - if settings.value(u'blank warning', QtCore.QVariant(False)).toBool(): + if settings.value(u'blank warning', + QtCore.QVariant(False)).toBool(): QtGui.QMessageBox.question(self, translate(u'MainWindow', u'OpenLP Main Display Blanked'), translate(u'MainWindow', diff --git a/openlp/core/ui/pluginform.py b/openlp/core/ui/pluginform.py index db8b0a603..a91dd9a12 100644 --- a/openlp/core/ui/pluginform.py +++ b/openlp/core/ui/pluginform.py @@ -67,9 +67,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog): if plugin.status == PluginStatus.Active: status_text = unicode(translate(u'PluginForm', u'%s (Active)')) elif plugin.status == PluginStatus.Inactive: - status_text = unicode(translate(u'PluginForm', u'%s (Inactive)')) + status_text = unicode( + translate(u'PluginForm', u'%s (Inactive)')) elif plugin.status == PluginStatus.Disabled: - status_text = unicode(translate(u'PluginForm', u'%s (Disabled)')) + status_text = unicode( + translate(u'PluginForm', u'%s (Disabled)')) item.setText(status_text % plugin.name) # If the plugin has an icon, set it! if plugin.icon: diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index c19f1d4a2..a5d6644de 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -435,7 +435,8 @@ class ThemeManager(QtGui.QWidget): QtGui.QMessageBox.critical( self, translate(u'ThemeManager', u'Error'), translate(u'ThemeManager', u'File is not a valid theme.')) - log.exception(u'Theme file dosen\'t contain XML data %s' % filename) + log.exception(u'Theme file dosen\'t contain XML data %s' % + filename) except (IOError, NameError): QtGui.QMessageBox.critical( self, translate(u'ThemeManager', u'Error'), diff --git a/openlp/plugins/songs/forms/songimportwizard.py b/openlp/plugins/songs/forms/songimportwizard.py index 0556d1665..c684bd74b 100644 --- a/openlp/plugins/songs/forms/songimportwizard.py +++ b/openlp/plugins/songs/forms/songimportwizard.py @@ -113,7 +113,8 @@ class Ui_SongImportWizard(object): self.OpenIcon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.DeleteIcon = QtGui.QIcon() - self.DeleteIcon.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'), + self.DeleteIcon.addPixmap( + QtGui.QPixmap(u':/general/general_delete.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.OpenLyricsAddButton.setIcon(self.OpenIcon) self.OpenLyricsAddButton.setObjectName(u'OpenLyricsAddButton') @@ -185,7 +186,8 @@ class Ui_SongImportWizard(object): self.CSVLayout.setObjectName(u'CSVLayout') self.CSVFilenameLabel = QtGui.QLabel(self.CSVPage) self.CSVFilenameLabel.setObjectName(u'CSVFilenameLabel') - self.CSVLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.CSVFilenameLabel) + self.CSVLayout.setWidget(0, QtGui.QFormLayout.LabelRole, + self.CSVFilenameLabel) self.CSVFileLayout = QtGui.QHBoxLayout() self.CSVFileLayout.setSpacing(8) self.CSVFileLayout.setObjectName(u'CSVFileLayout') @@ -196,7 +198,8 @@ class Ui_SongImportWizard(object): self.CSVBrowseButton.setIcon(self.OpenIcon) self.CSVBrowseButton.setObjectName(u'CSVBrowseButton') self.CSVFileLayout.addWidget(self.CSVBrowseButton) - self.CSVLayout.setLayout(0, QtGui.QFormLayout.FieldRole, self.CSVFileLayout) + self.CSVLayout.setLayout(0, QtGui.QFormLayout.FieldRole, + self.CSVFileLayout) self.FormatStackedWidget.addWidget(self.CSVPage) self.SourceLayout.addWidget(self.FormatStackedWidget) SongImportWizard.addPage(self.SourcePage) From 8382ea5303b3da443b829e39c7fa550d39586ac2 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Fri, 18 Jun 2010 00:17:16 +0100 Subject: [PATCH 3/3] Fix service manager DnD (Bug #595671) --- openlp/core/ui/servicemanager.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 081087a03..03efb514f 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -927,13 +927,9 @@ class ServiceManager(QtGui.QWidget): endpos = len(self.serviceItems) else: endpos = self._getParentItemData(item) - 1 - if endpos < startpos: - newpos = endpos - else: - newpos = endpos + 1 serviceItem = self.serviceItems[startpos] self.serviceItems.remove(serviceItem) - self.serviceItems.insert(newpos, serviceItem) + self.serviceItems.insert(endpos, serviceItem) self.repaintServiceList(endpos, startCount) else: #we are not over anything so drop