Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/48215

Fix variable passing in one of the refactors

Fix song edit form - not sure what caused this bug to trigger now and not 
before but the solution looks like it could apply to a number of other forms so 
speak up if you come across any other forms not closing.

Cleanups
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/48215
Your team OpenLP Core is requested to review the proposed merge of 
lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-01-26 16:05:55 +0000
+++ openlp/core/ui/mainwindow.py	2011-02-01 18:11:57 +0000
@@ -87,10 +87,10 @@
             self.screens, True)
         previewVisible = QtCore.QSettings().value(
             u'user interface/preview panel', QtCore.QVariant(True)).toBool()
-        self.previewController.Panel.setVisible(previewVisible)
+        self.previewController.panel.setVisible(previewVisible)
         liveVisible = QtCore.QSettings().value(u'user interface/live panel',
             QtCore.QVariant(True)).toBool()
-        self.liveController.Panel.setVisible(liveVisible)
+        self.liveController.panel.setVisible(liveVisible)
         # Create menu
         self.MenuBar = QtGui.QMenuBar(mainWindow)
         self.MenuBar.setObjectName(u'MenuBar')
@@ -926,7 +926,7 @@
                 True - Visible
                 False - Hidden
         """
-        self.previewController.Panel.setVisible(visible)
+        self.previewController.panel.setVisible(visible)
         QtCore.QSettings().setValue(u'user interface/preview panel',
             QtCore.QVariant(visible))
         self.ViewPreviewPanel.setChecked(visible)
@@ -941,7 +941,7 @@
                 True - Visible
                 False - Hidden
         """
-        self.liveController.Panel.setVisible(visible)
+        self.liveController.panel.setVisible(visible)
         QtCore.QSettings().setValue(u'user interface/live panel',
             QtCore.QVariant(visible))
         self.ViewLivePanel.setChecked(visible)

=== modified file 'openlp/core/ui/servicenoteform.py'
--- openlp/core/ui/servicenoteform.py	2011-02-01 01:02:44 +0000
+++ openlp/core/ui/servicenoteform.py	2011-02-01 18:11:57 +0000
@@ -27,9 +27,8 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import save_cancel_button_box, translate
-from servicenotedialog import Ui_ServiceNoteEdit
 
-class ServiceNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit):
+class ServiceNoteForm(QtGui.QDialog):
     """
     This is the form that is used to edit the verses of the song.
     """

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2011-02-01 00:33:50 +0000
+++ openlp/core/ui/slidecontroller.py	2011-02-01 18:11:57 +0000
@@ -77,14 +77,14 @@
         self.selectedRow = 0
         self.serviceItem = None
         self.alertTab = None
-        self.Panel = QtGui.QWidget(parent.ControlSplitter)
+        self.panel = QtGui.QWidget(parent.ControlSplitter)
         self.slideList = {}
         # Layout for holding panel
-        self.panelLayout = QtGui.QVBoxLayout(self.Panel)
+        self.panelLayout = QtGui.QVBoxLayout(self.panel)
         self.panelLayout.setSpacing(0)
         self.panelLayout.setMargin(0)
         # Type label for the top of the slide controller
-        self.typeLabel = QtGui.QLabel(self.Panel)
+        self.typeLabel = QtGui.QLabel(self.panel)
         if self.isLive:
             self.typeLabel.setText(translate('OpenLP.SlideController', 'Live'))
             self.split = 1
@@ -98,7 +98,7 @@
         self.typeLabel.setAlignment(QtCore.Qt.AlignCenter)
         self.panelLayout.addWidget(self.typeLabel)
         # Splitter
-        self.splitter = QtGui.QSplitter(self.Panel)
+        self.splitter = QtGui.QSplitter(self.panel)
         self.splitter.setOrientation(QtCore.Qt.Vertical)
         self.panelLayout.addWidget(self.splitter)
         # Actual controller section
@@ -185,13 +185,13 @@
                 u'Stop Loop', u':/media/media_stop.png',
                 translate('OpenLP.SlideController', 'Stop continuous loop'),
                 self.onStopLoop)
