← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/general into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/general into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #730294 in OpenLP: "Auto-preview, not previewing next item if go live from preview"
  https://bugs.launchpad.net/openlp/+bug/730294

For more details, see:
https://code.launchpad.net/~trb143/openlp/general/+merge/57987

Finish cleaning up PLUGIN so it has python methods and fields.
-- 
https://code.launchpad.net/~trb143/openlp/general/+merge/57987
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/general into lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2011-04-15 21:43:59 +0000
+++ openlp/core/lib/mediamanageritem.py	2011-04-16 07:57:32 +0000
@@ -92,7 +92,7 @@
         self.parent = parent
         #TODO: plugin should not be the parent in future
         self.plugin = parent # plugin
-        visible_title = self.plugin.getString(StringContent.VisibleName)
+        visible_title = self.plugin.get_string(StringContent.VisibleName)
         self.title = unicode(visible_title[u'title'])
         self.settingsSection = self.plugin.name.lower()
         self.icon = None
@@ -234,8 +234,8 @@
             if action[0] == StringContent.Preview:
                 self.addToolbarSeparator()
             self.addToolbarButton(
-                self.plugin.getString(action[0])[u'title'],
-                self.plugin.getString(action[0])[u'tooltip'],
+                self.plugin.get_string(action[0])[u'title'],
+                self.plugin.get_string(action[0])[u'tooltip'],
                 action[1], action[2])
 
     def addListViewToToolBar(self):
@@ -259,34 +259,34 @@
             self.listView.addAction(
                 context_menu_action(
                     self.listView, u':/general/general_edit.png',
-                    self.plugin.getString(StringContent.Edit)[u'title'],
+                    self.plugin.get_string(StringContent.Edit)[u'title'],
                     self.onEditClick, context=QtCore.Qt.WidgetShortcut))
             self.listView.addAction(context_menu_separator(self.listView))
         if self.hasDeleteIcon:
             self.listView.addAction(
                 context_menu_action(
                     self.listView, u':/general/general_delete.png',
-                    self.plugin.getString(StringContent.Delete)[u'title'],
+                    self.plugin.get_string(StringContent.Delete)[u'title'],
                     self.onDeleteClick, [QtCore.Qt.Key_Delete],
                     context=QtCore.Qt.WidgetShortcut))
             self.listView.addAction(context_menu_separator(self.listView))
         self.listView.addAction(
             context_menu_action(
                 self.listView, u':/general/general_preview.png',
-                self.plugin.getString(StringContent.Preview)[u'title'],
+                self.plugin.get_string(StringContent.Preview)[u'title'],
                 self.onPreviewClick, [QtCore.Qt.Key_Enter,
                 QtCore.Qt.Key_Return], context=QtCore.Qt.WidgetShortcut))
         self.listView.addAction(
             context_menu_action(
                 self.listView, u':/general/general_live.png',
-                self.plugin.getString(StringContent.Live)[u'title'],
+                self.plugin.get_string(StringContent.Live)[u'title'],
                 self.onLiveClick, [QtCore.Qt.ShiftModifier + \
                 QtCore.Qt.Key_Enter, QtCore.Qt.ShiftModifier + \
                 QtCore.Qt.Key_Return], context=QtCore.Qt.WidgetShortcut))
         self.listView.addAction(
             context_menu_action(
                 self.listView, u':/general/general_add.png',
-                self.plugin.getString(StringContent.Service)[u'title'],
+                self.plugin.get_string(StringContent.Service)[u'title'],
                 self.onAddClick, [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal],
                 context=QtCore.Qt.WidgetShortcut))
         if self.addToServiceItem:
@@ -443,7 +443,7 @@
             serviceItem = self.buildServiceItem()
             if serviceItem:
                 serviceItem.from_plugin = True
-                self.parent.previewController.addServiceItem(serviceItem)
+                self.parent.preview_controller.addServiceItem(serviceItem)
                 if keepFocus:
                     self.listView.setFocus()
 
@@ -461,7 +461,7 @@
             serviceItem = self.buildServiceItem()
             if serviceItem:
                 serviceItem.from_plugin = True
-                self.parent.liveController.addServiceItem(serviceItem)
+                self.parent.live_controller.addServiceItem(serviceItem)
 
     def onAddClick(self):
         """
@@ -479,7 +479,7 @@
                 serviceItem = self.buildServiceItem(None, True)
                 if serviceItem:
                     serviceItem.from_plugin = False
-                    self.parent.serviceManager.addServiceItem(serviceItem,
+                    self.parent.service_manager.addServiceItem(serviceItem,
                         replace=self.remoteTriggered)
             else:
                 items = self.listView.selectedIndexes()
@@ -487,7 +487,7 @@
                     serviceItem = self.buildServiceItem(item, True)
                     if serviceItem:
                         serviceItem.from_plugin = False
-                        self.parent.serviceManager.addServiceItem(serviceItem)
+                        self.parent.service_manager.addServiceItem(serviceItem)
 
     def onAddEditClick(self):
         """
@@ -499,14 +499,14 @@
                     'You must select one or more items.'))
         else:
             log.debug(u'%s Add requested', self.plugin.name)
