← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

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

Requested reviews:
  OpenLP Core (openlp-core)


Exception handling, whitespace and naming cleanups
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/31153
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py	2010-07-27 20:35:50 +0000
+++ openlp/core/ui/generaltab.py	2010-07-28 14:30:24 +0000
@@ -120,7 +120,7 @@
         self.settingsLayout.addWidget(self.timeoutLabel, 2, 0, 1, 1)
         self.timeoutSpinBox = QtGui.QSpinBox(self.settingsGroupBox)
         self.timeoutSpinBox.setObjectName("timeoutSpinBox")
-        self.settingsLayout.addWidget(self.timeoutSpinBox, 2,1, 1, 1)
+        self.settingsLayout.addWidget(self.timeoutSpinBox, 2, 1, 1, 1)
         self.generalLeftLayout.addWidget(self.settingsGroupBox)
         self.generalLeftSpacer = QtGui.QSpacerItem(20, 40,
             QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2010-07-26 15:19:11 +0000
+++ openlp/core/ui/mainwindow.py	2010-07-28 14:30:24 +0000
@@ -220,17 +220,17 @@
         # Create the menu items
         self.FileNewItem = QtGui.QAction(MainWindow)
         self.FileNewItem.setIcon(
-            self.ServiceManagerContents.Toolbar.getIconFromTitle(
+            self.ServiceManagerContents.toolbar.getIconFromTitle(
             u'New Service'))
         self.FileNewItem.setObjectName(u'FileNewItem')
         self.FileOpenItem = QtGui.QAction(MainWindow)
         self.FileOpenItem.setIcon(
-            self.ServiceManagerContents.Toolbar.getIconFromTitle(
+            self.ServiceManagerContents.toolbar.getIconFromTitle(
             u'Open Service'))
         self.FileOpenItem.setObjectName(u'FileOpenItem')
         self.FileSaveItem = QtGui.QAction(MainWindow)
         self.FileSaveItem.setIcon(
-            self.ServiceManagerContents.Toolbar.getIconFromTitle(
+            self.ServiceManagerContents.toolbar.getIconFromTitle(
             u'Save Service'))
         self.FileSaveItem.setObjectName(u'FileSaveItem')
         self.FileSaveAsItem = QtGui.QAction(MainWindow)

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2010-07-26 15:19:11 +0000
+++ openlp/core/ui/servicemanager.py	2010-07-28 14:30:24 +0000
@@ -112,60 +112,60 @@
         self.serviceNoteForm = ServiceNoteForm(self.parent)
         self.serviceItemEditForm = ServiceItemEditForm(self.parent)
         #start with the layout
-        self.Layout = QtGui.QVBoxLayout(self)
-        self.Layout.setSpacing(0)
-        self.Layout.setMargin(0)
+        self.layout = QtGui.QVBoxLayout(self)
+        self.layout.setSpacing(0)
+        self.layout.setMargin(0)
         # Create the top toolbar
-        self.Toolbar = OpenLPToolbar(self)
-        self.Toolbar.addToolbarButton(
+        self.toolbar = OpenLPToolbar(self)
+        self.toolbar.addToolbarButton(
             translate('OpenLP.ServiceManager', 'New Service'),
             u':/general/general_new.png',
             translate('OpenLP.ServiceManager', 'Create a new service'),
             self.onNewService)
-        self.Toolbar.addToolbarButton(
+        self.toolbar.addToolbarButton(
             translate('OpenLP.ServiceManager', 'Open Service'),
             u':/general/general_open.png',
             translate('OpenLP.ServiceManager', 'Load an existing service'),
             self.onLoadService)
-        self.Toolbar.addToolbarButton(
+        self.toolbar.addToolbarButton(
             translate('OpenLP.ServiceManager', 'Save Service'),
             u':/general/general_save.png',
             translate('OpenLP.ServiceManager', 'Save this service'),
             self.onQuickSaveService)
-        self.Toolbar.addSeparator()
-        self.ThemeLabel = QtGui.QLabel(translate('OpenLP.ServiceManager',
+        self.toolbar.addSeparator()
+        self.themeLabel = QtGui.QLabel(translate('OpenLP.ServiceManager',
             'Theme:'), self)
-        self.ThemeLabel.setMargin(3)
-        self.Toolbar.addToolbarWidget(u'ThemeLabel', self.ThemeLabel)
-        self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
-        self.ThemeComboBox.setToolTip(translate('OpenLP.ServiceManager',
+        self.themeLabel.setMargin(3)
+        self.toolbar.addToolbarWidget(u'ThemeLabel', self.themeLabel)
+        self.themeComboBox = QtGui.QComboBox(self.toolbar)
+        self.themeComboBox.setToolTip(translate('OpenLP.ServiceManager',
             'Select a theme for the service'))
-        self.ThemeComboBox.setSizeAdjustPolicy(
+        self.themeComboBox.setSizeAdjustPolicy(
             QtGui.QComboBox.AdjustToContents)
-        self.Toolbar.addToolbarWidget(u'ThemeWidget', self.ThemeComboBox)
-        self.Layout.addWidget(self.Toolbar)
+        self.toolbar.addToolbarWidget(u'ThemeWidget', self.themeComboBox)
+        self.layout.addWidget(self.toolbar)
         # Create the service manager list
-        self.ServiceManagerList = ServiceManagerList(self)
-        self.ServiceManagerList.setEditTriggers(
+        self.serviceManagerList = ServiceManagerList(self)
+        self.serviceManagerList.setEditTriggers(
             QtGui.QAbstractItemView.CurrentChanged |
             QtGui.QAbstractItemView.DoubleClicked |
             QtGui.QAbstractItemView.EditKeyPressed)
-        self.ServiceManagerList.setDragDropMode(
+        self.serviceManagerList.setDragDropMode(
             QtGui.QAbstractItemView.DragDrop)
-        self.ServiceManagerList.setAlternatingRowColors(True)
-        self.ServiceManagerList.setHeaderHidden(True)
-        self.ServiceManagerList.setExpandsOnDoubleClick(False)
-        self.ServiceManagerList.setContextMenuPolicy(
+        self.serviceManagerList.setAlternatingRowColors(True)
+        self.serviceManagerList.setHeaderHidden(True)
+        self.serviceManagerList.setExpandsOnDoubleClick(False)
+        self.serviceManagerList.setContextMenuPolicy(
             QtCore.Qt.CustomContextMenu)
-        QtCore.QObject.connect(self.ServiceManagerList,
+        QtCore.QObject.connect(self.serviceManagerList,
             QtCore.SIGNAL('customContextMenuRequested(QPoint)'),
             self.contextMenu)
-        self.ServiceManagerList.setObjectName(u'ServiceManagerList')
+        self.serviceManagerList.setObjectName(u'serviceManagerList')
         # enable drop
-        self.ServiceManagerList.__class__.dragEnterEvent = self.dragEnterEvent
-        self.ServiceManagerList.__class__.dragMoveEvent = self.dragEnterEvent
-        self.ServiceManagerList.__class__.dropEvent = self.dropEvent
-        self.Layout.addWidget(self.ServiceManagerList)
+        self.serviceManagerList.__class__.dragEnterEvent = self.dragEnterEvent
+        self.serviceManagerList.__class__.dragMoveEvent = self.dragEnterEvent
+        self.serviceManagerList.__class__.dropEvent = self.dropEvent
+        self.layout.addWidget(self.serviceManagerList)
         # Add the bottom toolbar
         self.OrderToolbar = OpenLPToolbar(self)
         self.OrderToolbar.addToolbarButton(
@@ -199,15 +199,15 @@
             translate('OpenLP.ServiceManager',
             'Delete the selected item from the service.'),
             self.onDeleteFromService)
-        self.Layout.addWidget(self.OrderToolbar)
+        self.layout.addWidget(self.OrderToolbar)
         # Connect up our signals and slots
-        QtCore.QObject.connect(self.ThemeComboBox,
+        QtCore.QObject.connect(self.themeComboBox,
             QtCore.SIGNAL(u'activated(int)'), self.onThemeComboBoxSelected)
-        QtCore.QObject.connect(self.ServiceManagerList,
+        QtCore.QObject.connect(self.serviceManagerList,
             QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.makeLive)
-        QtCore.QObject.connect(self.ServiceManagerList,
+        QtCore.QObject.connect(self.serviceManagerList,
            QtCore.SIGNAL(u'itemCollapsed(QTreeWidgetItem*)'), self.collapsed)
-        QtCore.QObject.connect(self.ServiceManagerList,
+        QtCore.QObject.connect(self.serviceManagerList,
            QtCore.SIGNAL(u'itemExpanded(QTreeWidgetItem*)'), self.expanded)
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
@@ -268,7 +268,7 @@
         self.suffixes.append(suffix)
 
     def contextMenu(self, point):
-        item = self.ServiceManagerList.itemAt(point)
+        item = self.serviceManagerList.itemAt(point)
         if item is None:
             return
         if item.parent() is None:
@@ -289,7 +289,7 @@
         self.themeMenu.menuAction().setVisible(False)
         if serviceItem[u'service_item'].is_text():
             self.themeMenu.menuAction().setVisible(True)
-        action = self.menu.exec_(self.ServiceManagerList.mapToGlobal(point))
+        action = self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
         if action == self.editAction:
             self.remoteEdit()
         if action == self.maintainAction:
@@ -326,14 +326,14 @@
         Called by the SlideController to select the
         next service item
         """
-        if len(self.ServiceManagerList.selectedItems()) == 0:
+        if len(self.serviceManagerList.selectedItems()) == 0:
             return
-        selected = self.ServiceManagerList.selectedItems()[0]
+        selected = self.serviceManagerList.selectedItems()[0]
         lookFor = 0
-        serviceIterator = QtGui.QTreeWidgetItemIterator(self.ServiceManagerList)
+        serviceIterator = QtGui.QTreeWidgetItemIterator(self.serviceManagerList)
         while serviceIterator.value():
             if lookFor == 1 and serviceIterator.value().parent() is None:
-                self.ServiceManagerList.setCurrentItem(serviceIterator.value())
+                self.serviceManagerList.setCurrentItem(serviceIterator.value())
                 self.makeLive()
                 return
             if serviceIterator.value() == selected:
@@ -345,15 +345,15 @@
         Called by the SlideController to select the
         previous service item
         """
-        if len(self.ServiceManagerList.selectedItems()) == 0:
+        if len(self.serviceManagerList.selectedItems()) == 0:
             return
-        selected = self.ServiceManagerList.selectedItems()[0]
+        selected = self.serviceManagerList.selectedItems()[0]
         prevItem = None
-        serviceIterator = QtGui.QTreeWidgetItemIterator(self.ServiceManagerList)
+        serviceIterator = QtGui.QTreeWidgetItemIterator(self.serviceManagerList)
         while serviceIterator.value():
             if serviceIterator.value() == selected:
                 if prevItem:
-                    self.ServiceManagerList.setCurrentItem(prevItem)
+                    self.serviceManagerList.setCurrentItem(prevItem)
                     self.makeLive()
                 return
             if serviceIterator.value().parent() is None:
@@ -370,9 +370,9 @@
         """
         Makes a specific item in the service live
         """
-        if index >= 0 and index < self.ServiceManagerList.topLevelItemCount:
-            item = self.ServiceManagerList.topLevelItem(index)
-            self.ServiceManagerList.setCurrentItem(item)
+        if index >= 0 and index < self.serviceManagerList.topLevelItemCount:
+            item = self.serviceManagerList.topLevelItem(index)
+            self.serviceManagerList.setCurrentItem(item)
             self.makeLive()
 
     def onMoveSelectionUp(self):
@@ -380,7 +380,7 @@
         Moves the selection up the window
         Called by the up arrow
         """
-        serviceIterator = QtGui.QTreeWidgetItemIterator(self.ServiceManagerList)
+        serviceIterator = QtGui.QTreeWidgetItemIterator(self.serviceManagerList)
         tempItem = None
         setLastItem = False
         while serviceIterator:
@@ -405,7 +405,7 @@
         Moves the selection down the window
         Called by the down arrow
         """
-        serviceIterator = QtGui.QTreeWidgetItemIterator(self.ServiceManagerList)
+        serviceIterator = QtGui.QTreeWidgetItemIterator(self.serviceManagerList)
         firstItem = serviceIterator
         setSelected = False
         while serviceIterator:
@@ -503,7 +503,7 @@
                 QtGui.QMessageBox.Save)
             if ret == QtGui.QMessageBox.Save:
                 self.onSaveService()
-        self.ServiceManagerList.clear()
+        self.serviceManagerList.clear()
         self.serviceItems = []
         self.serviceName = u''
         self.isNew = True
@@ -531,10 +531,10 @@
             item[u'order'] = count
             count += 1
         #Repaint the screen
-        self.ServiceManagerList.clear()
+        self.serviceManagerList.clear()
         for itemcount, item in enumerate(self.serviceItems):
             serviceitem = item[u'service_item']
-            treewidgetitem = QtGui.QTreeWidgetItem(self.ServiceManagerList)
+            treewidgetitem = QtGui.QTreeWidgetItem(self.serviceManagerList)
             if serviceitem.is_valid:
                 if serviceitem.notes:
                     icon = QtGui.QImage(serviceitem.icon)
@@ -565,7 +565,7 @@
                 if serviceItem == itemcount and serviceItemCount == count:
                     #preserve expanding status as setCurrentItem sets it to True
                     temp = item[u'expanded']
-                    self.ServiceManagerList.setCurrentItem(treewidgetitem1)
+                    self.serviceManagerList.setCurrentItem(treewidgetitem1)
                     item[u'expanded'] = temp
             treewidgetitem.setExpanded(item[u'expanded'])
 
@@ -758,7 +758,7 @@
         """
         Set the theme for the current service
         """
-        self.service_theme = unicode(self.ThemeComboBox.currentText())
+        self.service_theme = unicode(self.themeComboBox.currentText())
         self.parent.RenderManager.set_service_theme(self.service_theme)
         QtCore.QSettings().setValue(
             self.parent.serviceSettingsSection + u'/service theme',
@@ -771,11 +771,11 @@
         sure the theme combo box is in the correct state.
         """
         if self.parent.RenderManager.theme_level == ThemeLevel.Global:
-            self.Toolbar.actions[u'ThemeLabel'].setVisible(False)
-            self.Toolbar.actions[u'ThemeWidget'].setVisible(False)
+            self.toolbar.actions[u'ThemeLabel'].setVisible(False)
+            self.toolbar.actions[u'ThemeWidget'].setVisible(False)
         else:
-            self.Toolbar.actions[u'ThemeLabel'].setVisible(True)
-            self.Toolbar.actions[u'ThemeWidget'].setVisible(True)
+            self.toolbar.actions[u'ThemeLabel'].setVisible(True)
+            self.toolbar.actions[u'ThemeWidget'].setVisible(True)
 
     def regenerateServiceItems(self):
         """
@@ -786,7 +786,7 @@
         self.parent.RenderManager.themedata = None
         if self.serviceItems:
             tempServiceItems = self.serviceItems
-            self.ServiceManagerList.clear()
+            self.serviceManagerList.clear()
             self.serviceItems = []
             self.isNew = True
             for item in tempServiceItems:
@@ -903,7 +903,7 @@
         """
         Finds a ServiceItem in the list
         """
-        items = self.ServiceManagerList.selectedItems()
+        items = self.serviceManagerList.selectedItems()
         pos = 0
         count = 0
         for item in items:
@@ -923,7 +923,6 @@
 
         ``event``
             Handle of the event pint passed
-
         """
         event.accept()
 
@@ -939,7 +938,7 @@
         link = event.mimeData()
         if link.hasText():
             plugin = event.mimeData().text()
-            item = self.ServiceManagerList.itemAt(event.pos())
+            item = self.serviceManagerList.itemAt(event.pos())
             #ServiceManager started the drag and drop
             if plugin == u'ServiceManager':
                 startpos, startCount = self.findServiceItem()
@@ -983,23 +982,21 @@
         ``theme_list``
             A list of current themes to be displayed
         """
-        self.ThemeComboBox.clear()
+        self.themeComboBox.clear()
         self.themeMenu.clear()
-        self.ThemeComboBox.addItem(u'')
+        self.themeComboBox.addItem(u'')
         for theme in theme_list:
-            self.ThemeComboBox.addItem(theme)
-            action = context_menu_action(
-                self.ServiceManagerList,
-                None,
-                theme , self.onThemeChangeAction)
+            self.themeComboBox.addItem(theme)
+            action = context_menu_action(self.serviceManagerList, None, theme,
+                self.onThemeChangeAction)
             self.themeMenu.addAction(action)
-        id = self.ThemeComboBox.findText(self.service_theme,
+        index = self.themeComboBox.findText(self.service_theme,
             QtCore.Qt.MatchExactly)
         # Not Found
-        if id == -1:
-            id = 0
+        if index == -1:
+            index = 0
             self.service_theme = u''
-        self.ThemeComboBox.setCurrentIndex(id)
+        self.themeComboBox.setCurrentIndex(index)
         self.parent.RenderManager.set_service_theme(self.service_theme)
         self.regenerateServiceItems()
 

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2010-07-27 12:18:10 +0000
+++ openlp/core/ui/thememanager.py	2010-07-28 14:30:24 +0000
@@ -49,7 +49,7 @@
         QtGui.QWidget.__init__(self, parent)
         self.parent = parent
         self.settingsSection = u'themes'
-        self.serviceComboBox = self.parent.ServiceManagerContents.ThemeComboBox
+        self.serviceComboBox = self.parent.ServiceManagerContents.themeComboBox
         self.layout = QtGui.QVBoxLayout(self)
         self.layout.setSpacing(0)
         self.layout.setMargin(0)

=== modified file 'openlp/core/utils/languagemanager.py'
--- openlp/core/utils/languagemanager.py	2010-07-25 11:47:53 +0000
+++ openlp/core/utils/languagemanager.py	2010-07-28 14:30:24 +0000
@@ -54,10 +54,10 @@
         """
         if LanguageManager.AutoLanguage:
             language = QtCore.QLocale.system().name()
-        lang_Path = AppLocation.get_directory(AppLocation.AppDir)
-        lang_Path = os.path.join(lang_Path, u'resources', u'i18n')
+        lang_path = AppLocation.get_directory(AppLocation.AppDir)
+        lang_path = os.path.join(lang_path, u'resources', u'i18n')
         app_translator = QtCore.QTranslator()
-        if app_translator.load("openlp_" + language, lang_Path):
+        if app_translator.load("openlp_" + language, lang_path):
             return app_translator
 
     @staticmethod

=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/alerts/alertsplugin.py	2010-07-28 14:30:24 +0000
@@ -66,11 +66,9 @@
         """
         log.info(u'add tools menu')
         self.toolsAlertItem = QtGui.QAction(tools_menu)
-        AlertIcon = build_icon(u':/plugins/plugin_alerts.png')
-        self.toolsAlertItem.setIcon(AlertIcon)
+        self.toolsAlertItem.setIcon(build_icon(u':/plugins/plugin_alerts.png'))
         self.toolsAlertItem.setObjectName(u'toolsAlertItem')
-        self.toolsAlertItem.setText(
-            translate('AlertsPlugin', '&Alert'))
+        self.toolsAlertItem.setText(translate('AlertsPlugin', '&Alert'))
         self.toolsAlertItem.setStatusTip(
             translate('AlertsPlugin', 'Show an alert message.'))
         self.toolsAlertItem.setShortcut(u'F7')

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2010-07-28 14:30:24 +0000
@@ -50,14 +50,14 @@
         if self.manager is None:
             self.manager = BibleManager(self)
         Plugin.initialise(self)
-        self.ImportBibleItem.setVisible(True)
-        self.ExportBibleItem.setVisible(True)
+        self.importBibleItem.setVisible(True)
+        self.exportBibleItem.setVisible(True)
 
     def finalise(self):
         log.info(u'Plugin Finalise')
         Plugin.finalise(self)
-        self.ImportBibleItem.setVisible(False)
-        self.ExportBibleItem.setVisible(False)
+        self.importBibleItem.setVisible(False)
+        self.exportBibleItem.setVisible(False)
 
     def getSettingsTab(self):
         return BiblesTab(self.name)
@@ -67,23 +67,23 @@
         return BibleMediaItem(self, self.icon, self.name)
 
     def addImportMenuItem(self, import_menu):
-        self.ImportBibleItem = QtGui.QAction(import_menu)
-        self.ImportBibleItem.setObjectName(u'ImportBibleItem')
-        import_menu.addAction(self.ImportBibleItem)
-        self.ImportBibleItem.setText(
+        self.importBibleItem = QtGui.QAction(import_menu)
+        self.importBibleItem.setObjectName(u'importBibleItem')
+        import_menu.addAction(self.importBibleItem)
+        self.importBibleItem.setText(
             translate('BiblesPlugin', '&Bible'))
         # signals and slots
-        QtCore.QObject.connect(self.ImportBibleItem,
+        QtCore.QObject.connect(self.importBibleItem,
             QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
-        self.ImportBibleItem.setVisible(False)
+        self.importBibleItem.setVisible(False)
 
     def addExportMenuItem(self, export_menu):
-        self.ExportBibleItem = QtGui.QAction(export_menu)
-        self.ExportBibleItem.setObjectName(u'ExportBibleItem')
-        export_menu.addAction(self.ExportBibleItem)
-        self.ExportBibleItem.setText(translate(
+        self.exportBibleItem = QtGui.QAction(export_menu)
+        self.exportBibleItem.setObjectName(u'exportBibleItem')
+        export_menu.addAction(self.exportBibleItem)
+        self.exportBibleItem.setText(translate(
             'BiblesPlugin', '&Bible'))
-        self.ExportBibleItem.setVisible(False)
+        self.exportBibleItem.setVisible(False)
 
     def onBibleImportClick(self):
         if self.mediaItem:

=== modified file 'openlp/plugins/bibles/forms/importwizardform.py'
--- openlp/plugins/bibles/forms/importwizardform.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/bibles/forms/importwizardform.py	2010-07-28 14:30:24 +0000
@@ -50,8 +50,8 @@
     }
 
     @classmethod
-    def get_name(cls, id):
-        return cls.Names[id]
+    def get_name(cls, name):
+        return cls.Names[name]
 
 
 class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
@@ -260,8 +260,8 @@
         if self.currentId() == 3:
             Receiver.send_message(u'bibles_stop_import')
 
-    def onCurrentIdChanged(self, id):
-        if id == 3:
+    def onCurrentIdChanged(self, pageId):
+        if pageId == 3:
             self.preImport()
             self.performImport()
             self.postImport()
@@ -327,6 +327,7 @@
         #Load and store Crosswalk Bibles
         filepath = AppLocation.get_directory(AppLocation.PluginsDir)
         filepath = os.path.join(filepath, u'bibles', u'resources')
+        books_file = None
         try:
             self.web_bible_list[WebDownload.Crosswalk] = {}
             books_file = open(
@@ -348,6 +349,7 @@
             if books_file:
                 books_file.close()
         #Load and store BibleGateway Bibles
+        books_file = None
         try:
             self.web_bible_list[WebDownload.BibleGateway] = {}
             books_file = open(os.path.join(filepath, u'biblegateway.csv'), 'r')

=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/bibles/lib/biblestab.py	2010-07-28 14:30:24 +0000
@@ -241,10 +241,10 @@
         self.BibleThemeComboBox.addItem(u'')
         for theme in theme_list:
             self.BibleThemeComboBox.addItem(theme)
-        id = self.BibleThemeComboBox.findText(
+        index = self.BibleThemeComboBox.findText(
             unicode(self.bible_theme), QtCore.Qt.MatchExactly)
-        if id == -1:
+        if index == -1:
             # Not Found
-            id = 0
+            index = 0
             self.bible_theme = u''
-        self.BibleThemeComboBox.setCurrentIndex(id)
+        self.BibleThemeComboBox.setCurrentIndex(index)

=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/bibles/lib/manager.py	2010-07-28 14:30:24 +0000
@@ -63,20 +63,20 @@
     WebDownload = 3
 
     @staticmethod
-    def get_class(id):
+    def get_class(format):
         """
         Return the appropriate imeplementation class.
 
-        ``id``
+        ``format``
             The Bible format.
         """
-        if id == BibleFormat.OSIS:
+        if format == BibleFormat.OSIS:
             return OSISBible
-        elif id == BibleFormat.CSV:
+        elif format == BibleFormat.CSV:
             return CSVBible
-        elif id == BibleFormat.OpenSong:
+        elif format == BibleFormat.OpenSong:
             return OpenSongBible
-        elif id == BibleFormat.WebDownload:
+        elif format == BibleFormat.WebDownload:
             return HTTPBible
         else:
             return None

=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/custom/lib/customtab.py	2010-07-28 14:30:24 +0000
@@ -38,29 +38,29 @@
     def setupUi(self):
         self.setObjectName(u'CustomTab')
         self.tabTitleVisible = translate('CustomPlugin.CustomTab', 'Custom')
-        self.CustomLayout = QtGui.QFormLayout(self)
-        self.CustomLayout.setSpacing(8)
-        self.CustomLayout.setMargin(8)
-        self.CustomLayout.setObjectName(u'CustomLayout')
-        self.CustomModeGroupBox = QtGui.QGroupBox(self)
-        self.CustomModeGroupBox.setObjectName(u'CustomModeGroupBox')
-        self.CustomModeLayout = QtGui.QVBoxLayout(self.CustomModeGroupBox)
-        self.CustomModeLayout.setSpacing(8)
-        self.CustomModeLayout.setMargin(8)
-        self.CustomModeLayout.setObjectName(u'CustomModeLayout')
-        self.DisplayFooterCheckBox = QtGui.QCheckBox(self.CustomModeGroupBox)
-        self.DisplayFooterCheckBox.setObjectName(u'DisplayFooterCheckBox')
-        self.CustomModeLayout.addWidget(self.DisplayFooterCheckBox)
-        self.CustomLayout.setWidget(
-            0, QtGui.QFormLayout.LabelRole, self.CustomModeGroupBox)
-        QtCore.QObject.connect(self.DisplayFooterCheckBox,
+        self.customLayout = QtGui.QFormLayout(self)
+        self.customLayout.setSpacing(8)
+        self.customLayout.setMargin(8)
+        self.customLayout.setObjectName(u'customLayout')
+        self.customModeGroupBox = QtGui.QGroupBox(self)
+        self.customModeGroupBox.setObjectName(u'customModeGroupBox')
+        self.customModeLayout = QtGui.QVBoxLayout(self.customModeGroupBox)
+        self.customModeLayout.setSpacing(8)
+        self.customModeLayout.setMargin(8)
+        self.customModeLayout.setObjectName(u'customModeLayout')
+        self.displayFooterCheckBox = QtGui.QCheckBox(self.customModeGroupBox)
+        self.displayFooterCheckBox.setObjectName(u'displayFooterCheckBox')
+        self.customModeLayout.addWidget(self.displayFooterCheckBox)
+        self.customLayout.setWidget(
+            0, QtGui.QFormLayout.LabelRole, self.customModeGroupBox)
+        QtCore.QObject.connect(self.displayFooterCheckBox,
             QtCore.SIGNAL(u'stateChanged(int)'),
             self.onDisplayFooterCheckBoxChanged)
 
     def retranslateUi(self):
-        self.CustomModeGroupBox.setTitle(translate('CustomPlugin.CustomTab',
+        self.customModeGroupBox.setTitle(translate('CustomPlugin.CustomTab',
             'Custom Display'))
-        self.DisplayFooterCheckBox.setText(
+        self.displayFooterCheckBox.setText(
             translate('CustomPlugin.CustomTab', 'Display footer'))
 
     def onDisplayFooterCheckBoxChanged(self, check_state):
@@ -73,7 +73,7 @@
         self.displayFooter = QtCore.QSettings().value(
             self.settingsSection + u'/display footer',
             QtCore.QVariant(True)).toBool()
-        self.DisplayFooterCheckBox.setChecked(self.displayFooter)
+        self.displayFooterCheckBox.setChecked(self.displayFooter)
 
     def save(self):
         QtCore.QSettings().setValue(self.settingsSection + u'/display footer',

=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py	2010-07-27 09:32:52 +0000
+++ openlp/plugins/songs/lib/__init__.py	2010-07-28 14:30:24 +0000
@@ -42,20 +42,20 @@
     CSV = 3
 
     @staticmethod
-    def get_class(id):
+    def get_class(format):
         """
         Return the appropriate imeplementation class.
 
-        ``id``
+        ``format``
             The song format.
         """
-#        if id == SongFormat.OpenLyrics:
+#        if format == SongFormat.OpenLyrics:
 #            return OpenLyricsSong
-#        elif id == SongFormat.OpenSong:
+#        elif format == SongFormat.OpenSong:
 #            return OpenSongSong
-#        elif id == SongFormat.CCLI:
+#        elif format == SongFormat.CCLI:
 #            return CCLISong
-#        elif id == SongFormat.CSV:
+#        elif format == SongFormat.CSV:
 #            return CSVSong
 #        else:
         return None


Follow ups