-            self.DelaySpinBox = QtGui.QSpinBox()
-            self.DelaySpinBox.setMinimum(1)
-            self.DelaySpinBox.setMaximum(180)
-            self.toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
-            self.DelaySpinBox.setSuffix(translate('OpenLP.SlideController',
+            self.delaySpinBox = QtGui.QSpinBox()
+            self.delaySpinBox.setMinimum(1)
+            self.delaySpinBox.setMaximum(180)
+            self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
+            self.delaySpinBox.setSuffix(translate('OpenLP.SlideController',
                 's'))
-            self.DelaySpinBox.setToolTip(translate('OpenLP.SlideController',
+            self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
                 'Delay between slides in seconds'))
         else:
             self.toolbar.addToolbarSeparator(u'Close Separator')
@@ -486,7 +486,7 @@
         self.onSlideSelected()
 
     def receiveSpinDelay(self, value):
-        self.DelaySpinBox.setValue(int(value))
+        self.delaySpinBox.setValue(int(value))
 
     def enableToolBar(self, item):
         """
@@ -998,7 +998,7 @@
         """
         if self.previewListWidget.rowCount() > 1:
             self.timer_id = self.startTimer(
-                int(self.DelaySpinBox.value()) * 1000)
+                int(self.delaySpinBox.value()) * 1000)
             self.toolbar.actions[u'Stop Loop'].setVisible(True)
             self.toolbar.actions[u'Start Loop'].setVisible(False)
 

=== modified file 'openlp/core/ui/themewizard.py'
--- openlp/core/ui/themewizard.py	2011-01-09 01:19:34 +0000
+++ openlp/core/ui/themewizard.py	2011-02-01 18:11:57 +0000
@@ -29,12 +29,11 @@
 from openlp.core.lib import translate, build_icon
 
 class Ui_ThemeWizard(object):
-    def setupUi(self, ThemeWizard):
-        ThemeWizard.setObjectName(u'OpenLP.ThemeWizard')
-        ThemeWizard.setModal(True)
-        ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
-        ThemeWizard.setOptions(
-            QtGui.QWizard.IndependentPages |
+    def setupUi(self, themeWizard):
+        themeWizard.setObjectName(u'OpenLP.ThemeWizard')
+        themeWizard.setModal(True)
+        themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
+        themeWizard.setOptions(QtGui.QWizard.IndependentPages |
             QtGui.QWizard.NoBackButtonOnStartPage)
         # Welcome Page
         self.welcomePage = QtGui.QWizardPage()
@@ -52,7 +51,7 @@
         self.informationLabel.setObjectName(u'InformationLabel')
         self.welcomeLayout.addWidget(self.informationLabel)
         self.welcomeLayout.addStretch()
-        ThemeWizard.addPage(self.welcomePage)
+        themeWizard.addPage(self.welcomePage)
         # Background Page
         self.backgroundPage = QtGui.QWizardPage()
         self.backgroundPage.setObjectName(u'BackgroundPage')
@@ -142,7 +141,7 @@
             self.imageSpacer)
         self.backgroundStack.addWidget(self.imageWidget)
         self.backgroundLayout.addLayout(self.backgroundStack)
-        ThemeWizard.addPage(self.backgroundPage)
+        themeWizard.addPage(self.backgroundPage)
         # Main Area Page
         self.mainAreaPage = QtGui.QWizardPage()
         self.mainAreaPage.setObjectName(u'MainAreaPage')
@@ -225,7 +224,7 @@
         self.shadowSizeSpinBox.setObjectName(u'ShadowSizeSpinBox')
         self.shadowLayout.addWidget(self.shadowSizeSpinBox)
         self.mainAreaLayout.addRow(self.shadowCheckBox, self.shadowLayout)
-        ThemeWizard.addPage(self.mainAreaPage)
+        themeWizard.addPage(self.mainAreaPage)
         # Footer Area Page
         self.footerAreaPage = QtGui.QWizardPage()
         self.footerAreaPage.setObjectName(u'FooterAreaPage')
@@ -251,7 +250,7 @@
         self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
         self.footerAreaLayout.addRow(self.footerSizeLabel,
             self.footerSizeSpinBox)
-        ThemeWizard.addPage(self.footerAreaPage)
+        themeWizard.addPage(self.footerAreaPage)
         # Alignment Page
         self.alignmentPage = QtGui.QWizardPage()
         self.alignmentPage.setObjectName(u'AlignmentPage')
@@ -276,7 +275,7 @@
         self.transitionsCheckBox.setObjectName(u'TransitionsCheckBox')
         self.alignmentLayout.addRow(self.transitionsLabel,
             self.transitionsCheckBox)
-        ThemeWizard.addPage(self.alignmentPage)
+        themeWizard.addPage(self.alignmentPage)
         # Area Position Page
         self.areaPositionPage = QtGui.QWizardPage()
         self.areaPositionPage.setObjectName(u'AreaPositionPage')
@@ -352,7 +351,7 @@
         self.footerPositionLayout.addRow(self.footerHeightLabel,
             self.footerHeightSpinBox)
         self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
-        ThemeWizard.addPage(self.areaPositionPage)
+        themeWizard.addPage(self.areaPositionPage)
         # Preview Page
         self.previewPage = QtGui.QWizardPage()
         self.previewPage.setObjectName(u'PreviewPage')
@@ -381,9 +380,8 @@
         self.previewBoxLabel.setObjectName(u'PreviewBoxLabel')
         self.previewAreaLayout.addWidget(self.previewBoxLabel)
         self.previewLayout.addWidget(self.previewArea)
-        ThemeWizard.addPage(self.previewPage)
-
-        self.retranslateUi(ThemeWizard)
+        themeWizard.addPage(self.previewPage)
+        self.retranslateUi(themeWizard)
         QtCore.QObject.connect(self.backgroundComboBox,
             QtCore.SIGNAL(u'currentIndexChanged(int)'), self.backgroundStack,
             QtCore.SLOT(u'setCurrentIndex(int)'))
@@ -423,10 +421,10 @@
         QtCore.QObject.connect(self.footerPositionCheckBox,
             QtCore.SIGNAL(u'toggled(bool)'), self.footerHeightSpinBox,
             QtCore.SLOT(u'setDisabled(bool)'))
-        QtCore.QMetaObject.connectSlotsByName(ThemeWizard)
+        QtCore.QMetaObject.connectSlotsByName(themeWizard)
 
-    def retranslateUi(self, ThemeWizard):
-        ThemeWizard.setWindowTitle(
+    def retranslateUi(self, themeWizard):
+        themeWizard.setWindowTitle(
             translate('OpenLP.ThemeWizard', 'Theme Wizard'))
         self.titleLabel.setText(
             u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2011-02-01 00:33:50 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2011-02-01 18:11:57 +0000
@@ -525,7 +525,7 @@
         if self.advancedClearComboBox.currentIndex() == 0:
             self.listView.clear()
         if self.listView.count() != 0:
-            self.__checkSecondBible()
+            self.__checkSecondBible(bible, second_bible)
         else:
             self.displayResults(bible, second_bible)
         Receiver.send_message(u'cursor_normal')
@@ -565,14 +565,14 @@
         if self.quickClearComboBox.currentIndex() == 0:
             self.listView.clear()
         if self.listView.count() != 0 and self.search_results:
-            self.__checkSecondBible()
+            self.__checkSecondBible(bible, second_bible)
         elif self.search_results:
             self.displayResults(bible, second_bible)
         self.quickSearchButton.setEnabled(True)
         Receiver.send_message(u'cursor_normal')
         Receiver.send_message(u'openlp_process_events')
 
-    def __checkSecondBible(self):
+    def __checkSecondBible(self, bible, second_bible):
         """
         Check if the first item is a second bible item or not.
         """

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2011-02-01 00:33:50 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2011-02-01 18:11:57 +0000
@@ -648,6 +648,7 @@
         """
         Free up autocompletion memory on dialog exit
         """
+        log.debug (u'SongEditForm.clearCaches')
         self.authors = []
         self.themes = []
         self.books = []
@@ -657,20 +658,21 @@
         """
         Exit Dialog and do not save
         """
+        log.debug (u'SongEditForm.reject')
         Receiver.send_message(u'songs_edit_clear')
         self.clearCaches()
-        self.close()
+        QtGui.QDialog.reject(self)
 
     def accept(self):
         """
         Exit Dialog and save song if valid
         """
-        log.debug(u'accept')
+        log.debug(u'SongEditForm.accept')
         self.clearCaches()
         if self._validate_song():
             self.saveSong()
             Receiver.send_message(u'songs_load_list')
-            self.close()
+            QtGui.QDialog.accept(self)
 
     def saveSong(self, preview=False):
         """

=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py	2011-02-01 00:33:50 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py	2011-02-01 18:11:57 +0000
@@ -94,8 +94,8 @@
         self.typeListWidget.setFocus()
         return QtGui.QDialog.exec_(self)
 
-    def _getCurrentItemId(self, ListWidget):
-        item = ListWidget.currentItem()
+    def _getCurrentItemId(self, listWidget):
+        item = listWidget.currentItem()
         if item:
             item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
             return item_id
@@ -390,13 +390,13 @@
                 book.name = temp_name
                 book.publisher = temp_publisher
 
-    def __mergeObjects(self, object, merge, reset):
+    def __mergeObjects(self, dbObject, merge, reset):
         """
         Utility method to merge two objects to leave one in the database.
         """
         Receiver.send_message(u'cursor_busy')
         Receiver.send_message(u'openlp_process_events')
-        merge(object)
+        merge(dbObject)
         reset()
         Receiver.send_message(u'songs_load_list')
         Receiver.send_message(u'cursor_normal')

=== modified file 'openlp/plugins/songs/lib/easislidesimport.py'
--- openlp/plugins/songs/lib/easislidesimport.py	2011-02-01 00:33:50 +0000
+++ openlp/plugins/songs/lib/easislidesimport.py	2011-02-01 18:11:57 +0000
@@ -140,25 +140,25 @@
         ``song``
             The current song being imported.
         """
-        copyright = []
-        self.__add_copyright_element(copyright, song.Copyright)
-        self.__add_copyright_element(copyright, song.LicenceAdmin1)
-        self.__add_copyright_element(copyright, song.LicenceAdmin2)
-        self.add_copyright(u' '.join(copyright))
+        copyright_list = []
+        self.__add_copyright_element(copyright_list, song.Copyright)
+        self.__add_copyright_element(copyright_list, song.LicenceAdmin1)
+        self.__add_copyright_element(copyright_list, song.LicenceAdmin2)
+        self.add_copyright(u' '.join(copyright_list))
 
-    def __add_copyright_element(self, copyright, element):
+    def __add_copyright_element(self, copyright_list, element):
         """
         Add a piece of copyright to the total copyright information for the
         song.
 
-        ``copyright``
+        ``copyright_list``
             The array to add the information to.
 
         ``element``
             The imported variable to get the data from.
         """
         try:
-            copyright.append(unicode(element).strip())
+            copyright_list.append(unicode(element).strip())
         except UnicodeDecodeError:
             log.exception(u'Unicode error decoding %s' % element)
             self._success = False

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to