-            serviceItem = self.parent.serviceManager.getServiceItem()
+            serviceItem = self.parent.service_manager.getServiceItem()
             if not serviceItem:
                 QtGui.QMessageBox.information(self, UiStrings().NISs,
                     translate('OpenLP.MediaManagerItem',
                         'You must select an existing service item to add to.'))
             elif self.plugin.name.lower() == serviceItem.name.lower():
                 self.generateSlideData(serviceItem)
-                self.parent.serviceManager.addServiceItem(serviceItem,
+                self.parent.service_manager.addServiceItem(serviceItem,
                     replace=True)
             else:
                 # Turn off the remote edit update message indicator

=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2011-04-15 21:43:59 +0000
+++ openlp/core/lib/plugin.py	2011-04-16 07:57:32 +0000
@@ -87,19 +87,19 @@
 
     **Hook Functions**
 
-    ``checkPreConditions()``
+    ``check_pre_conditions()``
         Provides the Plugin with a handle to check if it can be loaded.
 
-    ``getMediaManagerItem()``
+    ``get_media_manager_item()``
         Returns an instance of MediaManagerItem to be used in the Media Manager.
 
-    ``addImportMenuItem(import_menu)``
+    ``add_import_menu_item(import_menu)``
         Add an item to the Import menu.
 
-    ``addExportMenuItem(export_menu)``
+    ``add_export_menu_item(export_menu)``
         Add an item to the Export menu.
 
-    ``getSettingsTab()``
+    ``get_settings_tab()``
         Returns an instance of SettingsTabItem to be used in the Settings
         dialog.
 
@@ -144,9 +144,9 @@
         log.debug(u'Plugin %s initialised' % name)
         QtCore.QObject.__init__(self)
         self.name = name
-        self.textStrings = {}
+        self.text_strings = {}
         self.setPluginTextStrings()
-        self.nameStrings = self.textStrings[StringContent.Name]
+        self.name_strings = self.text_strings[StringContent.Name]
         if version:
             self.version = version
         else:
@@ -159,19 +159,19 @@
         self.status = PluginStatus.Inactive
         # Set up logging
         self.log = logging.getLogger(self.name)
-        self.previewController = plugin_helpers[u'preview']
-        self.liveController = plugin_helpers[u'live']
-        self.renderManager = plugin_helpers[u'render']
-        self.serviceManager = plugin_helpers[u'service']
-        self.settingsForm = plugin_helpers[u'settings form']
+        self.preview_controller = plugin_helpers[u'preview']
+        self.live_controller = plugin_helpers[u'live']
+        self.render_manager = plugin_helpers[u'render']
+        self.service_manager = plugin_helpers[u'service']
+        self.settings_form = plugin_helpers[u'settings form']
         self.mediadock = plugin_helpers[u'toolbox']
-        self.pluginManager = plugin_helpers[u'pluginmanager']
+        self.plugin_manager = plugin_helpers[u'pluginmanager']
         self.formparent = plugin_helpers[u'formparent']
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'%s_add_service_item' % self.name),
-            self.processAddServiceEvent)
+            self.process_add_service_event)
 
-    def checkPreConditions(self):
+    def check_pre_conditions(self):
         """
         Provides the Plugin with a handle to check if it can be loaded.
         Failing Preconditions does not stop a settings Tab being created
@@ -180,7 +180,7 @@
         """
         return True
 
-    def setStatus(self):
+    def set_status(self):
         """
         Sets the status of the plugin
         """
@@ -188,7 +188,7 @@
             self.settingsSection + u'/status',
             QtCore.QVariant(PluginStatus.Inactive)).toInt()[0]
 
-    def toggleStatus(self, new_status):
+    def toggle_status(self, new_status):
         """
         Changes the status of the plugin and remembers it
         """
@@ -200,7 +200,7 @@
         elif new_status == PluginStatus.Inactive:
             self.finalise()
 
-    def isActive(self):
+    def is_active(self):
         """
         Indicates if the plugin is active
 
@@ -208,7 +208,7 @@
         """
         return self.status == PluginStatus.Active
 
-    def getMediaManagerItem(self):
+    def get_media_manager_item(self):
         """
         Construct a MediaManagerItem object with all the buttons and things
         you need, and return it for integration into openlp.org.
@@ -217,7 +217,7 @@
             return self.media_item_class(self, self, self.icon)
         return None
 
-    def addImportMenuItem(self, importMenu):
+    def add_import_menu_item(self, importMenu):
         """
         Create a menu item and add it to the "Import" menu.
 
@@ -226,7 +226,7 @@
         """
         pass
 
-    def addExportMenuItem(self, exportMenu):
+    def add_export_menu_item(self, exportMenu):
         """
         Create a menu item and add it to the "Export" menu.
 
@@ -235,7 +235,7 @@
         """
         pass
 
-    def addToolsMenuItem(self, toolsMenu):
+    def add_tools_menu_item(self, toolsMenu):
         """
         Create a menu item and add it to the "Tools" menu.
 
@@ -244,31 +244,23 @@
         """
         pass
 
-    def getSettingsTab(self, parent):
+
+    def get_settings_tab(self, parent):
         """
         Create a tab for the settings window to display the configurable
         options for this plugin to the user.
         """
         if self.settings_tab_class:
             return self.settings_tab_class(parent, self.name,
-                self.getString(StringContent.VisibleName)[u'title'],
+                self.get_string(StringContent.VisibleName)[u'title'],
                 self.icon_path)
         return None
 
-    def addToMenu(self, menubar):
-        """
-        Add menu items to the menu, given the menubar.
-
-        ``menubar``
-            The application's menu bar.
-        """
-        pass
-
-    def processAddServiceEvent(self, replace=False):
+    def process_add_service_event(self, replace=False):
         """
         Generic Drag and drop handler triggered from service_manager.
         """
-        log.debug(u'processAddServiceEvent event called for plugin %s' %
+        log.debug(u'process_add_service_event event called for plugin %s' %
             self.name)
         if replace:
             self.mediaItem.onAddEditClick()
@@ -298,7 +290,7 @@
         if self.mediaItem:
             self.mediadock.remove_dock(self.mediaItem)
 
-    def usesTheme(self, theme):
+    def uses_theme(self, theme):
         """
         Called to find out if a plugin is currently using a theme.
 
@@ -306,7 +298,7 @@
         """
         return False
 
-    def renameTheme(self, oldTheme, newTheme):
+    def rename_theme(self, oldTheme, newTheme):
         """
         Renames a theme a plugin is using making the plugin use the new name.
 
@@ -318,45 +310,45 @@
         """
         pass
 
-    def getString(self, name):
+    def get_string(self, name):
         """
         encapsulate access of plugins translated text strings
         """
-        return self.textStrings[name]
+        return self.text_strings[name]
 
-    def setPluginUiTextStrings(self, tooltips):
+    def set_plugin_ui_text_strings(self, tooltips):
         """
         Called to define all translatable texts of the plugin
         """
         ## Load Action ##
-        self.__setNameTextString(StringContent.Load,
+        self.__set_name_text_string(StringContent.Load,
             UiStrings().Load, tooltips[u'load'])
         ## Import Action ##
-        self.__setNameTextString(StringContent.Import,
+        self.__set_name_text_string(StringContent.Import,
             UiStrings().Import, tooltips[u'import'])
         ## New Action ##
-        self.__setNameTextString(StringContent.New,
+        self.__set_name_text_string(StringContent.New,
             UiStrings().Add, tooltips[u'new'])
         ## Edit Action ##
-        self.__setNameTextString(StringContent.Edit,
+        self.__set_name_text_string(StringContent.Edit,
             UiStrings().Edit, tooltips[u'edit'])
         ## Delete Action ##
-        self.__setNameTextString(StringContent.Delete,
+        self.__set_name_text_string(StringContent.Delete,
             UiStrings().Delete, tooltips[u'delete'])
         ## Preview Action ##
-        self.__setNameTextString(StringContent.Preview,
+        self.__set_name_text_string(StringContent.Preview,
             UiStrings().Preview, tooltips[u'preview'])
         ## Send Live Action ##
-        self.__setNameTextString(StringContent.Live,
+        self.__set_name_text_string(StringContent.Live,
             UiStrings().Live, tooltips[u'live'])
         ## Add to Service Action ##
-        self.__setNameTextString(StringContent.Service,
+        self.__set_name_text_string(StringContent.Service,
             UiStrings().Service, tooltips[u'service'])
 
-    def __setNameTextString(self, name, title, tooltip):
+    def __set_name_text_string(self, name, title, tooltip):
         """
-        Utility method for creating a plugin's textStrings. This method makes
+        Utility method for creating a plugin's text_strings. This method makes
         use of the singular name of the plugin object so must only be called
         after this has been set.
         """
-        self.textStrings[name] = {u'title': title, u'tooltip': tooltip}
\ No newline at end of file
+        self.text_strings[name] = {u'title': title, u'tooltip': tooltip}

=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2011-04-14 18:30:53 +0000
+++ openlp/core/lib/pluginmanager.py	2011-04-16 07:57:32 +0000
@@ -106,9 +106,9 @@
                 log.exception(u'Failed to load plugin %s', unicode(p))
         plugins_list = sorted(plugin_objects, self.order_by_weight)
         for plugin in plugins_list:
-            if plugin.checkPreConditions():
+            if plugin.check_pre_conditions():
                 log.debug(u'Plugin %s active', unicode(plugin.name))
-                plugin.setStatus()
+                plugin.set_status()
             else:
                 plugin.status = PluginStatus.Disabled
             self.plugins.append(plugin)
@@ -135,7 +135,7 @@
         """
         for plugin in self.plugins:
             if plugin.status is not PluginStatus.Disabled:
-                plugin.mediaItem = plugin.getMediaManagerItem()
+                plugin.mediaItem = plugin.get_media_manager_item()
 
     def hook_settings_tabs(self, settings_form=None):
         """
@@ -148,7 +148,7 @@
         """
         for plugin in self.plugins:
             if plugin.status is not PluginStatus.Disabled:
-                plugin.settings_tab = plugin.getSettingsTab(settings_form)
+                plugin.settings_tab = plugin.get_settings_tab(settings_form)
         settings_form.plugins = self.plugins
 
     def hook_import_menu(self, import_menu):
@@ -161,7 +161,7 @@
         """
         for plugin in self.plugins:
             if plugin.status is not PluginStatus.Disabled:
-                plugin.addImportMenuItem(import_menu)
+                plugin.add_import_menu_item(import_menu)
 
     def hook_export_menu(self, export_menu):
         """
@@ -173,7 +173,7 @@
         """
         for plugin in self.plugins:
             if plugin.status is not PluginStatus.Disabled:
-                plugin.addExportMenuItem(export_menu)
+                plugin.add_export_menu_item(export_menu)
 
     def hook_tools_menu(self, tools_menu):
         """
@@ -185,7 +185,7 @@
         """
         for plugin in self.plugins:
             if plugin.status is not PluginStatus.Disabled:
-                plugin.addToolsMenuItem(tools_menu)
+                plugin.add_tools_menu_item(tools_menu)
 
     def initialise_plugins(self):
         """
@@ -195,8 +195,8 @@
         log.info(u'Initialise Plugins - Started')
         for plugin in self.plugins:
             log.info(u'initialising plugins %s in a %s state'
-                % (plugin.name, plugin.isActive()))
-            if plugin.isActive():
+                % (plugin.name, plugin.is_active()))
+            if plugin.is_active():
                 plugin.initialise()
                 log.info(u'Initialisation Complete for %s ' % plugin.name)
         log.info(u'Initialise Plugins - Finished')
@@ -208,6 +208,6 @@
         """
         log.info(u'finalising plugins')
         for plugin in self.plugins:
-            if plugin.isActive():
+            if plugin.is_active():
                 plugin.finalise()
-                log.info(u'Finalisation Complete for %s ' % plugin.name)
+                log.info(u'Finalisation Complete for %s ' % plugin.name)
\ No newline at end of file

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2011-04-15 21:43:59 +0000
+++ openlp/core/lib/serviceitem.py	2011-04-16 07:57:32 +0000
@@ -81,7 +81,7 @@
             The plugin that this service item belongs to.
         """
         if plugin:
-            self.render_manager = plugin.renderManager
+            self.render_manager = plugin.render_manager
             self.name = plugin.name
         self.title = u''
         self.shortname = u''

=== modified file 'openlp/core/ui/mediadockmanager.py'
--- openlp/core/ui/mediadockmanager.py	2011-04-12 19:32:17 +0000
+++ openlp/core/ui/mediadockmanager.py	2011-04-16 07:57:32 +0000
@@ -50,7 +50,7 @@
         ``icon``
             An icon for this dock item
         """
-        visible_title = media_item.plugin.getString(StringContent.VisibleName)
+        visible_title = media_item.plugin.get_string(StringContent.VisibleName)
         log.info(u'Adding %s dock' % visible_title)
         self.media_dock.addItem(media_item, icon, visible_title[u'title'])
 
@@ -60,7 +60,7 @@
         This does not work as it gives a Segmentation error.
         For now add at end of stack if not present
         """
-        visible_title = media_item.plugin.getString(StringContent.VisibleName)
+        visible_title = media_item.plugin.get_string(StringContent.VisibleName)
         log.debug(u'Inserting %s dock' % visible_title[u'title'])
         match = False
         for dock_index in range(0, self.media_dock.count()):
@@ -78,11 +78,11 @@
         ``media_item``
             The item to add to the dock
         """
-        visible_title = media_item.plugin.getString(StringContent.VisibleName)
+        visible_title = media_item.plugin.get_string(StringContent.VisibleName)
         log.debug(u'remove %s dock' % visible_title[u'title'])
         for dock_index in range(0, self.media_dock.count()):
             if self.media_dock.widget(dock_index):
                 if self.media_dock.widget(dock_index).settingsSection == \
                     media_item.plugin.name.lower():
                     self.media_dock.widget(dock_index).setVisible(False)
-                    self.media_dock.removeItem(dock_index)
+                    self.media_dock.removeItem(dock_index)
\ No newline at end of file

=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py	2011-03-24 19:04:02 +0000
+++ openlp/core/ui/pluginform.py	2011-04-16 07:57:32 +0000
@@ -80,14 +80,14 @@
                 # PluginStatus.Inactive
                 status_text = unicode(
                     translate('OpenLP.PluginForm', '%s (Inactive)'))
-            item.setText(status_text % plugin.nameStrings[u'singular'])
+            item.setText(status_text % plugin.name_strings[u'singular'])
             # If the plugin has an icon, set it!
             if plugin.icon:
                 item.setIcon(plugin.icon)
             self.pluginListWidget.addItem(item)
             pluginListWidth = max(pluginListWidth, self.fontMetrics().width(
                 unicode(translate('OpenLP.PluginForm', '%s (Inactive)')) %
-                plugin.nameStrings[u'singular']))
+                plugin.name_strings[u'singular']))
         self.pluginListWidget.setFixedWidth(pluginListWidth +
             self.pluginListWidget.iconSize().width() + 48)
 
@@ -117,7 +117,7 @@
             self.pluginListWidget.currentItem().text().split(u' ')[0]
         self.activePlugin = None
         for plugin in self.parent.pluginManager.plugins:
-            if plugin.nameStrings[u'singular'] == plugin_name_singular:
+            if plugin.name_strings[u'singular'] == plugin_name_singular:
                 self.activePlugin = plugin
                 break
         if self.activePlugin:
@@ -130,10 +130,10 @@
             return
         if status == 0:
             Receiver.send_message(u'cursor_busy')
-            self.activePlugin.toggleStatus(PluginStatus.Active)
+            self.activePlugin.toggle_status(PluginStatus.Active)
             Receiver.send_message(u'cursor_normal')
         else:
-            self.activePlugin.toggleStatus(PluginStatus.Inactive)
+            self.activePlugin.toggle_status(PluginStatus.Inactive)
         status_text = unicode(
             translate('OpenLP.PluginForm', '%s (Inactive)'))
         if self.activePlugin.status == PluginStatus.Active:
@@ -146,4 +146,4 @@
             status_text = unicode(
                 translate('OpenLP.PluginForm', '%s (Disabled)'))
         self.pluginListWidget.currentItem().setText(
-            status_text % self.activePlugin.nameStrings[u'singular'])
+            status_text % self.activePlugin.name_strings[u'singular'])
\ No newline at end of file

=== modified file 'openlp/core/ui/settingsdialog.py'
--- openlp/core/ui/settingsdialog.py	2011-04-15 22:46:24 +0000
+++ openlp/core/ui/settingsdialog.py	2011-04-16 07:57:32 +0000
@@ -40,6 +40,7 @@
         self.dialogLayout.setMargin(8)
         self.settingListWidget = QtGui.QListWidget(settingsDialog)
         self.settingListWidget.setUniformItemSizes(True)
+        self.settingListWidget.setIconSize(QtCore.QSize(32, 32))
         self.settingListWidget.setMinimumSize(QtCore.QSize(150, 0))
         self.settingListWidget.setHorizontalScrollBarPolicy(
             QtCore.Qt.ScrollBarAlwaysOff)

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2011-04-15 21:43:59 +0000
+++ openlp/core/ui/thememanager.py	2011-04-16 07:57:32 +0000
@@ -202,7 +202,7 @@
         if action == self.copyAction:
             self.onCopyTheme()
         if action == self.renameAction:
-            self.onRenameTheme()
+            self.onrename_theme()
         if action == self.deleteAction:
             self.onDeleteTheme()
         if action == self.globalAction:
@@ -266,7 +266,7 @@
         self.themeForm.theme = theme
         self.themeForm.exec_()
 
-    def onRenameTheme(self):
+    def onrename_theme(self):
         """
         Renames an existing theme to a new name
         """
@@ -285,8 +285,8 @@
                     self.cloneThemeData(oldThemeData, newThemeName)
                     self.deleteTheme(oldThemeName)
                     for plugin in self.mainwindow.pluginManager.plugins:
-                        if plugin.usesTheme(oldThemeName):
-                            plugin.renameTheme(oldThemeName, newThemeName)
+                        if plugin.uses_theme(oldThemeName):
+                            plugin.rename_theme(oldThemeName, newThemeName)
                     self.loadThemes()
 
     def onCopyTheme(self):
@@ -737,7 +737,7 @@
             # check for use in the system else where.
             if testPlugin:
                 for plugin in self.mainwindow.pluginManager.plugins:
-                    if plugin.usesTheme(theme):
+                    if plugin.uses_theme(theme):
                         critical_error_message_box(
                             translate('OpenLP.ThemeManager',
                             'Validation Error'),

=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/alerts/alertsplugin.py	2011-04-16 07:57:32 +0000
@@ -51,7 +51,7 @@
         self.manager = Manager(u'alerts', init_schema)
         self.alertForm = AlertForm(self)
 
-    def addToolsMenuItem(self, tools_menu):
+    def add_tools_menu_item(self, tools_menu):
         """
         Give the alerts plugin the opportunity to add items to the
         **Tools** menu.
@@ -67,7 +67,7 @@
         self.toolsAlertItem.setStatusTip(
             translate('AlertsPlugin', 'Show an alert message.'))
         self.toolsAlertItem.setShortcut(u'F7')
-        self.serviceManager.mainwindow.ToolsMenu.addAction(self.toolsAlertItem)
+        self.service_manager.mainwindow.ToolsMenu.addAction(self.toolsAlertItem)
         QtCore.QObject.connect(self.toolsAlertItem,
             QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger)
         self.toolsAlertItem.setVisible(False)
@@ -78,7 +78,7 @@
         self.toolsAlertItem.setVisible(True)
         action_list = ActionList.get_instance()
         action_list.add_action(self.toolsAlertItem, UiStrings().Tools)
-        self.liveController.alertTab = self.settings_tab
+        self.live_controller.alertTab = self.settings_tab
 
     def finalise(self):
         """
@@ -111,11 +111,11 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('AlertsPlugin', 'Alert', 'name singular'),
             u'plural': translate('AlertsPlugin', 'Alerts', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('AlertsPlugin', 'Alerts', 'container title')
-        }
\ No newline at end of file
+        }

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2011-04-16 07:57:32 +0000
@@ -72,7 +72,7 @@
         #action_list.remove_action(self.exportBibleItem, UiStrings().Export)
         self.exportBibleItem.setVisible(False)
 
-    def addImportMenuItem(self, import_menu):
+    def add_import_menu_item(self, import_menu):
         self.importBibleItem = base_action(import_menu, u'importBibleItem')
         self.importBibleItem.setText(translate('BiblesPlugin', '&Bible'))
         import_menu.addAction(self.importBibleItem)
@@ -81,7 +81,7 @@
             QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
         self.importBibleItem.setVisible(False)
 
-    def addExportMenuItem(self, export_menu):
+    def add_export_menu_item(self, export_menu):
         self.exportBibleItem = base_action(export_menu, u'exportBibleItem')
         self.exportBibleItem.setText(translate('BiblesPlugin', '&Bible'))
         export_menu.addAction(self.exportBibleItem)
@@ -97,7 +97,7 @@
             'verses from different sources during the service.')
         return about_text
 
-    def usesTheme(self, theme):
+    def uses_theme(self, theme):
         """
         Called to find out if the bible plugin is currently using a theme.
         Returns True if the theme is being used, otherwise returns False.
@@ -106,7 +106,7 @@
             return True
         return False
 
-    def renameTheme(self, oldTheme, newTheme):
+    def rename_theme(self, oldTheme, newTheme):
         """
         Rename the theme the bible plugin is using making the plugin use the
         new name.
@@ -126,12 +126,12 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('BiblesPlugin', 'Bible', 'name singular'),
             u'plural': translate('BiblesPlugin', 'Bibles', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('BiblesPlugin', 'Bibles', 'container title')
         }
         # Middle Header Bar
@@ -146,4 +146,4 @@
             u'service': translate('BiblesPlugin',
                 'Add the selected Bible to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
\ No newline at end of file
+        self.set_plugin_ui_text_strings(tooltips)

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2011-04-16 07:57:32 +0000
@@ -849,4 +849,4 @@
             self.settings.layout_style)
         QtCore.QSettings().setValue(
             self.settingsSection + u'/verse layout style',
-            QtCore.QVariant(self.settings.layout_style))
\ No newline at end of file
+            QtCore.QVariant(self.settings.layout_style))

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/custom/customplugin.py	2011-04-16 07:57:32 +0000
@@ -63,7 +63,7 @@
             'plugin.')
         return about_text
 
-    def usesTheme(self, theme):
+    def uses_theme(self, theme):
         """
         Called to find out if the custom plugin is currently using a theme.
 
@@ -74,7 +74,7 @@
             return True
         return False
 
-    def renameTheme(self, oldTheme, newTheme):
+    def rename_theme(self, oldTheme, newTheme):
         """
         Renames a theme the custom plugin is using making the plugin use the
         new name.
@@ -96,12 +96,12 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('CustomsPlugin', 'Custom', 'name singular'),
             u'plural': translate('CustomsPlugin', 'Customs', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('CustomsPlugin', 'Custom', 'container title')
         }
         # Middle Header Bar
@@ -118,7 +118,7 @@
             u'service': translate('CustomsPlugin',
                 'Add the selected Custom to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
+        self.set_plugin_ui_text_strings(tooltips)
 
     def finalise(self):
         """
@@ -126,4 +126,4 @@
         """
         log.info(u'Custom Finalising')
         self.manager.finalise()
-        Plugin.finalise(self)
+        Plugin.finalise(self)
\ No newline at end of file

=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/images/imageplugin.py	2011-04-16 07:57:32 +0000
@@ -59,12 +59,12 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('ImagePlugin', 'Image', 'name singular'),
             u'plural': translate('ImagePlugin', 'Images', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('ImagePlugin', 'Images', 'container title')
         }
         # Middle Header Bar
@@ -79,4 +79,4 @@
             u'service': translate('ImagePlugin',
                 'Add the selected Image to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
+        self.set_plugin_ui_text_strings(tooltips)

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2011-04-16 07:57:32 +0000
@@ -126,7 +126,7 @@
     def generateSlideData(self, service_item, item=None, xmlVersion=False):
         items = self.listView.selectedIndexes()
         if items:
-            service_item.title = unicode(self.plugin.nameStrings[u'plural'])
+            service_item.title = unicode(self.plugin.name_strings[u'plural'])
             service_item.add_capability(ItemCapabilities.AllowsMaintain)
             service_item.add_capability(ItemCapabilities.AllowsPreview)
             service_item.add_capability(ItemCapabilities.AllowsLoop)
@@ -175,7 +175,7 @@
         Called to reset the Live backgound with the image selected,
         """
         self.resetAction.setVisible(False)
-        self.parent.liveController.display.resetImage()
+        self.parent.live_controller.display.resetImage()
 
     def liveThemeChanged(self):
         """
@@ -195,7 +195,7 @@
             filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
             if os.path.exists(filename):
                 (path, name) = os.path.split(filename)
-                self.parent.liveController.display.directImage(name, filename)
+                self.parent.live_controller.display.directImage(name, filename)
                 self.resetAction.setVisible(True)
             else:
                 critical_error_message_box(UiStrings().LiveBGError,

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2011-04-16 07:57:32 +0000
@@ -89,7 +89,7 @@
         Called to reset the Live backgound with the media selected,
         """
         self.resetAction.setVisible(False)
-        self.parent.liveController.display.resetVideo()
+        self.parent.live_controller.display.resetVideo()
 
     def videobackgroundReplaced(self):
         """
@@ -108,7 +108,7 @@
             filename = unicode(item.data(QtCore.Qt.UserRole).toString())
             if os.path.exists(filename):
                 (path, name) = os.path.split(filename)
-                self.parent.liveController.display.video(filename, 0, True)
+                self.parent.live_controller.display.video(filename, 0, True)
                 self.resetAction.setVisible(True)
             else:
                 critical_error_message_box(UiStrings().LiveBGError,
@@ -160,7 +160,7 @@
             service_item.media_length = self.mediaLength
             service_item.add_capability(
                 ItemCapabilities.AllowsVariableStartTime)
-        service_item.title = unicode(self.plugin.nameStrings[u'singular'])
+        service_item.title = unicode(self.plugin.name_strings[u'singular'])
         service_item.add_capability(ItemCapabilities.RequiresMedia)
         # force a non-existent theme
         service_item.theme = -1

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/media/mediaplugin.py	2011-04-16 07:57:32 +0000
@@ -76,7 +76,7 @@
             ext = u'*%s' % extension
             if ext not in list:
                 list.append(ext)
-                self.serviceManager.supportedSuffixes(extension[1:])
+                self.service_manager.supportedSuffixes(extension[1:])
         log.info(u'MediaPlugin: %s extensions: %s' % (mimetype,
             u' '.join(extensions)))
         # Add extensions for this mimetype from self.additional_extensions.
@@ -87,7 +87,7 @@
                 ext = u'*%s' % extension
                 if ext not in list:
                     list.append(ext)
-                    self.serviceManager.supportedSuffixes(extension[1:])
+                    self.service_manager.supportedSuffixes(extension[1:])
             log.info(u'MediaPlugin: %s additional extensions: %s' % (mimetype,
                 u' '.join(self.additional_extensions[mimetype])))
 
@@ -101,12 +101,12 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('MediaPlugin', 'Media', 'name singular'),
             u'plural': translate('MediaPlugin', 'Media', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('MediaPlugin', 'Media', 'container title')
         }
         # Middle Header Bar
@@ -121,4 +121,4 @@
             u'service': translate('MediaPlugin',
                 'Add the selected Media to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
+        self.set_plugin_ui_text_strings(tooltips)

=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py	2011-04-16 07:57:32 +0000
@@ -244,7 +244,7 @@
             return False
         self.presentation = self.document.getPresentation()
         self.presentation.Display = \
-            self.controller.plugin.renderManager.screens.current_display + 1
+            self.controller.plugin.render_manager.screens.current_display + 1
         self.control = None
         self.create_thumbnails()
         return True

=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py	2011-04-16 07:57:32 +0000
@@ -79,7 +79,7 @@
                 for type in types:
                     if fileType.find(type) == -1:
                         fileType += u'*.%s ' % type
-                        self.parent.serviceManager.supportedSuffixes(type)
+                        self.parent.service_manager.supportedSuffixes(type)
         self.onNewFileMasks = unicode(translate('PresentationPlugin.MediaItem',
             'Presentations (%s)')) % fileType
 

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2011-04-13 19:12:47 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2011-04-16 07:57:32 +0000
@@ -56,11 +56,11 @@
         self.icon_path = u':/plugins/plugin_presentations.png'
         self.icon = build_icon(self.icon_path)
 
-    def getSettingsTab(self, parent):
+    def get_settings_tab(self, parent):
         """
         Create the settings Tab
         """
-        visible_name = self.getString(StringContent.VisibleName)
+        visible_name = self.get_string(StringContent.VisibleName)
         return PresentationTab(parent, self.name, visible_name[u'title'],
             self.controllers, self.icon_path)
 
@@ -93,7 +93,7 @@
                 controller.kill()
         Plugin.finalise(self)
 
-    def getMediaManagerItem(self):
+    def get_media_manager_item(self):
         """
         Create the Media Manager List
         """
@@ -107,12 +107,12 @@
         """
         self.controllers[controller.name] = controller
 
-    def checkPreConditions(self):
+    def check_pre_conditions(self):
         """
         Check to see if we have any presentation software available
         If Not do not install the plugin.
         """
-        log.debug(u'checkPreConditions')
+        log.debug(u'check_pre_conditions')
         controller_dir = os.path.join(
             AppLocation.get_directory(AppLocation.PluginsDir),
             u'presentations', u'lib')
@@ -154,14 +154,14 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('PresentationPlugin', 'Presentation',
                 'name singular'),
             u'plural': translate('PresentationPlugin', 'Presentations',
                 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('PresentationPlugin', 'Presentations',
                 'container title')
         }
@@ -180,4 +180,4 @@
             u'service': translate('PresentationPlugin',
                 'Add the selected Presentation to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
+        self.set_plugin_ui_text_strings(tooltips)
\ No newline at end of file

=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py	2011-04-13 05:12:31 +0000
+++ openlp/plugins/remotes/remoteplugin.py	2011-04-16 07:57:32 +0000
@@ -77,11 +77,11 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('RemotePlugin', 'Remote', 'name singular'),
             u'plural': translate('RemotePlugin', 'Remotes', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('RemotePlugin', 'Remote', 'container title')
-        }
+        }
\ No newline at end of file

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2011-04-16 07:57:32 +0000
@@ -89,7 +89,7 @@
             self.onVerseListViewPressed)
         QtCore.QObject.connect(self.themeAddButton,
             QtCore.SIGNAL(u'clicked()'),
-            self.parent.parent.renderManager.theme_manager.onAddTheme)
+            self.parent.parent.render_manager.theme_manager.onAddTheme)
         QtCore.QObject.connect(self.maintenanceButton,
             QtCore.SIGNAL(u'clicked()'), self.onMaintenanceButtonClicked)
         QtCore.QObject.connect(Receiver.get_receiver(),
@@ -779,4 +779,4 @@
                     self.song.verse_order)
         except:
             log.exception(u'Problem processing song Lyrics \n%s',
-                sxml.dump_xml())
\ No newline at end of file
+                sxml.dump_xml())

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/songs/songsplugin.py	2011-04-16 07:57:32 +0000
@@ -71,7 +71,7 @@
         action_list.add_action(self.SongExportItem, UiStrings().Export)
         action_list.add_action(self.toolsReindexItem, UiStrings().Tools)
 
-    def addImportMenuItem(self, import_menu):
+    def add_import_menu_item(self, import_menu):
         """
         Give the Songs plugin the opportunity to add items to the
         **Import** menu.
@@ -90,7 +90,7 @@
         QtCore.QObject.connect(self.SongImportItem,
             QtCore.SIGNAL(u'triggered()'), self.onSongImportItemClicked)
 
-    def addExportMenuItem(self, export_menu):
+    def add_export_menu_item(self, export_menu):
         """
         Give the Songs plugin the opportunity to add items to the
         **Export** menu.
@@ -109,7 +109,7 @@
         QtCore.QObject.connect(self.SongExportItem,
             QtCore.SIGNAL(u'triggered()'), self.onSongExportItemClicked)
 
-    def addToolsMenuItem(self, tools_menu):
+    def add_tools_menu_item(self, tools_menu):
         """
         Give the alerts plugin the opportunity to add items to the
         **Tools** menu.
@@ -162,7 +162,7 @@
             '<br />The songs plugin provides the ability to display and '
             'manage songs.')
 
-    def usesTheme(self, theme):
+    def uses_theme(self, theme):
         """
         Called to find out if the song plugin is currently using a theme.
 
@@ -172,7 +172,7 @@
             return True
         return False
 
-    def renameTheme(self, oldTheme, newTheme):
+    def rename_theme(self, oldTheme, newTheme):
         """
         Renames a theme the song plugin is using making the plugin use the new
         name.
@@ -200,12 +200,12 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('SongsPlugin', 'Song', 'name singular'),
             u'plural': translate('SongsPlugin', 'Songs', 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('SongsPlugin', 'Songs', 'container title')
         }
         # Middle Header Bar
@@ -220,7 +220,7 @@
             u'service': translate('SongsPlugin',
                 'Add the selected Song to the service')
         }
-        self.setPluginUiTextStrings(tooltips)
+        self.set_plugin_ui_text_strings(tooltips)
 
     def firstTime(self):
         """
@@ -261,4 +261,4 @@
         action_list.remove_action(self.SongImportItem, UiStrings().Import)
         action_list.remove_action(self.SongExportItem, UiStrings().Export)
         action_list.remove_action(self.toolsReindexItem, UiStrings().Tools)
-        Plugin.finalise(self)
\ No newline at end of file
+        Plugin.finalise(self)

=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py	2011-04-09 16:11:02 +0000
+++ openlp/plugins/songusage/songusageplugin.py	2011-04-16 07:57:32 +0000
@@ -50,7 +50,7 @@
         self.manager = None
         self.songusageActive = False
 
-    def addToolsMenuItem(self, tools_menu):
+    def add_tools_menu_item(self, tools_menu):
         """
         Give the SongUsage plugin the opportunity to add items to the
         **Tools** menu.
@@ -182,14 +182,14 @@
         Called to define all translatable texts of the plugin
         """
         ## Name PluginList ##
-        self.textStrings[StringContent.Name] = {
+        self.text_strings[StringContent.Name] = {
             u'singular': translate('SongUsagePlugin', 'SongUsage',
                 'name singular'),
             u'plural': translate('SongUsagePlugin', 'SongUsage',
                 'name plural')
         }
         ## Name for MediaDockManager, SettingsManager ##
-        self.textStrings[StringContent.VisibleName] = {
+        self.text_strings[StringContent.VisibleName] = {
             u'title': translate('SongUsagePlugin', 'SongUsage',
                 'container title')
-        }
+        }
\ No newline at end of file