← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/short-lines into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/short-lines into lp:openlp.

Requested reviews:
  Andreas Preikschat (googol)
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~googol/openlp/short-lines/+merge/152068

Hello,

- fixed short lines
- renamed variables/attributes
- added clean_tags() test
-- 
https://code.launchpad.net/~googol/openlp/short-lines/+merge/152068
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py	2013-03-01 17:45:17 +0000
+++ openlp/core/__init__.py	2013-03-06 23:02:23 +0000
@@ -189,7 +189,7 @@
         log.exception(''.join(format_exception(exctype, value, traceback)))
         if not hasattr(self, u'exception_form'):
             self.exception_form = ExceptionForm(self.main_window)
-        self.exception_form.exceptionTextEdit.setPlainText(''.join(format_exception(exctype, value, traceback)))
+        self.exception_form.exception_text_edit.setPlainText(''.join(format_exception(exctype, value, traceback)))
         self.set_normal_cursor()
         self.exception_form.exec_()
 

=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py	2013-03-06 21:49:46 +0000
+++ openlp/core/lib/htmlbuilder.py	2013-03-06 23:02:23 +0000
@@ -259,8 +259,7 @@
 
 def webkit_version():
     """
-    Return the Webkit version in use.
-    Note method added relatively recently, so return 0 if prior to this
+    Return the Webkit version in use. Note method added relatively recently, so return 0 if prior to this
     """
     try:
         webkit_ver = float(QtWebKit.qWebKitVersion())
@@ -276,7 +275,6 @@
 
     ``item``
         Service Item containing theme and location information
-
     """
     width = int(width) / 2
     theme = item.themedata
@@ -348,21 +346,18 @@
     if theme and item.main:
         lyricstable = u'left: %spx; top: %spx;' % (item.main.x(), item.main.y())
         lyrics = build_lyrics_format_css(theme, item.main.width(), item.main.height())
-        # For performance reasons we want to show as few DIV's as possible,
-        # especially when animating/transitions.
-        # However some bugs in older versions of qtwebkit mean we need to
-        # perform workarounds and add extra divs. Only do these when needed.
-        #
-        # Before 533.3 the webkit-text-fill colour wasn't displayed, only the
-        # stroke (outline) color. So put stroke layer underneath the main text.
-        #
-        # Up to 534.3 the webkit-text-stroke was sometimes out of alignment
-        # with the fill, or normal text. letter-spacing=1 is workaround
-        # https://bugs.webkit.org/show_bug.cgi?id=44403
-        #
-        # Up to 534.3 the text-shadow didn't get displayed when
-        # webkit-text-stroke was used. So use an offset text layer underneath.
-        # https://bugs.webkit.org/show_bug.cgi?id=19728
+        # For performance reasons we want to show as few DIV's as possible, especially when animating/transitions.
+        # However some bugs in older versions of qtwebkit mean we need to perform workarounds and add extra divs. Only
+        # do these when needed.
+        #
+        # Before 533.3 the webkit-text-fill colour wasn't displayed, only the stroke (outline) color. So put stroke
+        # layer underneath the main text.
+        #
+        # Up to 534.3 the webkit-text-stroke was sometimes out of alignment with the fill, or normal text.
+        # letter-spacing=1 is workaround https://bugs.webkit.org/show_bug.cgi?id=44403
+        #
+        # Up to 534.3 the text-shadow didn't get displayed when webkit-text-stroke was used. So use an offset text
+        # layer underneath. https://bugs.webkit.org/show_bug.cgi?id=19728
         if webkit_ver >= 533.3:
             lyricsmain += build_lyrics_outline_css(theme)
         else:
@@ -371,20 +366,18 @@
             if theme.font_main_outline and webkit_ver <= 534.3:
                 shadow = u'padding-left: %spx; padding-top: %spx;' % \
                     (int(theme.font_main_shadow_size) + (int(theme.font_main_outline_size) * 2),
-                     theme.font_main_shadow_size)
+                    theme.font_main_shadow_size)
                 shadow += build_lyrics_outline_css(theme, True)
             else:
                 lyricsmain += u' text-shadow: %s %spx %spx;' % \
-                    (theme.font_main_shadow_color, theme.font_main_shadow_size,
-                    theme.font_main_shadow_size)
+                    (theme.font_main_shadow_color, theme.font_main_shadow_size, theme.font_main_shadow_size)
     lyrics_css = style % (lyricstable, lyrics, lyricsmain, outline, shadow)
     return lyrics_css
 
 
 def build_lyrics_outline_css(theme, is_shadow=False):
     """
-    Build the css which controls the theme outline
-    Also used by renderer for splitting verses
+    Build the css which controls the theme outline. Also used by renderer for splitting verses
 
     ``theme``
         Object containing theme information
@@ -407,8 +400,7 @@
 
 def build_lyrics_format_css(theme, width, height):
     """
-    Build the css which controls the theme format
-    Also used by renderer for splitting verses
+    Build the css which controls the theme format. Also used by renderer for splitting verses
 
     ``theme``
         Object containing theme information
@@ -418,7 +410,6 @@
 
     ``height``
         Height of the lyrics block
-
     """
     align = HorizontalType.Names[theme.display_horizontal_align]
     valign = VerticalType.Names[theme.display_vertical_align]
@@ -460,22 +451,18 @@
     ``webkitvers``
         The version of qtwebkit we're using
     """
-    # Bugs in some versions of QtWebKit mean we sometimes need additional
-    # divs for outline and shadow, since the CSS doesn't work.
-    # To support vertical alignment middle and bottom, nested div's using
-    # display:table/display:table-cell are required for each lyric block.
+    # Bugs in some versions of QtWebKit mean we sometimes need additional divs for outline and shadow, since the CSS
+    # doesn't work. To support vertical alignment middle and bottom, nested div's using display:table/display:table-cell
+    #  are required for each lyric block.
     lyrics = u''
     theme = item.themedata
     if webkitvers <= 534.3 and theme and theme.font_main_outline:
-        lyrics += u'<div class="lyricstable">' \
-            u'<div id="lyricsshadow" style="opacity:1" ' \
+        lyrics += u'<div class="lyricstable"><div id="lyricsshadow" style="opacity:1" ' \
             u'class="lyricscell lyricsshadow"></div></div>'
         if webkitvers < 533.3:
-            lyrics += u'<div class="lyricstable">' \
-                u'<div id="lyricsoutline" style="opacity:1" ' \
+            lyrics += u'<div class="lyricstable"><div id="lyricsoutline" style="opacity:1" ' \
                 u'class="lyricscell lyricsoutline"></div></div>'
-    lyrics += u'<div class="lyricstable">' \
-        u'<div id="lyricsmain" style="opacity:1" ' \
+    lyrics += u'<div class="lyricstable"><div id="lyricsmain" style="opacity:1" ' \
         u'class="lyricscell lyricsmain"></div></div>'
     return lyrics
 

=== modified file 'openlp/core/lib/imagemanager.py'
--- openlp/core/lib/imagemanager.py	2013-02-07 07:17:19 +0000
+++ openlp/core/lib/imagemanager.py	2013-03-06 23:02:23 +0000
@@ -27,10 +27,9 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 """
-Provides the store and management for Images automatically caching them and
-resizing them when needed.  Only one copy of each image is needed in the system.
-A Thread is used to convert the image to a byte array so the user does not need
-to wait for the conversion to happen.
+Provides the store and management for Images automatically caching them and resizing them when needed. Only one copy of
+each image is needed in the system. A Thread is used to convert the image to a byte array so the user does not need to
+wait for the conversion to happen.
 """
 import logging
 import os
@@ -46,8 +45,8 @@
 
 class ImageThread(QtCore.QThread):
     """
-    A special Qt thread class to speed up the display of images. This is
-    threaded so it loads the frames and generates byte stream in background.
+    A special Qt thread class to speed up the display of images. This is threaded so it loads the frames and generates
+    byte stream in background.
     """
     def __init__(self, manager):
         """
@@ -71,30 +70,25 @@
     Enumeration class for different priorities.
 
     ``Lowest``
-        Only the image's byte stream has to be generated. But neither the
-        ``QImage`` nor the byte stream has been requested yet.
+        Only the image's byte stream has to be generated. But neither the ``QImage`` nor the byte stream has been
+        requested yet.
 
     ``Low``
-        Only the image's byte stream has to be generated. Because the image's
-        ``QImage`` has been requested previously it is reasonable to assume that
-        the byte stream will be needed before the byte stream of other images
-        whose ``QImage`` were not generated due to a request.
+        Only the image's byte stream has to be generated. Because the image's ``QImage`` has been requested previously
+        it is reasonable to assume that the byte stream will be needed before the byte stream of other images whose
+        ``QImage`` were not generated due to a request.
 
     ``Normal``
-        The image's byte stream as well as the image has to be generated.
-        Neither the ``QImage`` nor the byte stream has been requested yet.
+        The image's byte stream as well as the image has to be generated. Neither the ``QImage`` nor the byte stream has
+        been requested yet.
 
     ``High``
-        The image's byte stream as well as the image has to be generated. The
-        ``QImage`` for this image has been requested.
-        **Note**, this priority is only set when the ``QImage`` has not been
-        generated yet.
+        The image's byte stream as well as the image has to be generated. The ``QImage`` for this image has been
+        requested. **Note**, this priority is only set when the ``QImage`` has not been generated yet.
 
     ``Urgent``
-        The image's byte stream as well as the image has to be generated. The
-        byte stream for this image has been requested.
-        **Note**, this priority is only set when the byte stream has not been
-        generated yet.
+        The image's byte stream as well as the image has to be generated. The byte stream for this image has been
+        requested. **Note**, this priority is only set when the byte stream has not been generated yet.
     """
     Lowest = 4
     Low = 3
@@ -105,9 +99,8 @@
 
 class Image(object):
     """
-    This class represents an image. To mark an image as *dirty* call the
-    :class:`ImageManager`'s ``_resetImage`` method with the Image instance as
-    argument.
+    This class represents an image. To mark an image as *dirty* call the :class:`ImageManager`'s ``_reset_image`` method
+    with the Image instance as argument.
     """
     secondary_priority = 0
 
@@ -119,12 +112,12 @@
             The image's file path. This should be an existing file path.
 
         ``source``
-            The source describes the image's origin. Possible values are
-            described in the :class:`~openlp.core.lib.ImageSource` class.
+            The source describes the image's origin. Possible values are described in the
+            :class:`~openlp.core.lib.ImageSource` class.
 
         ``background``
-            A ``QtGui.QColor`` object specifying the colour to be used to fill
-            the gabs if the image's ratio does not match with the display ratio.
+            A ``QtGui.QColor`` object specifying the colour to be used to fill the gabs if the image's ratio does not
+            match with the display ratio.
         """
         self.path = path
         self.image = None
@@ -133,6 +126,7 @@
         self.source = source
         self.background = background
         self.timestamp = 0
+        # FIXME: We assume that the path exist. The caller has to take care that it exists!
         if os.path.exists(path):
             self.timestamp = os.stat(path).st_mtime
         self.secondary_priority = Image.secondary_priority
@@ -143,16 +137,14 @@
     """
     Customised ``Queue.PriorityQueue``.
 
-    Each item in the queue must be a tuple with three values. The first value
-    is the :class:`Image`'s ``priority`` attribute, the second value
-    the :class:`Image`'s ``secondary_priority`` attribute. The last value the
-    :class:`Image` instance itself::
+    Each item in the queue must be a tuple with three values. The first value is the :class:`Image`'s ``priority``
+    attribute, the second value the :class:`Image`'s ``secondary_priority`` attribute. The last value the :class:`Image`
+    instance itself::
 
         (image.priority, image.secondary_priority, image)
 
-    Doing this, the :class:`Queue.PriorityQueue` will sort the images according
-    to their priorities, but also according to there number. However, the number
-    only has an impact on the result if there are more images with the same
+    Doing this, the :class:`Queue.PriorityQueue` will sort the images according to their priorities, but also according
+    to there number. However, the number only has an impact on the result if there are more images with the same
     priority. In such case the image which has been added earlier is privileged.
     """
     def modify_priority(self, image, new_priority):
@@ -163,8 +155,7 @@
             The image to remove. This should be an :class:`Image` instance.
 
         ``new_priority``
-            The image's new priority. See the :class:`Priority` class for
-            priorities.
+            The image's new priority. See the :class:`Priority` class for priorities.
         """
         self.remove(image)
         image.priority = new_priority
@@ -210,8 +201,7 @@
         current_screen = ScreenList().current
         self.width = current_screen[u'size'].width()
         self.height = current_screen[u'size'].height()
-        # Mark the images as dirty for a rebuild by setting the image and byte
-        # stream to None.
+        # Mark the images as dirty for a rebuild by setting the image and byte stream to None.
         for image in self._cache.values():
             self._reset_image(image)
 
@@ -220,8 +210,7 @@
         Border has changed so update all the images affected.
         """
         log.debug(u'update_images_border')
-        # Mark the images as dirty for a rebuild by setting the image and byte
-        # stream to None.
+        # Mark the images as dirty for a rebuild by setting the image and byte stream to None.
         for image in self._cache.values():
             if image.source == source:
                 image.background = background
@@ -232,8 +221,7 @@
         Border has changed so update the image affected.
         """
         log.debug(u'update_image_border')
-        # Mark the image as dirty for a rebuild by setting the image and byte
-        # stream to None.
+        # Mark the image as dirty for a rebuild by setting the image and byte stream to None.
         image = self._cache[(path, source)]
         if image.source == source:
             image.background = background
@@ -241,8 +229,7 @@
 
     def _reset_image(self, image):
         """
-        Mark the given :class:`Image` instance as dirty by setting its ``image``
-        and ``image_bytes`` attributes to None.
+        Mark the given :class:`Image` instance as dirty by setting its ``image`` and ``image_bytes`` attributes to None.
         """
         image.image = None
         image.image_bytes = None
@@ -258,8 +245,7 @@
 
     def get_image(self, path, source):
         """
-        Return the ``QImage`` from the cache. If not present wait for the
-        background thread to process it.
+        Return the ``QImage`` from the cache. If not present wait for the background thread to process it.
         """
         log.debug(u'getImage %s' % path)
         image = self._cache[(path, source)]
@@ -271,17 +257,15 @@
                 log.debug(u'getImage - waiting')
                 time.sleep(0.1)
         elif image.image_bytes is None:
-            # Set the priority to Low, because the image was requested but the
-            # byte stream was not generated yet. However, we only need to do
-            # this, when the image was generated before it was requested
-            # (otherwise this is already taken care of).
+            # Set the priority to Low, because the image was requested but the byte stream was not generated yet.
+            # However, we only need to do this, when the image was generated before it was requested (otherwise this is
+            # already taken care of).
             self._conversion_queue.modify_priority(image, Priority.Low)
         return image.image
 
     def get_image_bytes(self, path, source):
         """
-        Returns the byte string for an image. If not present wait for the
-        background thread to process it.
+        Returns the byte string for an image. If not present wait for the background thread to process it.
         """
         log.debug(u'get_image_bytes %s' % path)
         image = self._cache[(path, source)]
@@ -303,8 +287,7 @@
             image = Image(path, source, background)
             self._cache[(path, source)] = image
             self._conversion_queue.put((image.priority, image.secondary_priority, image))
-        # Check if the there are any images with the same path and check if the
-        # timestamp has changed.
+        # Check if the there are any images with the same path and check if the timestamp has changed.
         for image in self._cache.values():
             if os.path.exists(path):
                 if image.path == path and image.timestamp != os.stat(path).st_mtime:
@@ -332,15 +315,12 @@
         # Generate the QImage for the image.
         if image.image is None:
             image.image = resize_image(image.path, self.width, self.height, image.background)
-            # Set the priority to Lowest and stop here as we need to process
-            # more important images first.
+            # Set the priority to Lowest and stop here as we need to process more important images first.
             if image.priority == Priority.Normal:
                 self._conversion_queue.modify_priority(image, Priority.Lowest)
                 return
-            # For image with high priority we set the priority to Low, as the
-            # byte stream might be needed earlier the byte stream of image with
-            # Normal priority. We stop here as we need to process more important
-            # images first.
+            # For image with high priority we set the priority to Low, as the byte stream might be needed earlier the
+            # byte stream of image with Normal priority. We stop here as we need to process more important images first.
             elif image.priority == Priority.High:
                 self._conversion_queue.modify_priority(image, Priority.Low)
                 return

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2013-02-19 09:56:36 +0000
+++ openlp/core/lib/mediamanageritem.py	2013-03-06 23:02:23 +0000
@@ -447,7 +447,7 @@
         """
         pass
 
-    def generateSlideData(self, serviceItem, item=None, xmlVersion=False, remote=False,
+    def generateSlideData(self, service_item, item=None, xmlVersion=False, remote=False,
             context=ServiceItemContext.Live):
         """
         Generate the slide data. Needs to be implemented by the plugin.
@@ -481,10 +481,10 @@
                 translate('OpenLP.MediaManagerItem', 'You must select one or more items to preview.'))
         else:
             log.debug(u'%s Preview requested', self.plugin.name)
-            serviceItem = self.buildServiceItem()
-            if serviceItem:
-                serviceItem.from_plugin = True
-                self.preview_controller.add_service_item(serviceItem)
+            service_item = self.buildServiceItem()
+            if service_item:
+                service_item.from_plugin = True
+                self.preview_controller.add_service_item(service_item)
                 if keepFocus:
                     self.listView.setFocus()
 
@@ -507,13 +507,13 @@
         item = None
         if item_id:
             item = self.createItemFromId(item_id)
-        serviceItem = self.buildServiceItem(item, remote=remote)
-        if serviceItem:
+        service_item = self.buildServiceItem(item, remote=remote)
+        if service_item:
             if not item_id:
-                serviceItem.from_plugin = True
+                service_item.from_plugin = True
             if remote:
-                serviceItem.will_auto_start = True
-            self.live_controller.add_service_item(serviceItem)
+                service_item.will_auto_start = True
+            self.live_controller.add_service_item(service_item)
 
     def createItemFromId(self, item_id):
         """
@@ -545,10 +545,10 @@
         """
         Add this item to the current service.
         """
-        serviceItem = self.buildServiceItem(item, True, remote=remote, context=ServiceItemContext.Service)
-        if serviceItem:
-            serviceItem.from_plugin = False
-            self.service_manager.add_service_item(serviceItem, replace=replace)
+        service_item = self.buildServiceItem(item, True, remote=remote, context=ServiceItemContext.Service)
+        if service_item:
+            service_item.from_plugin = False
+            self.service_manager.add_service_item(service_item, replace=replace)
 
     def onAddEditClick(self):
         """
@@ -559,13 +559,13 @@
                 translate('OpenLP.MediaManagerItem', 'You must select one or more items.'))
         else:
             log.debug(u'%s Add requested', self.plugin.name)
-            serviceItem = self.service_manager.get_service_item()
-            if not serviceItem:
+            service_item = self.service_manager.get_service_item()
+            if not service_item:
                 QtGui.QMessageBox.information(self, UiStrings().NISs,
                     translate('OpenLP.MediaManagerItem', 'You must select an existing service item to add to.'))
-            elif self.plugin.name == serviceItem.name:
-                self.generateSlideData(serviceItem)
-                self.service_manager.add_service_item(serviceItem, replace=True)
+            elif self.plugin.name == service_item.name:
+                self.generateSlideData(service_item)
+                self.service_manager.add_service_item(service_item, replace=True)
             else:
                 # Turn off the remote edit update message indicator
                 QtGui.QMessageBox.information(self, translate('OpenLP.MediaManagerItem', 'Invalid Service Item'),
@@ -575,10 +575,10 @@
         """
         Common method for generating a service item
         """
-        serviceItem = ServiceItem(self.plugin)
-        serviceItem.add_icon(self.plugin.iconPath)
-        if self.generateSlideData(serviceItem, item, xmlVersion, remote, context):
-            return serviceItem
+        service_item = ServiceItem(self.plugin)
+        service_item.add_icon(self.plugin.iconPath)
+        if self.generateSlideData(service_item, item, xmlVersion, remote, context):
+            return service_item
         else:
             return None
 

=== modified file 'openlp/core/lib/registry.py'
--- openlp/core/lib/registry.py	2013-02-10 16:05:52 +0000
+++ openlp/core/lib/registry.py	2013-03-06 23:02:23 +0000
@@ -37,8 +37,8 @@
 
 class Registry(object):
     """
-    This is the Component Registry.  It is a singleton object and is used to provide a
-    look up service for common objects.
+    This is the Component Registry.  It is a singleton object and is used to provide a look up service for common
+    objects.
     """
     log.info(u'Registry loaded')
     __instance__ = None
@@ -97,8 +97,8 @@
 
     def remove(self, key):
         """
-        Removes the registry value from the list based on the key passed in
-        (Only valid and active for testing framework).
+        Removes the registry value from the list based on the key passed in (Only valid and active for testing
+        framework).
 
         ``key``
             The service to be deleted.
@@ -114,9 +114,9 @@
         Register an event and associated function to be called
 
         ``event``
-            The function description like "config_updated" or "live_display_hide" where a number of places in the
-            code will/may need to respond to a single action and the caller does not need to understand or know about
-            the recipients.
+            The function description like "config_updated" or "live_display_hide" where a number of places in the code
+            will/may need to respond to a single action and the caller does not need to understand or know about the
+            recipients.
 
         ``function``
             The function to be called when the event happens.

=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py	2013-03-04 16:55:13 +0000
+++ openlp/core/lib/renderer.py	2013-03-06 23:02:23 +0000
@@ -51,22 +51,14 @@
 
 class Renderer(object):
     """
-    Class to pull all Renderer interactions into one place. The plugins will
-    call helper methods to do the rendering but this class will provide
-    display defense code.
+    Class to pull all Renderer interactions into one place. The plugins will call helper methods to do the rendering but
+    this class will provide display defense code.
     """
     log.info(u'Renderer Loaded')
 
     def __init__(self):
         """
         Initialise the renderer.
-
-        ``image_manager``
-            A image_manager instance which takes care of e. g. caching and
-            resizing images.
-
-        ``theme_manager``
-            The theme_manager instance, used to get the current theme details.
         """
         log.debug(u'Initialisation started')
         self.screens = ScreenList()
@@ -99,19 +91,17 @@
 
     def update_theme(self, theme_name, old_theme_name=None, only_delete=False):
         """
-        This method updates the theme in ``_theme_dimensions`` when a theme
-        has been edited or renamed.
+        This method updates the theme in ``_theme_dimensions`` when a theme has been edited or renamed.
 
         ``theme_name``
             The current theme name.
 
         ``old_theme_name``
-            The old theme name. Has only to be passed, when the theme has been
-            renamed. Defaults to *None*.
+            The old theme name. Has only to be passed, when the theme has been renamed. Defaults to *None*.
 
         ``only_delete``
-            Only remove the given ``theme_name`` from the ``_theme_dimensions``
-            list. This can be used when a theme is permanently deleted.
+            Only remove the given ``theme_name`` from the ``_theme_dimensions`` list. This can be used when a theme is
+            permanently deleted.
         """
         if old_theme_name is not None and old_theme_name in self._theme_dimensions:
             del self._theme_dimensions[old_theme_name]
@@ -144,20 +134,17 @@
         Set up the theme to be used before rendering an item.
 
         ``override_theme_data``
-            The theme data should be passed, when we want to use our own theme
-            data, regardless of the theme level. This should for example be used
-            in the theme manager. **Note**, this is **not** to be mixed up with
-            the ``set_item_theme`` method.
+            The theme data should be passed, when we want to use our own theme data, regardless of the theme level. This
+            should for example be used in the theme manager. **Note**, this is **not** to be mixed up with the
+            ``set_item_theme`` method.
         """
         # Just assume we use the global theme.
         theme_to_use = self.global_theme_name
-        # The theme level is either set to Service or Item. Use the service
-        # theme if one is set. We also have to use the service theme, even when
-        # the theme level is set to Item, because the item does not necessarily
-        # have to have a theme.
+        # The theme level is either set to Service or Item. Use the service theme if one is set. We also have to use the
+        # service theme, even when the theme level is set to Item, because the item does not necessarily have to have a
+        # theme.
         if self.theme_level != ThemeLevel.Global:
-            # When the theme level is at Service and we actually have a service
-            # theme then use it.
+            # When the theme level is at Service and we actually have a service theme then use it.
             if self.service_theme_name:
                 theme_to_use = self.service_theme_name
         # If we have Item level and have an item theme then use it.
@@ -206,8 +193,7 @@
 
     def set_item_theme(self, item_theme_name):
         """
-        Set the item-level theme. **Note**, this has to be done for each item we
-        are rendering.
+        Set the item-level theme. **Note**, this has to be done for each item we are rendering.
 
         ``item_theme_name``
             The item theme's name.
@@ -229,26 +215,25 @@
         # save value for use in format_slide
         self.force_page = force_page
         # build a service item to generate preview
-        serviceItem = ServiceItem()
+        service_item = ServiceItem()
         if self.force_page:
             # make big page for theme edit dialog to get line count
-            serviceItem.add_from_text(VERSE_FOR_LINE_COUNT)
+            service_item.add_from_text(VERSE_FOR_LINE_COUNT)
         else:
-            serviceItem.add_from_text(VERSE)
-        serviceItem.raw_footer = FOOTER
+            service_item.add_from_text(VERSE)
+        service_item.raw_footer = FOOTER
         # if No file do not update cache
         if theme_data.background_filename:
-            self.image_manager.add_image(theme_data.background_filename,
-                ImageSource.Theme,
-                QtGui.QColor(theme_data.background_border_color))
+            self.image_manager.add_image(
+                theme_data.background_filename, ImageSource.Theme, QtGui.QColor(theme_data.background_border_color))
         theme_data, main, footer = self.pre_render(theme_data)
-        serviceItem.themedata = theme_data
-        serviceItem.main = main
-        serviceItem.footer = footer
-        serviceItem.render(True)
+        service_item.themedata = theme_data
+        service_item.main = main
+        service_item.footer = footer
+        service_item.render(True)
         if not self.force_page:
-            self.display.build_html(serviceItem)
-            raw_html = serviceItem.get_rendered_frame(0)
+            self.display.build_html(service_item)
+            raw_html = service_item.get_rendered_frame(0)
             self.display.text(raw_html, False)
             preview = self.display.preview()
             return preview
@@ -278,22 +263,21 @@
             if u'[---]' in text:
                 while True:
                     slides = text.split(u'\n[---]\n', 2)
-                    # If there are (at least) two occurrences of [---] we use
-                    # the first two slides (and neglect the last for now).
+                    # If there are (at least) two occurrences of [---] we use the first two slides (and neglect the last
+                    # for now).
                     if len(slides) == 3:
                         html_text = expand_tags(u'\n'.join(slides[:2]))
-                    # We check both slides to determine if the optional split is
-                    # needed (there is only one optional split).
+                    # We check both slides to determine if the optional split is needed (there is only one optional
+                    # split).
                     else:
                         html_text = expand_tags(u'\n'.join(slides))
                     html_text = html_text.replace(u'\n', u'<br>')
                     if self._text_fits_on_slide(html_text):
-                        # The first two optional slides fit (as a whole) on one
-                        # slide. Replace the first occurrence of [---].
+                        # The first two optional slides fit (as a whole) on one slide. Replace the first occurrence
+                        # of [---].
                         text = text.replace(u'\n[---]', u'', 1)
                     else:
-                        # The first optional slide fits, which means we have to
-                        # render the first optional slide.
+                        # The first optional slide fits, which means we have to render the first optional slide.
                         text_contains_split = u'[---]' in text
                         if text_contains_split:
                             try:
@@ -343,8 +327,7 @@
         self.width = screen_size.width()
         self.height = screen_size.height()
         self.screen_ratio = float(self.height) / float(self.width)
-        log.debug(u'_calculate default %s, %f' % (screen_size,
-            self.screen_ratio))
+        log.debug(u'_calculate default %s, %f' % (screen_size, self.screen_ratio))
         # 90% is start of footer
         self.footer_start = int(self.height * 0.90)
 
@@ -369,12 +352,10 @@
             The theme data.
         """
         if not theme_data.font_footer_override:
-            return QtCore.QRect(10, self.footer_start, self.width - 20,
-                self.height - self.footer_start)
+            return QtCore.QRect(10, self.footer_start, self.width - 20, self.height - self.footer_start)
         else:
             return QtCore.QRect(theme_data.font_footer_x,
-                theme_data.font_footer_y, theme_data.font_footer_width - 1,
-                theme_data.font_footer_height - 1)
+                theme_data.font_footer_y, theme_data.font_footer_width - 1, theme_data.font_footer_height - 1)
 
     def _set_text_rectangle(self, theme_data, rect_main, rect_footer):
         """
@@ -397,9 +378,8 @@
         if theme_data.font_main_shadow:
             self.page_width -= int(theme_data.font_main_shadow_size)
             self.page_height -= int(theme_data.font_main_shadow_size)
-        # For the life of my I don't know why we have to completely kill the
-        # QWebView in order for the display to work properly, but we do. See
-        # bug #1041366 for an example of what happens if we take this out.
+        # For the life of my I don't know why we have to completely kill the QWebView in order for the display to work
+        # properly, but we do. See bug #1041366 for an example of what happens if we take this out.
         self.web = None
         self.web = QtWebKit.QWebView()
         self.web.setVisible(False)
@@ -425,10 +405,9 @@
 
     def _paginate_slide(self, lines, line_end):
         """
-        Figure out how much text can appear on a slide, using the current
-        theme settings.
-        **Note:** The smallest possible "unit" of text for a slide is one line.
-        If the line is too long it will be cut off when displayed.
+        Figure out how much text can appear on a slide, using the current theme settings.
+        **Note:** The smallest possible "unit" of text for a slide is one line. If the line is too long it will be cut
+        off when displayed.
 
         ``lines``
             The text to be fitted on the slide split into lines.
@@ -444,8 +423,8 @@
         html_lines = map(expand_tags, lines)
         # Text too long so go to next page.
         if not self._text_fits_on_slide(separator.join(html_lines)):
-            html_text, previous_raw = self._binary_chop(formatted,
-                previous_html, previous_raw, html_lines, lines, separator, u'')
+            html_text, previous_raw = self._binary_chop(
+                formatted, previous_html, previous_raw, html_lines, lines, separator, u'')
         else:
             previous_raw = separator.join(lines)
         formatted.append(previous_raw)
@@ -454,18 +433,15 @@
 
     def _paginate_slide_words(self, lines, line_end):
         """
-        Figure out how much text can appear on a slide, using the current
-        theme settings.
-        **Note:** The smallest possible "unit" of text for a slide is one word.
-        If one line is too long it will be processed word by word. This is
-        sometimes need for **bible** verses.
+        Figure out how much text can appear on a slide, using the current theme settings.
+        **Note:** The smallest possible "unit" of text for a slide is one word. If one line is too long it will be
+        processed word by word. This is sometimes need for **bible** verses.
 
         ``lines``
             The text to be fitted on the slide split into lines.
 
         ``line_end``
-            The text added after each line. Either ``u' '`` or ``u'<br>``.
-            This is needed for **bibles**.
+            The text added after each line. Either ``u' '`` or ``u'<br>``. This is needed for **bibles**.
         """
         log.debug(u'_paginate_slide_words - Start')
         formatted = []
@@ -476,22 +452,19 @@
             html_line = expand_tags(line)
             # Text too long so go to next page.
             if not self._text_fits_on_slide(previous_html + html_line):
-                # Check if there was a verse before the current one and append
-                # it, when it fits on the page.
+                # Check if there was a verse before the current one and append it, when it fits on the page.
                 if previous_html:
                     if self._text_fits_on_slide(previous_html):
                         formatted.append(previous_raw)
                         previous_html = u''
                         previous_raw = u''
-                        # Now check if the current verse will fit, if it does
-                        # not we have to start to process the verse word by
-                        # word.
+                        # Now check if the current verse will fit, if it does not we have to start to process the verse
+                        # word by word.
                         if self._text_fits_on_slide(html_line):
                             previous_html = html_line + line_end
                             previous_raw = line + line_end
                             continue
-                # Figure out how many words of the line will fit on screen as
-                # the line will not fit as a whole.
+                # Figure out how many words of the line will fit on screen as the line will not fit as a whole.
                 raw_words = self._words_split(line)
                 html_words = map(expand_tags, raw_words)
                 previous_html, previous_raw = \
@@ -505,19 +478,15 @@
 
     def _get_start_tags(self, raw_text):
         """
-        Tests the given text for not closed formatting tags and returns a tuple
-        consisting of three unicode strings::
-
-            (u'{st}{r}Text text text{/r}{/st}', u'{st}{r}', u'<strong>
-            <span style="-webkit-text-fill-color:red">')
-
-        The first unicode string is the text, with correct closing tags. The
-        second unicode string are OpenLP's opening formatting tags and the third
-        unicode string the html opening formatting tags.
+        Tests the given text for not closed formatting tags and returns a tuple consisting of three unicode strings::
+
+            (u'{st}{r}Text text text{/r}{/st}', u'{st}{r}', u'<strong><span style="-webkit-text-fill-color:red">')
+
+        The first unicode string is the text, with correct closing tags. The second unicode string are OpenLP's opening
+        formatting tags and the third unicode string the html opening formatting tags.
 
         ``raw_text``
-            The text to test. The text must **not** contain html tags, only
-            OpenLP formatting tags are allowed::
+            The text to test. The text must **not** contain html tags, only OpenLP formatting tags are allowed::
 
                 {st}{r}Text text text
         """
@@ -529,9 +498,8 @@
             if raw_text.count(tag[u'start tag']) != raw_text.count(tag[u'end tag']):
                 raw_tags.append((raw_text.find(tag[u'start tag']), tag[u'start tag'], tag[u'end tag']))
                 html_tags.append((raw_text.find(tag[u'start tag']), tag[u'start html']))
-        # Sort the lists, so that the tags which were opened first on the first
-        # slide (the text we are checking) will be opened first on the next
-        # slide as well.
+        # Sort the lists, so that the tags which were opened first on the first slide (the text we are checking) will be
+        # opened first on the next slide as well.
         raw_tags.sort(key=lambda tag: tag[0])
         html_tags.sort(key=lambda tag: tag[0])
         # Create a list with closing tags for the raw_text.
@@ -547,46 +515,40 @@
 
     def _binary_chop(self, formatted, previous_html, previous_raw, html_list, raw_list, separator, line_end):
         """
-        This implements the binary chop algorithm for faster rendering. This
-        algorithm works line based (line by line) and word based (word by word).
-        It is assumed that this method is **only** called, when the lines/words
-        to be rendered do **not** fit as a whole.
+        This implements the binary chop algorithm for faster rendering. This algorithm works line based (line by line)
+        and word based (word by word). It is assumed that this method is **only** called, when the lines/words to be
+        rendered do **not** fit as a whole.
 
         ``formatted``
             The list to append any slides.
 
         ``previous_html``
-            The html text which is know to fit on a slide, but is not yet added
-            to the list of slides. (unicode string)
+            The html text which is know to fit on a slide, but is not yet added to the list of slides. (unicode string)
 
         ``previous_raw``
-            The raw text (with formatting tags) which is know to fit on a slide,
-            but is not yet added to the list of slides. (unicode string)
+            The raw text (with formatting tags) which is know to fit on a slide, but is not yet added to the list of
+            slides. (unicode string)
 
         ``html_list``
-            The elements which do not fit on a slide and needs to be processed
-            using the binary chop. The text contains html.
+            The elements which do not fit on a slide and needs to be processed using the binary chop. The text contains
+            html.
 
         ``raw_list``
-            The elements which do not fit on a slide and needs to be processed
-            using the binary chop. The elements can contain formatting tags.
+            The elements which do not fit on a slide and needs to be processed using the binary chop. The elements can
+            contain formatting tags.
 
         ``separator``
-            The separator for the elements. For lines this is ``u'<br>'`` and
-            for words this is ``u' '``.
+            The separator for the elements. For lines this is ``u'<br>'`` and for words this is ``u' '``.
 
         ``line_end``
-            The text added after each "element line". Either ``u' '`` or
-            ``u'<br>``. This is needed for bibles.
+            The text added after each "element line". Either ``u' '`` or ``u'<br>``. This is needed for bibles.
         """
         smallest_index = 0
         highest_index = len(html_list) - 1
         index = int(highest_index / 2)
         while True:
-            if not self._text_fits_on_slide(
-                previous_html + separator.join(html_list[:index + 1]).strip()):
-                # We know that it does not fit, so change/calculate the
-                # new index and highest_index accordingly.
+            if not self._text_fits_on_slide(previous_html + separator.join(html_list[:index + 1]).strip()):
+                # We know that it does not fit, so change/calculate the new index and highest_index accordingly.
                 highest_index = index
                 index = int(index - (index - smallest_index) / 2)
             else:
@@ -607,14 +569,12 @@
             else:
                 continue
             # Check if the remaining elements fit on the slide.
-            if self._text_fits_on_slide(
-                    html_tags + separator.join(html_list[index + 1:]).strip()):
+            if self._text_fits_on_slide(html_tags + separator.join(html_list[index + 1:]).strip()):
                 previous_html = html_tags + separator.join(html_list[index + 1:]).strip() + line_end
                 previous_raw = raw_tags + separator.join(raw_list[index + 1:]).strip() + line_end
                 break
             else:
-                # The remaining elements do not fit, thus reset the indexes,
-                # create a new list and continue.
+                # The remaining elements do not fit, thus reset the indexes, create a new list and continue.
                 raw_list = raw_list[index + 1:]
                 raw_list[0] = raw_tags + raw_list[0]
                 html_list = html_list[index + 1:]
@@ -626,8 +586,7 @@
 
     def _text_fits_on_slide(self, text):
         """
-        Checks if the given ``text`` fits on a slide. If it does ``True`` is
-        returned, otherwise ``False``.
+        Checks if the given ``text`` fits on a slide. If it does ``True`` is returned, otherwise ``False``.
 
         ``text``
             The text to check. It may contain HTML tags.

=== modified file 'openlp/core/lib/searchedit.py'
--- openlp/core/lib/searchedit.py	2013-02-01 19:58:18 +0000
+++ openlp/core/lib/searchedit.py	2013-03-06 23:02:23 +0000
@@ -47,34 +47,33 @@
         Constructor.
         """
         QtGui.QLineEdit.__init__(self, parent)
-        self._currentSearchType = -1
-        self.clearButton = QtGui.QToolButton(self)
-        self.clearButton.setIcon(build_icon(u':/system/clear_shortcut.png'))
-        self.clearButton.setCursor(QtCore.Qt.ArrowCursor)
-        self.clearButton.setStyleSheet(
-            u'QToolButton { border: none; padding: 0px; }')
-        self.clearButton.resize(18, 18)
-        self.clearButton.hide()
-        QtCore.QObject.connect(self.clearButton, QtCore.SIGNAL(u'clicked()'), self._onClearButtonClicked)
-        QtCore.QObject.connect(self, QtCore.SIGNAL(u'textChanged(const QString&)'), self._onSearchEditTextChanged)
-        self._updateStyleSheet()
+        self._current_search_type = -1
+        self.clear_button = QtGui.QToolButton(self)
+        self.clear_button.setIcon(build_icon(u':/system/clear_shortcut.png'))
+        self.clear_button.setCursor(QtCore.Qt.ArrowCursor)
+        self.clear_button.setStyleSheet(u'QToolButton { border: none; padding: 0px; }')
+        self.clear_button.resize(18, 18)
+        self.clear_button.hide()
+        self.clear_button.clicked.connect(self._on_clear_button_clicked)
+        self.textChanged.connect(self._on_search_edit_text_changed)
+        self._update_style_sheet()
         self.setAcceptDrops(False)
 
-    def _updateStyleSheet(self):
-        """
-        Internal method to update the stylesheet depending on which widgets are
-        available and visible.
-        """
-        frameWidth = self.style().pixelMetric(QtGui.QStyle.PM_DefaultFrameWidth)
-        rightPadding = self.clearButton.width() + frameWidth
-        if hasattr(self, u'menuButton'):
-            leftPadding = self.menuButton.width()
-            self.setStyleSheet(u'QLineEdit { padding-left: %spx; padding-right: %spx; } ' % (leftPadding, rightPadding))
+    def _update_style_sheet(self):
+        """
+        Internal method to update the stylesheet depending on which widgets are available and visible.
+        """
+        frame_width = self.style().pixelMetric(QtGui.QStyle.PM_DefaultFrameWidth)
+        right_padding = self.clear_button.width() + frame_width
+        if hasattr(self, u'menu_button'):
+            left_padding = self.menu_button.width()
+            stylesheet = u'QLineEdit { padding-left: %spx; padding-right: %spx; } ' % (left_padding, right_padding)
         else:
-            self.setStyleSheet(u'QLineEdit { padding-right: %spx; } ' % rightPadding)
+            stylesheet = u'QLineEdit { padding-right: %spx; } ' % right_padding
+        self.setStyleSheet(stylesheet)
         msz = self.minimumSizeHint()
-        self.setMinimumSize(max(msz.width(), self.clearButton.width() + (frameWidth * 2) + 2),
-            max(msz.height(), self.clearButton.height() + (frameWidth * 2) + 2))
+        self.setMinimumSize(max(msz.width(), self.clear_button.width() + (frame_width * 2) + 2),
+            max(msz.height(), self.clear_button.height() + (frame_width * 2) + 2))
 
     def resizeEvent(self, event):
         """
@@ -83,51 +82,49 @@
         ``event``
             The event that happened.
         """
-        size = self.clearButton.size()
-        frameWidth = self.style().pixelMetric(QtGui.QStyle.PM_DefaultFrameWidth)
-        self.clearButton.move(self.rect().right() - frameWidth - size.width(),
+        size = self.clear_button.size()
+        frame_width = self.style().pixelMetric(QtGui.QStyle.PM_DefaultFrameWidth)
+        self.clear_button.move(self.rect().right() - frame_width - size.width(),
             (self.rect().bottom() + 1 - size.height()) / 2)
-        if hasattr(self, u'menuButton'):
-            size = self.menuButton.size()
-            self.menuButton.move(self.rect().left() + frameWidth + 2, (self.rect().bottom() + 1 - size.height()) / 2)
+        if hasattr(self, u'menu_button'):
+            size = self.menu_button.size()
+            self.menu_button.move(self.rect().left() + frame_width + 2, (self.rect().bottom() + 1 - size.height()) / 2)
 
-    def currentSearchType(self):
+    def current_search_type(self):
         """
         Readonly property to return the current search type.
         """
-        return self._currentSearchType
+        return self._current_search_type
 
-    def setCurrentSearchType(self, identifier):
+    def set_current_search_type(self, identifier):
         """
         Set a new current search type.
 
         ``identifier``
             The search type identifier (int).
         """
-        menu = self.menuButton.menu()
+        menu = self.menu_button.menu()
         for action in menu.actions():
             if identifier == action.data():
-                # setPlaceholderText has been implemented in Qt 4.7 and in at
-                # least PyQt 4.9 (I am not sure, if it was implemented in
-                # PyQt 4.8).
+                # setPlaceholderText has been implemented in Qt 4.7 and in at least PyQt 4.9 (I am not sure, if it was
+                # implemented in PyQt 4.8).
                 try:
-                    self.setPlaceholderText(action.placeholderText)
+                    self.setPlaceholderText(action.placeholder_text)
                 except AttributeError:
                     pass
-                self.menuButton.setDefaultAction(action)
-                self._currentSearchType = identifier
+                self.menu_button.setDefaultAction(action)
+                self._current_search_type = identifier
                 self.emit(QtCore.SIGNAL(u'searchTypeChanged(int)'), identifier)
                 return True
 
-    def setSearchTypes(self, items):
+    def set_search_types(self, items):
         """
-        A list of tuples to be used in the search type menu. The first item in
-        the list will be preselected as the default.
+        A list of tuples to be used in the search type menu. The first item in the list will be preselected as the
+        default.
 
         ``items``
-            The list of tuples to use. The tuples should contain an integer
-            identifier, an icon (QIcon instance or string) and a title for the
-            item in the menu. In short, they should look like this::
+            The list of tuples to use. The tuples should contain an integer identifier, an icon (QIcon instance or
+            string) and a title for the item in the menu. In short, they should look like this::
 
                 (<identifier>, <icon>, <title>, <place holder text>)
 
@@ -142,63 +139,58 @@
         menu = QtGui.QMenu(self)
         first = None
         for identifier, icon, title, placeholder in items:
-            action = create_widget_action(menu, text=title, icon=icon,
-                data=identifier, triggers=self._onMenuActionTriggered)
-            action.placeholderText = placeholder
+            action = create_widget_action(
+                menu, text=title, icon=icon, data=identifier, triggers=self._on_menu_action_triggered)
+            action.placeholder_text = placeholder
             if first is None:
                 first = action
-                self._currentSearchType = identifier
-        if not hasattr(self, u'menuButton'):
-            self.menuButton = QtGui.QToolButton(self)
-            self.menuButton.setIcon(build_icon(u':/system/clear_shortcut.png'))
-            self.menuButton.setCursor(QtCore.Qt.ArrowCursor)
-            self.menuButton.setPopupMode(QtGui.QToolButton.InstantPopup)
-            self.menuButton.setStyleSheet(
-                u'QToolButton { border: none; padding: 0px 10px 0px 0px; }')
-            self.menuButton.resize(QtCore.QSize(28, 18))
-        self.menuButton.setMenu(menu)
-        self.menuButton.setDefaultAction(first)
-        self.menuButton.show()
-        self._updateStyleSheet()
+                self._current_search_type = identifier
+        if not hasattr(self, u'menu_button'):
+            self.menu_button = QtGui.QToolButton(self)
+            self.menu_button.setIcon(build_icon(u':/system/clear_shortcut.png'))
+            self.menu_button.setCursor(QtCore.Qt.ArrowCursor)
+            self.menu_button.setPopupMode(QtGui.QToolButton.InstantPopup)
+            self.menu_button.setStyleSheet(u'QToolButton { border: none; padding: 0px 10px 0px 0px; }')
+            self.menu_button.resize(QtCore.QSize(28, 18))
+        self.menu_button.setMenu(menu)
+        self.menu_button.setDefaultAction(first)
+        self.menu_button.show()
+        self._update_style_sheet()
 
-    def _onSearchEditTextChanged(self, text):
+    def _on_search_edit_text_changed(self, text):
         """
-        Internally implemented slot to react to when the text in the line edit
-        has changed so that we can show or hide the clear button.
+        Internally implemented slot to react to when the text in the line edit has changed so that we can show or hide
+        the clear button.
 
         ``text``
-            A :class:`~PyQt4.QtCore.QString` instance which represents the text
-            in the line edit.
+            A :class:`~PyQt4.QtCore.QString` instance which represents the text in the line edit.
         """
-        self.clearButton.setVisible(bool(text))
+        self.clear_button.setVisible(bool(text))
 
-    def _onClearButtonClicked(self):
+    def _on_clear_button_clicked(self):
         """
-        Internally implemented slot to react to the clear button being clicked
-        to clear the line edit. Once it has cleared the line edit, it emits the
-        ``cleared()`` signal so that an application can react to the clearing
-        of the line edit.
+        Internally implemented slot to react to the clear button being clicked to clear the line edit. Once it has
+        cleared the line edit, it emits the ``cleared()`` signal so that an application can react to the clearing of the
+        line edit.
         """
         self.clear()
         self.emit(QtCore.SIGNAL(u'cleared()'))
 
-    def _onMenuActionTriggered(self):
+    def _on_menu_action_triggered(self):
         """
-        Internally implemented slot to react to the select of one of the search
-        types in the menu. Once it has set the correct action on the button,
-        and set the current search type (using the list of identifiers provided
-        by the developer), the ``searchTypeChanged(int)`` signal is emitted
-        with the identifier.
+        Internally implemented slot to react to the select of one of the search types in the menu. Once it has set the
+        correct action on the button, and set the current search type (using the list of identifiers provided by the
+        developer), the ``searchTypeChanged(int)`` signal is emitted with the identifier.
         """
         sender = self.sender()
-        for action in self.menuButton.menu().actions():
+        for action in self.menu_button.menu().actions():
             action.setChecked(False)
-        self.menuButton.setDefaultAction(sender)
-        self._currentSearchType = sender.data()
-        # setPlaceholderText has been implemented in Qt 4.7 and in at least
+        self.menu_button.setDefaultAction(sender)
+        self._current_search_type = sender.data()
+        # setplaceholder_text has been implemented in Qt 4.7 and in at least
         # PyQt 4.9 (I am not sure, if it was implemented in PyQt 4.8).
         try:
-            self.setPlaceholderText(self.menuButton.defaultAction().placeholderText)
+            self.setPlaceholderText(self.menu_button.defaultAction().placeholder_text)
         except AttributeError:
             pass
-        self.emit(QtCore.SIGNAL(u'searchTypeChanged(int)'), self._currentSearchType)
+        self.emit(QtCore.SIGNAL(u'searchTypeChanged(int)'), self._current_search_type)

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2013-02-16 18:24:31 +0000
+++ openlp/core/lib/serviceitem.py	2013-03-06 23:02:23 +0000
@@ -70,7 +70,7 @@
              reordered.
 
     ``RequiresMedia``
-            Determines is the serviceItem needs a Media Player
+            Determines is the service_item needs a Media Player
 
     ``CanLoop``
             The capability to allow the SlideController to allow the loop

=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py	2013-02-02 21:16:42 +0000
+++ openlp/core/lib/theme.py	2013-03-06 23:02:23 +0000
@@ -200,12 +200,10 @@
     Names = [u'top', u'middle', u'bottom']
 
 
-BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
-    u'slide_transition']
+BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow', u'slide_transition']
 
-INTEGER_LIST = [u'size', u'line_adjustment', u'x', u'height', u'y',
-    u'width', u'shadow_size', u'outline_size', u'horizontal_align',
-    u'vertical_align', u'wrap_style']
+INTEGER_LIST = [u'size', u'line_adjustment', u'x', u'height', u'y', u'width', u'shadow_size', u'outline_size',
+    u'horizontal_align', u'vertical_align', u'wrap_style']
 
 
 class ThemeXML(object):
@@ -234,8 +232,7 @@
             if self.background_filename and path:
                 self.theme_name = self.theme_name.strip()
                 self.background_filename = self.background_filename.strip()
-                self.background_filename = os.path.join(path, self.theme_name,
-                    self.background_filename)
+                self.background_filename = os.path.join(path, self.theme_name, self.background_filename)
 
     def _new_document(self, name):
         """
@@ -308,11 +305,9 @@
         # Create endColor element
         self.child_element(background, u'borderColor', unicode(borderColor))
 
-    def add_font(self, name, color, size, override, fonttype=u'main',
-        bold=u'False', italics=u'False', line_adjustment=0,
-        xpos=0, ypos=0, width=0, height=0, outline=u'False',
-        outline_color=u'#ffffff', outline_pixel=2, shadow=u'False',
-        shadow_color=u'#ffffff', shadow_pixel=5):
+    def add_font(self, name, color, size, override, fonttype=u'main', bold=u'False', italics=u'False',
+        line_adjustment=0, xpos=0, ypos=0, width=0, height=0, outline=u'False', outline_color=u'#ffffff',
+        outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5):
         """
         Add a Font.
 

=== modified file 'openlp/core/ui/aboutdialog.py'
--- openlp/core/ui/aboutdialog.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/aboutdialog.py	2013-03-06 23:02:23 +0000
@@ -38,60 +38,60 @@
     The actual GUI widgets for the About form.
     """
 
-    def setupUi(self, aboutDialog):
+    def setupUi(self, about_dialog):
         """
         Set up the UI for the dialog.
         """
-        aboutDialog.setObjectName(u'aboutDialog')
-        aboutDialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
-        self.aboutDialogLayout = QtGui.QVBoxLayout(aboutDialog)
-        self.aboutDialogLayout.setObjectName(u'aboutDialogLayout')
-        self.logoLabel = QtGui.QLabel(aboutDialog)
-        self.logoLabel.setPixmap(QtGui.QPixmap(u':/graphics/openlp-about-logo.png'))
-        self.logoLabel.setObjectName(u'logoLabel')
-        self.aboutDialogLayout.addWidget(self.logoLabel)
-        self.aboutNotebook = QtGui.QTabWidget(aboutDialog)
-        self.aboutNotebook.setObjectName(u'aboutNotebook')
-        self.aboutTab = QtGui.QWidget()
-        self.aboutTab.setObjectName(u'aboutTab')
-        self.aboutTabLayout = QtGui.QVBoxLayout(self.aboutTab)
-        self.aboutTabLayout.setObjectName(u'aboutTabLayout')
-        self.aboutTextEdit = QtGui.QPlainTextEdit(self.aboutTab)
-        self.aboutTextEdit.setReadOnly(True)
-        self.aboutTextEdit.setObjectName(u'aboutTextEdit')
-        self.aboutTabLayout.addWidget(self.aboutTextEdit)
-        self.aboutNotebook.addTab(self.aboutTab, u'')
-        self.creditsTab = QtGui.QWidget()
-        self.creditsTab.setObjectName(u'creditsTab')
-        self.creditsTabLayout = QtGui.QVBoxLayout(self.creditsTab)
-        self.creditsTabLayout.setObjectName(u'creditsTabLayout')
-        self.creditsTextEdit = QtGui.QPlainTextEdit(self.creditsTab)
-        self.creditsTextEdit.setReadOnly(True)
-        self.creditsTextEdit.setObjectName(u'creditsTextEdit')
-        self.creditsTabLayout.addWidget(self.creditsTextEdit)
-        self.aboutNotebook.addTab(self.creditsTab, u'')
-        self.licenseTab = QtGui.QWidget()
-        self.licenseTab.setObjectName(u'licenseTab')
-        self.licenseTabLayout = QtGui.QVBoxLayout(self.licenseTab)
-        self.licenseTabLayout.setObjectName(u'licenseTabLayout')
-        self.licenseTextEdit = QtGui.QPlainTextEdit(self.licenseTab)
-        self.licenseTextEdit.setReadOnly(True)
-        self.licenseTextEdit.setObjectName(u'licenseTextEdit')
-        self.licenseTabLayout.addWidget(self.licenseTextEdit)
-        self.aboutNotebook.addTab(self.licenseTab, u'')
-        self.aboutDialogLayout.addWidget(self.aboutNotebook)
-        self.volunteerButton = create_button(None, u'volunteerButton', icon=u':/system/system_volunteer.png')
-        self.button_box = create_button_box(aboutDialog, u'button_box', [u'close'], [self.volunteerButton])
-        self.aboutDialogLayout.addWidget(self.button_box)
-        self.retranslateUi(aboutDialog)
-        self.aboutNotebook.setCurrentIndex(0)
+        about_dialog.setObjectName(u'about_dialog')
+        about_dialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
+        self.about_dialog_layout = QtGui.QVBoxLayout(about_dialog)
+        self.about_dialog_layout.setObjectName(u'about_dialog_layout')
+        self.logo_label = QtGui.QLabel(about_dialog)
+        self.logo_label.setPixmap(QtGui.QPixmap(u':/graphics/openlp-about-logo.png'))
+        self.logo_label.setObjectName(u'logo_label')
+        self.about_dialog_layout.addWidget(self.logo_label)
+        self.about_notebook = QtGui.QTabWidget(about_dialog)
+        self.about_notebook.setObjectName(u'about_notebook')
+        self.about_tab = QtGui.QWidget()
+        self.about_tab.setObjectName(u'about_tab')
+        self.about_tab_layout = QtGui.QVBoxLayout(self.about_tab)
+        self.about_tab_layout.setObjectName(u'about_tab_layout')
+        self.about_text_edit = QtGui.QPlainTextEdit(self.about_tab)
+        self.about_text_edit.setReadOnly(True)
+        self.about_text_edit.setObjectName(u'about_text_edit')
+        self.about_tab_layout.addWidget(self.about_text_edit)
+        self.about_notebook.addTab(self.about_tab, u'')
+        self.credits_tab = QtGui.QWidget()
+        self.credits_tab.setObjectName(u'credits_tab')
+        self.credits_tab_layout = QtGui.QVBoxLayout(self.credits_tab)
+        self.credits_tab_layout.setObjectName(u'credits_tab_layout')
+        self.credits_text_edit = QtGui.QPlainTextEdit(self.credits_tab)
+        self.credits_text_edit.setReadOnly(True)
+        self.credits_text_edit.setObjectName(u'credits_text_edit')
+        self.credits_tab_layout.addWidget(self.credits_text_edit)
+        self.about_notebook.addTab(self.credits_tab, u'')
+        self.license_tab = QtGui.QWidget()
+        self.license_tab.setObjectName(u'license_tab')
+        self.license_tab_layout = QtGui.QVBoxLayout(self.license_tab)
+        self.license_tab_layout.setObjectName(u'license_tab_layout')
+        self.license_text_edit = QtGui.QPlainTextEdit(self.license_tab)
+        self.license_text_edit.setReadOnly(True)
+        self.license_text_edit.setObjectName(u'license_text_edit')
+        self.license_tab_layout.addWidget(self.license_text_edit)
+        self.about_notebook.addTab(self.license_tab, u'')
+        self.about_dialog_layout.addWidget(self.about_notebook)
+        self.volunteer_button = create_button(None, u'volunteer_button', icon=u':/system/system_volunteer.png')
+        self.button_box = create_button_box(about_dialog, u'button_box', [u'close'], [self.volunteer_button])
+        self.about_dialog_layout.addWidget(self.button_box)
+        self.retranslateUi(about_dialog)
+        self.about_notebook.setCurrentIndex(0)
 
-    def retranslateUi(self, aboutDialog):
+    def retranslateUi(self, about_dialog):
         """
         Dynamically translate the UI.
         """
-        aboutDialog.setWindowTitle(u'%s OpenLP' % UiStrings().About)
-        self.aboutTextEdit.setPlainText(translate('OpenLP.AboutForm',
+        about_dialog.setWindowTitle(u'%s OpenLP' % UiStrings().About)
+        self.about_text_edit.setPlainText(translate('OpenLP.AboutForm',
             'OpenLP <version><revision> - Open Source Lyrics '
             'Projection\n'
             '\n'
@@ -107,7 +107,7 @@
             'like to see more free Christian software being written, please '
             'consider volunteering by using the button below.'
         ))
-        self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.aboutTab), UiStrings().About)
+        self.about_notebook.setTabText(self.about_notebook.indexOf(self.about_tab), UiStrings().About)
         lead = u'Raoul "superfly" Snyman'
         developers = [u'Tim "TRB143" Bentley', u'Jonathan "gushie" Corwin',
             u'Michael "cocooncrash" Gorven',
@@ -165,7 +165,7 @@
         }
         documentors = [u'Wesley "wrst" Stout',
             u'John "jseagull1" Cegalis (lead)']
-        self.creditsTextEdit.setPlainText(translate('OpenLP.AboutForm',
+        self.credits_text_edit.setPlainText(translate('OpenLP.AboutForm',
             'Project Lead\n'
             '    %s\n'
             '\n'
@@ -268,7 +268,7 @@
             u'\n        '.join(translators[u'ta_LK']),
             u'\n        '.join(translators[u'zh_CN']),
             u'\n    '.join(documentors)))
-        self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.creditsTab),
+        self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
             translate('OpenLP.AboutForm', 'Credits'))
         copyright_note = translate('OpenLP.AboutForm',
             'Copyright \xa9 2004-2013 %s\n'
@@ -662,7 +662,7 @@
             'linking proprietary applications with the library. If this is '
             'what you want to do, use the GNU Lesser General Public License '
             'instead of this License.')
-        self.licenseTextEdit.setPlainText(u'%s\n\n%s\n\n%s\n\n\n%s' % (copyright_note, licence, disclaimer, gpltext))
-        self.aboutNotebook.setTabText(self.aboutNotebook.indexOf(self.licenseTab),
+        self.license_text_edit.setPlainText(u'%s\n\n%s\n\n%s\n\n\n%s' % (copyright_note, licence, disclaimer, gpltext))
+        self.about_notebook.setTabText(self.about_notebook.indexOf(self.license_tab),
             translate('OpenLP.AboutForm', 'License'))
-        self.volunteerButton.setText(translate('OpenLP.AboutForm', 'Volunteer'))
+        self.volunteer_button.setText(translate('OpenLP.AboutForm', 'Volunteer'))

=== modified file 'openlp/core/ui/aboutform.py'
--- openlp/core/ui/aboutform.py	2013-02-01 19:58:18 +0000
+++ openlp/core/ui/aboutform.py	2013-03-06 23:02:23 +0000
@@ -47,22 +47,21 @@
         Do some initialisation stuff
         """
         QtGui.QDialog.__init__(self, parent)
-        applicationVersion = get_application_version()
+        application_version = get_application_version()
         self.setupUi(self)
-        about_text = self.aboutTextEdit.toPlainText()
-        about_text = about_text.replace(u'<version>', applicationVersion[u'version'])
-        if applicationVersion[u'build']:
-            build_text = translate('OpenLP.AboutForm', ' build %s') % applicationVersion[u'build']
+        about_text = self.about_text_edit.toPlainText()
+        about_text = about_text.replace(u'<version>', application_version[u'version'])
+        if application_version[u'build']:
+            build_text = translate('OpenLP.AboutForm', ' build %s') % application_version[u'build']
         else:
             build_text = u''
         about_text = about_text.replace(u'<revision>', build_text)
-        self.aboutTextEdit.setPlainText(about_text)
-        QtCore.QObject.connect(self.volunteerButton, QtCore.SIGNAL(u'clicked()'), self.onVolunteerButtonClicked)
+        self.about_text_edit.setPlainText(about_text)
+        self.volunteer_button.clicked.connect(self.on_volunteer_button_clicked)
 
-    def onVolunteerButtonClicked(self):
+    def on_volunteer_button_clicked(self):
         """
         Launch a web browser and go to the contribute page on the site.
         """
         import webbrowser
-        url = u'http://openlp.org/en/contribute'
-        webbrowser.open_new(url)
+        webbrowser.open_new(u'http://openlp.org/en/contribute')

=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py	2013-02-07 08:42:17 +0000
+++ openlp/core/ui/advancedtab.py	2013-03-06 23:02:23 +0000
@@ -308,8 +308,7 @@
         self.service_name_day.setItemText(5, translate('OpenLP.AdvancedTab', 'Saturday'))
         self.service_name_day.setItemText(6, translate('OpenLP.AdvancedTab', 'Sunday'))
         self.service_name_day.setItemText(7, translate('OpenLP.AdvancedTab', 'Now'))
-        self.service_name_time.setToolTip(translate('OpenLP.AdvancedTab',
-            'Time when usual service starts.'))
+        self.service_name_time.setToolTip(translate('OpenLP.AdvancedTab', 'Time when usual service starts.'))
         self.service_name_label.setText(translate('OpenLP.AdvancedTab', 'Name:'))
         self.service_name_edit.setToolTip(translate('OpenLP.AdvancedTab', 'Consult the OpenLP manual for usage.'))
         self.service_name_revert_button.setToolTip(
@@ -524,8 +523,7 @@
         """
         Select the background colour of the default display screen.
         """
-        new_color = QtGui.QColorDialog.getColor(
-            QtGui.QColor(self.default_color), self)
+        new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.default_color), self)
         if new_color.isValid():
             self.default_color = new_color.name()
             self.default_color_button.setStyleSheet(u'background-color: %s' % self.default_color)

=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py	2013-02-01 19:58:18 +0000
+++ openlp/core/ui/exceptiondialog.py	2013-03-06 23:02:23 +0000
@@ -40,71 +40,67 @@
     """
     The GUI widgets of the exception dialog.
     """
-    def setupUi(self, exceptionDialog):
+    def setupUi(self, exception_dialog):
         """
         Set up the UI.
         """
-        exceptionDialog.setObjectName(u'exceptionDialog')
-        self.exceptionLayout = QtGui.QVBoxLayout(exceptionDialog)
-        self.exceptionLayout.setObjectName(u'exceptionLayout')
-        self.messageLayout = QtGui.QHBoxLayout()
-        self.messageLayout.setObjectName(u'messageLayout')
-        self.messageLayout.addSpacing(12)
-        self.bugLabel = QtGui.QLabel(exceptionDialog)
-        self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
-        self.bugLabel.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        self.bugLabel.setObjectName(u'bugLabel')
-        self.messageLayout.addWidget(self.bugLabel)
-        self.messageLayout.addSpacing(12)
-        self.messageLabel = QtGui.QLabel(exceptionDialog)
-        self.messageLabel.setWordWrap(True)
-        self.messageLabel.setObjectName(u'messageLabel')
-        self.messageLayout.addWidget(self.messageLabel)
-        self.exceptionLayout.addLayout(self.messageLayout)
-        self.descriptionExplanation = QtGui.QLabel(exceptionDialog)
-        self.descriptionExplanation.setObjectName(u'descriptionExplanation')
-        self.exceptionLayout.addWidget(self.descriptionExplanation)
-        self.descriptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog)
-        self.descriptionTextEdit.setObjectName(u'descriptionTextEdit')
-        self.exceptionLayout.addWidget(self.descriptionTextEdit)
-        self.descriptionWordCount = QtGui.QLabel(exceptionDialog)
-        self.descriptionWordCount.setObjectName(u'descriptionWordCount')
-        self.exceptionLayout.addWidget(self.descriptionWordCount)
-        self.exceptionTextEdit = QtGui.QPlainTextEdit(exceptionDialog)
-        self.exceptionTextEdit.setReadOnly(True)
-        self.exceptionTextEdit.setObjectName(u'exceptionTextEdit')
-        self.exceptionLayout.addWidget(self.exceptionTextEdit)
-        self.sendReportButton = create_button(exceptionDialog, u'sendReportButton',
-            icon=u':/general/general_email.png', click=self.onSendReportButtonClicked)
-        self.saveReportButton = create_button(exceptionDialog, u'saveReportButton',
-            icon=u':/general/general_save.png', click=self.onSaveReportButtonClicked)
-        self.attachFileButton = create_button(exceptionDialog, u'attachFileButton',
-            icon=u':/general/general_open.png', click=self.onAttachFileButtonClicked)
-        self.button_box = create_button_box(exceptionDialog, u'button_box',
-            [u'close'], [self.sendReportButton, self.saveReportButton, self.attachFileButton])
-        self.exceptionLayout.addWidget(self.button_box)
-
-        self.retranslateUi(exceptionDialog)
-        QtCore.QObject.connect(self.descriptionTextEdit,
-            QtCore.SIGNAL(u'textChanged()'), self.onDescriptionUpdated)
-
-    def retranslateUi(self, exceptionDialog):
+        exception_dialog.setObjectName(u'exception_dialog')
+        self.exception_layout = QtGui.QVBoxLayout(exception_dialog)
+        self.exception_layout.setObjectName(u'exception_layout')
+        self.message_layout = QtGui.QHBoxLayout()
+        self.message_layout.setObjectName(u'messageLayout')
+        self.message_layout.addSpacing(12)
+        self.bug_label = QtGui.QLabel(exception_dialog)
+        self.bug_label.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
+        self.bug_label.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.bug_label.setObjectName(u'bug_label')
+        self.message_layout.addWidget(self.bug_label)
+        self.message_layout.addSpacing(12)
+        self.message_label = QtGui.QLabel(exception_dialog)
+        self.message_label.setWordWrap(True)
+        self.message_label.setObjectName(u'message_label')
+        self.message_layout.addWidget(self.message_label)
+        self.exception_layout.addLayout(self.message_layout)
+        self.description_explanation = QtGui.QLabel(exception_dialog)
+        self.description_explanation.setObjectName(u'description_explanation')
+        self.exception_layout.addWidget(self.description_explanation)
+        self.description_text_edit = QtGui.QPlainTextEdit(exception_dialog)
+        self.description_text_edit.setObjectName(u'description_text_edit')
+        self.exception_layout.addWidget(self.description_text_edit)
+        self.description_word_count = QtGui.QLabel(exception_dialog)
+        self.description_word_count.setObjectName(u'description_word_count')
+        self.exception_layout.addWidget(self.description_word_count)
+        self.exception_text_edit = QtGui.QPlainTextEdit(exception_dialog)
+        self.exception_text_edit.setReadOnly(True)
+        self.exception_text_edit.setObjectName(u'exception_text_edit')
+        self.exception_layout.addWidget(self.exception_text_edit)
+        self.send_report_button = create_button(exception_dialog, u'send_report_button',
+            icon=u':/general/general_email.png', click=self.on_send_report_button_clicked)
+        self.save_report_button = create_button(exception_dialog, u'save_report_button',
+            icon=u':/general/general_save.png', click=self.on_save_report_button_clicked)
+        self.attach_tile_button = create_button(exception_dialog, u'attach_tile_button',
+            icon=u':/general/general_open.png', click=self.on_attach_file_button_clicked)
+        self.button_box = create_button_box(exception_dialog, u'button_box',
+            [u'close'], [self.send_report_button, self.save_report_button, self.attach_tile_button])
+        self.exception_layout.addWidget(self.button_box)
+
+        self.retranslateUi(exception_dialog)
+        self.description_text_edit.textChanged.connect(self.on_description_updated)
+
+    def retranslateUi(self, exception_dialog):
         """
         Translate the widgets on the fly.
         """
-        exceptionDialog.setWindowTitle(translate('OpenLP.ExceptionDialog', 'Error Occurred'))
-        self.descriptionExplanation.setText(translate('OpenLP.ExceptionDialog',
+        exception_dialog.setWindowTitle(translate('OpenLP.ExceptionDialog', 'Error Occurred'))
+        self.description_explanation.setText(translate('OpenLP.ExceptionDialog',
             'Please enter a description of what you were doing to cause this '
             'error \n(Minimum 20 characters)'))
-        self.messageLabel.setText(translate('OpenLP.ExceptionDialog', 'Oops! '
+        self.message_label.setText(translate('OpenLP.ExceptionDialog', 'Oops! '
             'OpenLP hit a problem, and couldn\'t recover. The text in the box '
             'below contains information that might be helpful to the OpenLP '
             'developers, so please e-mail it to bugs@xxxxxxxxxx, along with a '
             'detailed description of what you were doing when the problem '
             'occurred.'))
-        self.sendReportButton.setText(translate('OpenLP.ExceptionDialog',
-            'Send E-Mail'))
-        self.saveReportButton.setText(translate('OpenLP.ExceptionDialog',
-            'Save to File'))
-        self.attachFileButton.setText(translate('OpenLP.ExceptionDialog',
-            'Attach File'))
+        self.send_report_button.setText(translate('OpenLP.ExceptionDialog', 'Send E-Mail'))
+        self.save_report_button.setText(translate('OpenLP.ExceptionDialog', 'Save to File'))
+        self.attach_tile_button.setText(translate('OpenLP.ExceptionDialog', 'Attach File'))

=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py	2013-02-14 21:31:17 +0000
+++ openlp/core/ui/exceptionform.py	2013-03-06 23:02:23 +0000
@@ -112,18 +112,18 @@
         """
         Show the dialog.
         """
-        self.descriptionTextEdit.setPlainText(u'')
-        self.onDescriptionUpdated()
-        self.fileAttachment = None
+        self.description_text_edit.setPlainText(u'')
+        self.on_description_updated()
+        self.file_attachment = None
         return QtGui.QDialog.exec_(self)
 
-    def _createReport(self):
+    def _create_report(self):
         """
         Create an exception report.
         """
         openlp_version = get_application_version()
-        description = self.descriptionTextEdit.toPlainText()
-        traceback = self.exceptionTextEdit.toPlainText()
+        description = self.description_text_edit.toPlainText()
+        traceback = self.exception_text_edit.toPlainText()
         system = translate('OpenLP.ExceptionForm', 'Platform: %s\n') % platform.platform()
         libraries = u'Python: %s\n' % platform.python_version() + \
             u'Qt4: %s\n' % Qt.qVersion() + \
@@ -146,7 +146,7 @@
                 system += u'Desktop: GNOME\n'
         return (openlp_version, description, traceback, system, libraries)
 
-    def onSaveReportButtonClicked(self):
+    def on_save_report_button_clicked(self):
         """
         Saving exception log and system information to a file.
         """
@@ -164,7 +164,7 @@
         if filename:
             filename = unicode(filename).replace(u'/', os.path.sep)
             Settings().setValue(self.settings_section + u'/last directory', os.path.dirname(filename))
-            report_text = report_text % self._createReport()
+            report_text = report_text % self._create_report()
             try:
                 report_file = open(filename, u'w')
                 try:
@@ -180,7 +180,7 @@
             finally:
                 report_file.close()
 
-    def onSendReportButtonClicked(self):
+    def on_send_report_button_clicked(self):
         """
         Opening systems default email client and inserting exception log and
         system informations.
@@ -194,7 +194,7 @@
             '--- Library Versions ---\n%s\n',
             'Please add the information that bug reports are favoured written '
             'in English.')
-        content = self._createReport()
+        content = self._create_report()
         source = u''
         exception = u''
         for line in content[2].split(u'\n'):
@@ -206,24 +206,24 @@
         mailto_url = QtCore.QUrl(u'mailto:bugs@xxxxxxxxxx')
         mailto_url.addQueryItem(u'subject', subject)
         mailto_url.addQueryItem(u'body', body % content)
-        if self.fileAttachment:
-            mailto_url.addQueryItem(u'attach', self.fileAttachment)
+        if self.file_attachment:
+            mailto_url.addQueryItem(u'attach', self.file_attachment)
         QtGui.QDesktopServices.openUrl(mailto_url)
 
-    def onDescriptionUpdated(self):
+    def on_description_updated(self):
         """
         Update the minimum number of characters needed in the description.
         """
-        count = int(20 - len(self.descriptionTextEdit.toPlainText()))
+        count = int(20 - len(self.description_text_edit.toPlainText()))
         if count < 0:
             count = 0
-            self.__buttonState(True)
+            self.__button_state(True)
         else:
-            self.__buttonState(False)
-        self.descriptionWordCount.setText(
+            self.__button_state(False)
+        self.description_word_count.setText(
             translate('OpenLP.ExceptionDialog', 'Description characters to enter : %s') % count)
 
-    def onAttachFileButtonClicked(self):
+    def on_attach_file_button_clicked(self):
         """
         Attache files to the bug report e-mail.
         """
@@ -232,11 +232,11 @@
                 Settings().value(self.settings_section + u'/last directory'), u'%s (*.*) (*)' % UiStrings().AllFiles)
         log.info(u'New files(s) %s', unicode(files))
         if files:
-            self.fileAttachment = unicode(files)
+            self.file_attachment = unicode(files)
 
-    def __buttonState(self, state):
+    def __button_state(self, state):
         """
         Toggle the button state.
         """
-        self.saveReportButton.setEnabled(state)
-        self.sendReportButton.setEnabled(state)
+        self.save_report_button.setEnabled(state)
+        self.send_report_button.setEnabled(state)

=== modified file 'openlp/core/ui/filerenamedialog.py'
--- openlp/core/ui/filerenamedialog.py	2013-02-01 19:58:18 +0000
+++ openlp/core/ui/filerenamedialog.py	2013-03-06 23:02:23 +0000
@@ -39,28 +39,28 @@
     """
     The UI widgets for the rename dialog
     """
-    def setupUi(self, fileRenameDialog):
+    def setupUi(self, file_rename_dialog):
         """
         Set up the UI
         """
-        fileRenameDialog.setObjectName(u'fileRenameDialog')
-        fileRenameDialog.resize(300, 10)
-        self.dialogLayout = QtGui.QGridLayout(fileRenameDialog)
-        self.dialogLayout.setObjectName(u'dialog_layout')
-        self.fileNameLabel = QtGui.QLabel(fileRenameDialog)
-        self.fileNameLabel.setObjectName(u'fileNameLabel')
-        self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
-        self.fileNameEdit = QtGui.QLineEdit(fileRenameDialog)
-        self.fileNameEdit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+%]+'), self))
-        self.fileNameEdit.setObjectName(u'fileNameEdit')
-        self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
-        self.button_box = create_button_box(fileRenameDialog, u'button_box', [u'cancel', u'ok'])
-        self.dialogLayout.addWidget(self.button_box, 1, 0, 1, 2)
-        self.retranslateUi(fileRenameDialog)
+        file_rename_dialog.setObjectName(u'fileRenameDialog')
+        file_rename_dialog.resize(300, 10)
+        self.dialog_layout = QtGui.QGridLayout(file_rename_dialog)
+        self.dialog_layout.setObjectName(u'dialogLayout')
+        self.file_name_label = QtGui.QLabel(file_rename_dialog)
+        self.file_name_label.setObjectName(u'fileNameLabel')
+        self.dialog_layout.addWidget(self.file_name_label, 0, 0)
+        self.file_name_edit = QtGui.QLineEdit(file_rename_dialog)
+        self.file_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+%]+'), self))
+        self.file_name_edit.setObjectName(u'fileNameEdit')
+        self.dialog_layout.addWidget(self.file_name_edit, 0, 1)
+        self.button_box = create_button_box(file_rename_dialog, u'button_box', [u'cancel', u'ok'])
+        self.dialog_layout.addWidget(self.button_box, 1, 0, 1, 2)
+        self.retranslateUi(file_rename_dialog)
         self.setMaximumHeight(self.sizeHint().height())
 
-    def retranslateUi(self, fileRenameDialog):
+    def retranslateUi(self, file_rename_dialog):
         """
         Translate the UI on the fly.
         """
-        self.fileNameLabel.setText(translate('OpenLP.FileRenameForm', 'New File Name:'))
+        self.file_name_label.setText(translate('OpenLP.FileRenameForm', 'New File Name:'))

=== modified file 'openlp/core/ui/filerenameform.py'
--- openlp/core/ui/filerenameform.py	2013-02-07 21:55:22 +0000
+++ openlp/core/ui/filerenameform.py	2013-03-06 23:02:23 +0000
@@ -56,7 +56,7 @@
             self.setWindowTitle(translate('OpenLP.FileRenameForm', 'File Copy'))
         else:
             self.setWindowTitle(translate('OpenLP.FileRenameForm', 'File Rename'))
-        self.fileNameEdit.setFocus()
+        self.file_name_edit.setFocus()
         return QtGui.QDialog.exec_(self)
 
     def _get_main_window(self):

=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py	2013-02-10 16:10:32 +0000
+++ openlp/core/ui/firsttimeform.py	2013-03-06 23:02:23 +0000
@@ -98,11 +98,9 @@
         self.update_screen_list_combo()
         self.was_download_cancelled = False
         self.downloading = translate('OpenLP.FirstTimeWizard', 'Downloading %s...')
-        QtCore.QObject.connect(self.cancelButton, QtCore.SIGNAL('clicked()'),
-            self.onCancelButtonClicked)
-        QtCore.QObject.connect(self.noInternetFinishButton, QtCore.SIGNAL('clicked()'),
-            self.onNoInternetFinishButtonClicked)
-        QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
+        self.cancelButton.clicked.connect(self.onCancelButtonClicked)
+        self.noInternetFinishButton.clicked.connect(self.onNoInternetFinishButtonClicked)
+        self.currentIdChanged.connect(self.onCurrentIdChanged)
         Registry().register_function(u'config_screen_changed', self.update_screen_list_combo)
 
     def exec_(self):

=== modified file 'openlp/core/ui/firsttimelanguageform.py'
--- openlp/core/ui/firsttimelanguageform.py	2013-02-01 20:36:27 +0000
+++ openlp/core/ui/firsttimelanguageform.py	2013-03-06 23:02:23 +0000
@@ -48,8 +48,7 @@
         self.setupUi(self)
         self.qmList = LanguageManager.get_qm_list()
         self.languageComboBox.addItem(u'Autodetect')
-        for key in sorted(self.qmList.keys()):
-            self.languageComboBox.addItem(key)
+        self.languageComboBox.addItems(sorted(self.qmList.keys()))
 
     def exec_(self):
         """

=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py	2013-02-01 20:36:27 +0000
+++ openlp/core/ui/firsttimewizard.py	2013-03-06 23:02:23 +0000
@@ -208,13 +208,11 @@
         """
         Translate the UI on the fly
         """
-        FirstTimeWizard.setWindowTitle(translate(
-            'OpenLP.FirstTimeWizard', 'First Time Wizard'))
+        FirstTimeWizard.setWindowTitle(translate('OpenLP.FirstTimeWizard', 'First Time Wizard'))
         self.titleLabel.setText(u'<span style="font-size:14pt; font-weight:600;">%s</span>' %
             translate('OpenLP.FirstTimeWizard', 'Welcome to the First Time Wizard'))
         self.informationLabel.setText(translate('OpenLP.FirstTimeWizard',
-            'This wizard will help you to configure OpenLP for initial use.'
-            ' Click the next button below to start.'))
+            'This wizard will help you to configure OpenLP for initial use. Click the next button below to start.'))
         self.pluginPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Activate required Plugins'))
         self.pluginPage.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select the Plugins you wish to use. '))
         self.songsCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
@@ -240,8 +238,7 @@
             'check your Internet connection and re-run this wizard by '
             'selecting "Tools/Re-run First Time Wizard" from OpenLP.')
         self.cancelWizardText = translate('OpenLP.FirstTimeWizard',
-            '\n\nTo cancel the First Time Wizard completely (and not start '
-            'OpenLP), click the Cancel button now.')
+            '\n\nTo cancel the First Time Wizard completely (and not start OpenLP), click the Cancel button now.')
         self.songsPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Sample Songs'))
         self.songsPage.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select and download public domain songs.'))
         self.biblesPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Sample Bibles'))

=== modified file 'openlp/core/ui/formattingtagdialog.py'
--- openlp/core/ui/formattingtagdialog.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/formattingtagdialog.py	2013-03-06 23:02:23 +0000
@@ -39,106 +39,106 @@
     """
     The UI widgets for the formatting tags window.
     """
-    def setupUi(self, formattingTagDialog):
+    def setupUi(self, formatting_tag_dialog):
         """
         Set up the UI
         """
-        formattingTagDialog.setObjectName(u'formattingTagDialog')
-        formattingTagDialog.resize(725, 548)
-        self.listdataGridLayout = QtGui.QGridLayout(formattingTagDialog)
-        self.listdataGridLayout.setMargin(8)
-        self.listdataGridLayout.setObjectName(u'listdataGridLayout')
-        self.tagTableWidget = QtGui.QTableWidget(formattingTagDialog)
-        self.tagTableWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
-        self.tagTableWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
-        self.tagTableWidget.setAlternatingRowColors(True)
-        self.tagTableWidget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
-        self.tagTableWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
-        self.tagTableWidget.setCornerButtonEnabled(False)
-        self.tagTableWidget.setObjectName(u'tagTableWidget')
-        self.tagTableWidget.setColumnCount(4)
-        self.tagTableWidget.setRowCount(0)
-        self.tagTableWidget.horizontalHeader().setStretchLastSection(True)
-        item = QtGui.QTableWidgetItem()
-        self.tagTableWidget.setHorizontalHeaderItem(0, item)
-        item = QtGui.QTableWidgetItem()
-        self.tagTableWidget.setHorizontalHeaderItem(1, item)
-        item = QtGui.QTableWidgetItem()
-        self.tagTableWidget.setHorizontalHeaderItem(2, item)
-        item = QtGui.QTableWidgetItem()
-        self.tagTableWidget.setHorizontalHeaderItem(3, item)
-        self.listdataGridLayout.addWidget(self.tagTableWidget, 0, 0, 1, 1)
-        self.horizontalLayout = QtGui.QHBoxLayout()
-        self.horizontalLayout.setObjectName(u'horizontalLayout')
-        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout.addItem(spacerItem)
-        self.deletePushButton = QtGui.QPushButton(formattingTagDialog)
-        self.deletePushButton.setObjectName(u'deletePushButton')
-        self.horizontalLayout.addWidget(self.deletePushButton)
-        self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
-        self.editGroupBox = QtGui.QGroupBox(formattingTagDialog)
-        self.editGroupBox.setObjectName(u'editGroupBox')
-        self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
-        self.dataGridLayout.setObjectName(u'dataGridLayout')
-        self.descriptionLabel = QtGui.QLabel(self.editGroupBox)
-        self.descriptionLabel.setAlignment(QtCore.Qt.AlignCenter)
-        self.descriptionLabel.setObjectName(u'descriptionLabel')
-        self.dataGridLayout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
-        self.descriptionLineEdit = QtGui.QLineEdit(self.editGroupBox)
-        self.descriptionLineEdit.setObjectName(u'descriptionLineEdit')
-        self.dataGridLayout.addWidget(self.descriptionLineEdit, 0, 1, 2, 1)
-        self.newPushButton = QtGui.QPushButton(self.editGroupBox)
-        self.newPushButton.setObjectName(u'newPushButton')
-        self.dataGridLayout.addWidget(self.newPushButton, 0, 2, 2, 1)
-        self.tagLabel = QtGui.QLabel(self.editGroupBox)
-        self.tagLabel.setAlignment(QtCore.Qt.AlignCenter)
-        self.tagLabel.setObjectName(u'tagLabel')
-        self.dataGridLayout.addWidget(self.tagLabel, 2, 0, 1, 1)
-        self.tagLineEdit = QtGui.QLineEdit(self.editGroupBox)
-        self.tagLineEdit.setMaximumSize(QtCore.QSize(50, 16777215))
-        self.tagLineEdit.setMaxLength(5)
-        self.tagLineEdit.setObjectName(u'tagLineEdit')
-        self.dataGridLayout.addWidget(self.tagLineEdit, 2, 1, 1, 1)
-        self.startTagLabel = QtGui.QLabel(self.editGroupBox)
-        self.startTagLabel.setAlignment(QtCore.Qt.AlignCenter)
-        self.startTagLabel.setObjectName(u'startTagLabel')
-        self.dataGridLayout.addWidget(self.startTagLabel, 3, 0, 1, 1)
-        self.startTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
-        self.startTagLineEdit.setObjectName(u'startTagLineEdit')
-        self.dataGridLayout.addWidget(self.startTagLineEdit, 3, 1, 1, 1)
-        self.endTagLabel = QtGui.QLabel(self.editGroupBox)
-        self.endTagLabel.setAlignment(QtCore.Qt.AlignCenter)
-        self.endTagLabel.setObjectName(u'endTagLabel')
-        self.dataGridLayout.addWidget(self.endTagLabel, 4, 0, 1, 1)
-        self.endTagLineEdit = QtGui.QLineEdit(self.editGroupBox)
-        self.endTagLineEdit.setObjectName(u'endTagLineEdit')
-        self.dataGridLayout.addWidget(self.endTagLineEdit, 4, 1, 1, 1)
-        self.savePushButton = QtGui.QPushButton(self.editGroupBox)
-        self.savePushButton.setObjectName(u'savePushButton')
-        self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
-        self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
-        self.button_box = create_button_box(formattingTagDialog, u'button_box', [u'close'])
-        self.listdataGridLayout.addWidget(self.button_box, 3, 0, 1, 1)
-
-        self.retranslateUi(formattingTagDialog)
-
-    def retranslateUi(self, formattingTagDialog):
+        formatting_tag_dialog.setObjectName(u'formatting_tag_dialog')
+        formatting_tag_dialog.resize(725, 548)
+        self.list_data_grid_layout = QtGui.QGridLayout(formatting_tag_dialog)
+        self.list_data_grid_layout.setMargin(8)
+        self.list_data_grid_layout.setObjectName(u'list_data_grid_layout')
+        self.tag_table_widget = QtGui.QTableWidget(formatting_tag_dialog)
+        self.tag_table_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+        self.tag_table_widget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
+        self.tag_table_widget.setAlternatingRowColors(True)
+        self.tag_table_widget.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
+        self.tag_table_widget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+        self.tag_table_widget.setCornerButtonEnabled(False)
+        self.tag_table_widget.setObjectName(u'tag_table_widget')
+        self.tag_table_widget.setColumnCount(4)
+        self.tag_table_widget.setRowCount(0)
+        self.tag_table_widget.horizontalHeader().setStretchLastSection(True)
+        item = QtGui.QTableWidgetItem()
+        self.tag_table_widget.setHorizontalHeaderItem(0, item)
+        item = QtGui.QTableWidgetItem()
+        self.tag_table_widget.setHorizontalHeaderItem(1, item)
+        item = QtGui.QTableWidgetItem()
+        self.tag_table_widget.setHorizontalHeaderItem(2, item)
+        item = QtGui.QTableWidgetItem()
+        self.tag_table_widget.setHorizontalHeaderItem(3, item)
+        self.list_data_grid_layout.addWidget(self.tag_table_widget, 0, 0, 1, 1)
+        self.horizontal_layout = QtGui.QHBoxLayout()
+        self.horizontal_layout.setObjectName(u'horizontal_layout')
+        spacer_item = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.horizontal_layout.addItem(spacer_item)
+        self.delete_push_button = QtGui.QPushButton(formatting_tag_dialog)
+        self.delete_push_button.setObjectName(u'delete_push_button')
+        self.horizontal_layout.addWidget(self.delete_push_button)
+        self.list_data_grid_layout.addLayout(self.horizontal_layout, 1, 0, 1, 1)
+        self.edit_group_box = QtGui.QGroupBox(formatting_tag_dialog)
+        self.edit_group_box.setObjectName(u'edit_group_box')
+        self.data_grid_layout = QtGui.QGridLayout(self.edit_group_box)
+        self.data_grid_layout.setObjectName(u'data_grid_layout')
+        self.description_label = QtGui.QLabel(self.edit_group_box)
+        self.description_label.setAlignment(QtCore.Qt.AlignCenter)
+        self.description_label.setObjectName(u'description_label')
+        self.data_grid_layout.addWidget(self.description_label, 0, 0, 1, 1)
+        self.description_line_edit = QtGui.QLineEdit(self.edit_group_box)
+        self.description_line_edit.setObjectName(u'description_line_edit')
+        self.data_grid_layout.addWidget(self.description_line_edit, 0, 1, 2, 1)
+        self.new_push_button = QtGui.QPushButton(self.edit_group_box)
+        self.new_push_button.setObjectName(u'new_push_button')
+        self.data_grid_layout.addWidget(self.new_push_button, 0, 2, 2, 1)
+        self.tag_label = QtGui.QLabel(self.edit_group_box)
+        self.tag_label.setAlignment(QtCore.Qt.AlignCenter)
+        self.tag_label.setObjectName(u'tag_label')
+        self.data_grid_layout.addWidget(self.tag_label, 2, 0, 1, 1)
+        self.tag_line_edit = QtGui.QLineEdit(self.edit_group_box)
+        self.tag_line_edit.setMaximumSize(QtCore.QSize(50, 16777215))
+        self.tag_line_edit.setMaxLength(5)
+        self.tag_line_edit.setObjectName(u'tag_line_edit')
+        self.data_grid_layout.addWidget(self.tag_line_edit, 2, 1, 1, 1)
+        self.start_tag_label = QtGui.QLabel(self.edit_group_box)
+        self.start_tag_label.setAlignment(QtCore.Qt.AlignCenter)
+        self.start_tag_label.setObjectName(u'start_tag_label')
+        self.data_grid_layout.addWidget(self.start_tag_label, 3, 0, 1, 1)
+        self.start_tag_line_edit = QtGui.QLineEdit(self.edit_group_box)
+        self.start_tag_line_edit.setObjectName(u'start_tag_line_edit')
+        self.data_grid_layout.addWidget(self.start_tag_line_edit, 3, 1, 1, 1)
+        self.end_tag_label = QtGui.QLabel(self.edit_group_box)
+        self.end_tag_label.setAlignment(QtCore.Qt.AlignCenter)
+        self.end_tag_label.setObjectName(u'end_tag_label')
+        self.data_grid_layout.addWidget(self.end_tag_label, 4, 0, 1, 1)
+        self.end_tag_line_edit = QtGui.QLineEdit(self.edit_group_box)
+        self.end_tag_line_edit.setObjectName(u'end_tag_line_edit')
+        self.data_grid_layout.addWidget(self.end_tag_line_edit, 4, 1, 1, 1)
+        self.save_push_button = QtGui.QPushButton(self.edit_group_box)
+        self.save_push_button.setObjectName(u'save_push_button')
+        self.data_grid_layout.addWidget(self.save_push_button, 4, 2, 1, 1)
+        self.list_data_grid_layout.addWidget(self.edit_group_box, 2, 0, 1, 1)
+        self.button_box = create_button_box(formatting_tag_dialog, u'button_box', [u'close'])
+        self.list_data_grid_layout.addWidget(self.button_box, 3, 0, 1, 1)
+
+        self.retranslateUi(formatting_tag_dialog)
+
+    def retranslateUi(self, formatting_tag_dialog):
         """
         Translate the UI on the fly
         """
-        formattingTagDialog.setWindowTitle(translate('OpenLP.FormattingTagDialog', 'Configure Formatting Tags'))
-        self.editGroupBox.setTitle(translate('OpenLP.FormattingTagDialog', 'Edit Selection'))
-        self.savePushButton.setText(translate('OpenLP.FormattingTagDialog', 'Save'))
-        self.descriptionLabel.setText(translate('OpenLP.FormattingTagDialog', 'Description'))
-        self.tagLabel.setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
-        self.startTagLabel.setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
-        self.endTagLabel.setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
-        self.deletePushButton.setText(UiStrings().Delete)
-        self.newPushButton.setText(UiStrings().New)
-        self.tagTableWidget.horizontalHeaderItem(0).setText(translate('OpenLP.FormattingTagDialog', 'Description'))
-        self.tagTableWidget.horizontalHeaderItem(1).setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
-        self.tagTableWidget.horizontalHeaderItem(2).setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
-        self.tagTableWidget.horizontalHeaderItem(3).setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
-        self.tagTableWidget.setColumnWidth(0, 120)
-        self.tagTableWidget.setColumnWidth(1, 80)
-        self.tagTableWidget.setColumnWidth(2, 330)
+        formatting_tag_dialog.setWindowTitle(translate('OpenLP.FormattingTagDialog', 'Configure Formatting Tags'))
+        self.edit_group_box.setTitle(translate('OpenLP.FormattingTagDialog', 'Edit Selection'))
+        self.save_push_button.setText(translate('OpenLP.FormattingTagDialog', 'Save'))
+        self.description_label.setText(translate('OpenLP.FormattingTagDialog', 'Description'))
+        self.tag_label.setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
+        self.start_tag_label.setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
+        self.end_tag_label.setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
+        self.delete_push_button.setText(UiStrings().Delete)
+        self.new_push_button.setText(UiStrings().New)
+        self.tag_table_widget.horizontalHeaderItem(0).setText(translate('OpenLP.FormattingTagDialog', 'Description'))
+        self.tag_table_widget.horizontalHeaderItem(1).setText(translate('OpenLP.FormattingTagDialog', 'Tag'))
+        self.tag_table_widget.horizontalHeaderItem(2).setText(translate('OpenLP.FormattingTagDialog', 'Start HTML'))
+        self.tag_table_widget.horizontalHeaderItem(3).setText(translate('OpenLP.FormattingTagDialog', 'End HTML'))
+        self.tag_table_widget.setColumnWidth(0, 120)
+        self.tag_table_widget.setColumnWidth(1, 80)
+        self.tag_table_widget.setColumnWidth(2, 330)

=== modified file 'openlp/core/ui/formattingtagform.py'
--- openlp/core/ui/formattingtagform.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/formattingtagform.py	2013-03-06 23:02:23 +0000
@@ -48,15 +48,15 @@
         """
         QtGui.QDialog.__init__(self, parent)
         self.setupUi(self)
-        QtCore.QObject.connect(self.tagTableWidget, QtCore.SIGNAL(u'itemSelectionChanged()'), self.onRowSelected)
-        QtCore.QObject.connect(self.newPushButton, QtCore.SIGNAL(u'clicked()'), self.onNewClicked)
-        QtCore.QObject.connect(self.savePushButton, QtCore.SIGNAL(u'clicked()'), self.onSavedClicked)
-        QtCore.QObject.connect(self.deletePushButton, QtCore.SIGNAL(u'clicked()'), self.onDeleteClicked)
-        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL(u'rejected()'), self.close)
-        QtCore.QObject.connect(self.descriptionLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
-        QtCore.QObject.connect(self.tagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
-        QtCore.QObject.connect(self.startTagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
-        QtCore.QObject.connect(self.endTagLineEdit, QtCore.SIGNAL(u'textEdited(QString)'), self.onTextEdited)
+        self.tag_table_widget.itemSelectionChanged.connect(self.on_row_selected)
+        self.new_push_button.clicked.connect(self.on_new_clicked)
+        self.save_push_button.clicked.connect(self.on_saved_clicked)
+        self.delete_push_button.clicked.connect(self.on_delete_clicked)
+        self.button_box.rejected.connect(self.close)
+        self.description_line_edit.textEdited.connect(self.on_text_edited)
+        self.tag_line_edit.textEdited.connect(self.on_text_edited)
+        self.start_tag_line_edit.textEdited.connect(self.on_text_edited)
+        self.end_tag_line_edit.textEdited.connect(self.on_text_edited)
         # Forces reloading of tags from openlp configuration.
         FormattingTags.load_tags()
 
@@ -69,38 +69,38 @@
         self.selected = -1
         return QtGui.QDialog.exec_(self)
 
-    def onRowSelected(self):
+    def on_row_selected(self):
         """
         Table Row selected so display items and set field state.
         """
-        self.savePushButton.setEnabled(False)
-        self.selected = self.tagTableWidget.currentRow()
+        self.save_push_button.setEnabled(False)
+        self.selected = self.tag_table_widget.currentRow()
         html = FormattingTags.get_html_tags()[self.selected]
-        self.descriptionLineEdit.setText(html[u'desc'])
-        self.tagLineEdit.setText(self._strip(html[u'start tag']))
-        self.startTagLineEdit.setText(html[u'start html'])
-        self.endTagLineEdit.setText(html[u'end html'])
+        self.description_line_edit.setText(html[u'desc'])
+        self.tag_line_edit.setText(self._strip(html[u'start tag']))
+        self.start_tag_line_edit.setText(html[u'start html'])
+        self.end_tag_line_edit.setText(html[u'end html'])
         if html[u'protected']:
-            self.descriptionLineEdit.setEnabled(False)
-            self.tagLineEdit.setEnabled(False)
-            self.startTagLineEdit.setEnabled(False)
-            self.endTagLineEdit.setEnabled(False)
-            self.deletePushButton.setEnabled(False)
+            self.description_line_edit.setEnabled(False)
+            self.tag_line_edit.setEnabled(False)
+            self.start_tag_line_edit.setEnabled(False)
+            self.end_tag_line_edit.setEnabled(False)
+            self.delete_push_button.setEnabled(False)
         else:
-            self.descriptionLineEdit.setEnabled(True)
-            self.tagLineEdit.setEnabled(True)
-            self.startTagLineEdit.setEnabled(True)
-            self.endTagLineEdit.setEnabled(True)
-            self.deletePushButton.setEnabled(True)
+            self.description_line_edit.setEnabled(True)
+            self.tag_line_edit.setEnabled(True)
+            self.start_tag_line_edit.setEnabled(True)
+            self.end_tag_line_edit.setEnabled(True)
+            self.delete_push_button.setEnabled(True)
 
-    def onTextEdited(self, text):
+    def on_text_edited(self, text):
         """
-        Enable the ``savePushButton`` when any of the selected tag's properties
+        Enable the ``save_push_button`` when any of the selected tag's properties
         has been changed.
         """
-        self.savePushButton.setEnabled(True)
+        self.save_push_button.setEnabled(True)
 
-    def onNewClicked(self):
+    def on_new_clicked(self):
         """
         Add a new tag to list only if it is not a duplicate.
         """
@@ -124,12 +124,11 @@
         FormattingTags.save_html_tags()
         self._reloadTable()
         # Highlight new row
-        self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
-        self.onRowSelected()
-        self.tagTableWidget.scrollToBottom()
-        #self.savePushButton.setEnabled(False)
+        self.tag_table_widget.selectRow(self.tag_table_widget.rowCount() - 1)
+        self.on_row_selected()
+        self.tag_table_widget.scrollToBottom()
 
-    def onDeleteClicked(self):
+    def on_delete_clicked(self):
         """
         Delete selected custom tag.
         """
@@ -137,28 +136,28 @@
             FormattingTags.remove_html_tag(self.selected)
             # As the first items are protected we should not have to take care
             # of negative indexes causing tracebacks.
-            self.tagTableWidget.selectRow(self.selected - 1)
+            self.tag_table_widget.selectRow(self.selected - 1)
             self.selected = -1
             FormattingTags.save_html_tags()
             self._reloadTable()
 
-    def onSavedClicked(self):
+    def on_saved_clicked(self):
         """
         Update Custom Tag details if not duplicate and save the data.
         """
         html_expands = FormattingTags.get_html_tags()
         if self.selected != -1:
             html = html_expands[self.selected]
-            tag = self.tagLineEdit.text()
+            tag = self.tag_line_edit.text()
             for linenumber, html1 in enumerate(html_expands):
                 if self._strip(html1[u'start tag']) == tag and linenumber != self.selected:
                     critical_error_message_box(
                         translate('OpenLP.FormattingTagForm', 'Update Error'),
                         translate('OpenLP.FormattingTagForm', 'Tag %s already defined.') % tag)
                     return
-            html[u'desc'] = self.descriptionLineEdit.text()
-            html[u'start html'] = self.startTagLineEdit.text()
-            html[u'end html'] = self.endTagLineEdit.text()
+            html[u'desc'] = self.description_line_edit.text()
+            html[u'start html'] = self.start_tag_line_edit.text()
+            html[u'end html'] = self.end_tag_line_edit.text()
             html[u'start tag'] = u'{%s}' % tag
             html[u'end tag'] = u'{/%s}' % tag
             # Keep temporary tags when the user changes one.
@@ -171,29 +170,29 @@
         """
         Reset List for loading.
         """
-        self.tagTableWidget.clearContents()
-        self.tagTableWidget.setRowCount(0)
-        self.newPushButton.setEnabled(True)
-        self.savePushButton.setEnabled(False)
-        self.deletePushButton.setEnabled(False)
+        self.tag_table_widget.clearContents()
+        self.tag_table_widget.setRowCount(0)
+        self.new_push_button.setEnabled(True)
+        self.save_push_button.setEnabled(False)
+        self.delete_push_button.setEnabled(False)
         for linenumber, html in enumerate(FormattingTags.get_html_tags()):
-            self.tagTableWidget.setRowCount(self.tagTableWidget.rowCount() + 1)
-            self.tagTableWidget.setItem(linenumber, 0, QtGui.QTableWidgetItem(html[u'desc']))
-            self.tagTableWidget.setItem(linenumber, 1, QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
-            self.tagTableWidget.setItem(linenumber, 2, QtGui.QTableWidgetItem(html[u'start html']))
-            self.tagTableWidget.setItem(linenumber, 3, QtGui.QTableWidgetItem(html[u'end html']))
+            self.tag_table_widget.setRowCount(self.tag_table_widget.rowCount() + 1)
+            self.tag_table_widget.setItem(linenumber, 0, QtGui.QTableWidgetItem(html[u'desc']))
+            self.tag_table_widget.setItem(linenumber, 1, QtGui.QTableWidgetItem(self._strip(html[u'start tag'])))
+            self.tag_table_widget.setItem(linenumber, 2, QtGui.QTableWidgetItem(html[u'start html']))
+            self.tag_table_widget.setItem(linenumber, 3, QtGui.QTableWidgetItem(html[u'end html']))
             # Permanent (persistent) tags do not have this key.
             if u'temporary' not in html:
                 html[u'temporary'] = False
-            self.tagTableWidget.resizeRowsToContents()
-        self.descriptionLineEdit.setText(u'')
-        self.tagLineEdit.setText(u'')
-        self.startTagLineEdit.setText(u'')
-        self.endTagLineEdit.setText(u'')
-        self.descriptionLineEdit.setEnabled(False)
-        self.tagLineEdit.setEnabled(False)
-        self.startTagLineEdit.setEnabled(False)
-        self.endTagLineEdit.setEnabled(False)
+            self.tag_table_widget.resizeRowsToContents()
+        self.description_line_edit.setText(u'')
+        self.tag_line_edit.setText(u'')
+        self.start_tag_line_edit.setText(u'')
+        self.end_tag_line_edit.setText(u'')
+        self.description_line_edit.setEnabled(False)
+        self.tag_line_edit.setEnabled(False)
+        self.start_tag_line_edit.setEnabled(False)
+        self.end_tag_line_edit.setEnabled(False)
 
     def _strip(self, tag):
         """

=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py	2013-02-19 19:50:14 +0000
+++ openlp/core/ui/generaltab.py	2013-03-06 23:02:23 +0000
@@ -231,8 +231,7 @@
         self.usernameLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect username:'))
         self.passwordLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect password:'))
         # Moved from display tab
-        self.overrideRadioButton.setText(translate('OpenLP.GeneralTab',
-            'Override display position:'))
+        self.overrideRadioButton.setText(translate('OpenLP.GeneralTab', 'Override display position:'))
         self.customXLabel.setText(translate('OpenLP.GeneralTab', 'X'))
         self.customYLabel.setText(translate('OpenLP.GeneralTab', 'Y'))
         self.customHeightLabel.setText(translate('OpenLP.GeneralTab', 'Height'))

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2013-03-06 21:49:46 +0000
+++ openlp/core/ui/maindisplay.py	2013-03-06 23:02:23 +0000
@@ -132,26 +132,26 @@
         self.retranslateUi()
         self.media_object = None
         if live:
-            self.audioPlayer = AudioPlayer(self)
+            self.audio_player = AudioPlayer(self)
         else:
-            self.audioPlayer = None
-        self.firstTime = True
-        self.webLoaded = True
+            self.audio_player = None
+        self.first_time = True
+        self.web_loaded = True
         self.setStyleSheet(u'border: 0px; margin: 0px; padding: 0px;')
-        windowFlags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | QtCore.Qt.WindowStaysOnTopHint
+        window_flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | QtCore.Qt.WindowStaysOnTopHint
         if Settings().value(u'advanced/x11 bypass wm'):
-            windowFlags |= QtCore.Qt.X11BypassWindowManagerHint
-        # TODO: The following combination of windowFlags works correctly
+            window_flags |= QtCore.Qt.X11BypassWindowManagerHint
+        # TODO: The following combination of window_flags works correctly
         # on Mac OS X. For next OpenLP version we should test it on other
         # platforms. For OpenLP 2.0 keep it only for OS X to not cause any
         # regressions on other platforms.
         if sys.platform == 'darwin':
-            windowFlags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Window
+            window_flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Window
             # For primary screen ensure it stays above the OS X dock
             # and menu bar
             if self.screens.current[u'primary']:
                 self.setWindowState(QtCore.Qt.WindowFullScreen)
-        self.setWindowFlags(windowFlags)
+        self.setWindowFlags(window_flags)
         self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
         self.set_transparency(False)
         if self.is_live:
@@ -209,20 +209,20 @@
                 background_color = QtCore.Qt.white
             image_file = Settings().value(u'advanced/default image')
             splash_image = QtGui.QImage(image_file)
-            self.initialFrame = QtGui.QImage(
+            self.initial_fame = QtGui.QImage(
                 self.screen[u'size'].width(),
                 self.screen[u'size'].height(),
                 QtGui.QImage.Format_ARGB32_Premultiplied)
             painter_image = QtGui.QPainter()
-            painter_image.begin(self.initialFrame)
-            painter_image.fillRect(self.initialFrame.rect(), background_color)
+            painter_image.begin(self.initial_fame)
+            painter_image.fillRect(self.initial_fame.rect(), background_color)
             painter_image.drawImage(
                 (self.screen[u'size'].width() - splash_image.width()) / 2,
                 (self.screen[u'size'].height() - splash_image.height()) / 2,
                 splash_image)
-            serviceItem = ServiceItem()
-            serviceItem.bg_image_bytes = image_to_byte(self.initialFrame)
-            self.web_view.setHtml(build_html(serviceItem, self.screen, self.is_live, None,
+            service_item = ServiceItem()
+            service_item.bg_image_bytes = image_to_byte(self.initial_fame)
+            self.web_view.setHtml(build_html(service_item, self.screen, self.is_live, None,
                 plugins=self.plugin_manager.plugins))
             self.__hideMouse()
         log.debug(u'Finished MainDisplay setup')
@@ -239,7 +239,7 @@
         """
         log.debug(u'text to display')
         # Wait for the webview to update before displaying text.
-        while not self.webLoaded:
+        while not self.web_loaded:
             self.application.process_events()
         self.setGeometry(self.screen[u'size'])
         if animate:
@@ -290,10 +290,10 @@
         API for replacement backgrounds so Images are added directly to cache.
         """
         self.image_manager.add_image(path, ImageSource.ImagePlugin, background)
-        if not hasattr(self, u'serviceItem'):
+        if not hasattr(self, u'service_item'):
             return False
         self.override[u'image'] = path
-        self.override[u'theme'] = self.serviceItem.themedata.background_filename
+        self.override[u'theme'] = self.service_item.themedata.background_filename
         self.image(path)
         # Update the preview frame.
         if self.is_live:
@@ -332,8 +332,8 @@
         image plugin has changed the background.
         """
         log.debug(u'reset_image')
-        if hasattr(self, u'serviceItem'):
-            self.display_image(self.serviceItem.bg_image_bytes)
+        if hasattr(self, u'service_item'):
+            self.display_image(self.service_item.bg_image_bytes)
         else:
             self.display_image(None)
         # clear the cache
@@ -347,15 +347,15 @@
         was_visible = self.isVisible()
         self.application.process_events()
         # We must have a service item to preview.
-        if self.is_live and hasattr(self, u'serviceItem'):
+        if self.is_live and hasattr(self, u'service_item'):
             # Wait for the fade to finish before geting the preview.
             # Important otherwise preview will have incorrect text if at all!
-            if self.serviceItem.themedata and self.serviceItem.themedata.display_slide_transition:
+            if self.service_item.themedata and self.service_item.themedata.display_slide_transition:
                 while not self.frame.evaluateJavaScript(u'show_text_completed()'):
                     self.application.process_events()
         # Wait for the webview to update before getting the preview.
         # Important otherwise first preview will miss the background !
-        while not self.webLoaded:
+        while not self.web_loaded:
             self.application.process_events()
         # if was hidden keep it hidden
         if self.is_live:
@@ -373,15 +373,15 @@
                     self.setVisible(True)
         return QtGui.QPixmap.grabWidget(self)
 
-    def build_html(self, serviceItem, image_path=u''):
+    def build_html(self, service_item, image_path=u''):
         """
-        Store the serviceItem and build the new HTML from it. Add the
+        Store the service_item and build the new HTML from it. Add the
         HTML to the display
         """
         log.debug(u'build_html')
-        self.webLoaded = False
-        self.initialFrame = None
-        self.serviceItem = serviceItem
+        self.web_loaded = False
+        self.initial_fame = None
+        self.service_item = service_item
         background = None
         # We have an image override so keep the image till the theme changes.
         if self.override:
@@ -390,31 +390,31 @@
                 Registry().execute(u'video_background_replaced')
                 self.override = {}
             # We have a different theme.
-            elif self.override[u'theme'] != serviceItem.themedata.background_filename:
+            elif self.override[u'theme'] != service_item.themedata.background_filename:
                 Registry().execute(u'live_theme_changed')
                 self.override = {}
             else:
                 # replace the background
                 background = self.image_manager.get_image_bytes(self.override[u'image'], ImageSource.ImagePlugin)
-        self.set_transparency(self.serviceItem.themedata.background_type ==
+        self.set_transparency(self.service_item.themedata.background_type ==
             BackgroundType.to_string(BackgroundType.Transparent))
-        if self.serviceItem.themedata.background_filename:
-            self.serviceItem.bg_image_bytes = self.image_manager.get_image_bytes(
-                self.serviceItem.themedata.background_filename, ImageSource.Theme
+        if self.service_item.themedata.background_filename:
+            self.service_item.bg_image_bytes = self.image_manager.get_image_bytes(
+                self.service_item.themedata.background_filename, ImageSource.Theme
             )
         if image_path:
             image_bytes = self.image_manager.get_image_bytes(image_path, ImageSource.ImagePlugin)
         else:
             image_bytes = None
-        html = build_html(self.serviceItem, self.screen, self.is_live, background, image_bytes,
+        html = build_html(self.service_item, self.screen, self.is_live, background, image_bytes,
             plugins=self.plugin_manager.plugins)
         log.debug(u'buildHtml - pre setHtml')
         self.web_view.setHtml(html)
         log.debug(u'buildHtml - post setHtml')
-        if serviceItem.foot_text:
-            self.footer(serviceItem.foot_text)
+        if service_item.foot_text:
+            self.footer(service_item.foot_text)
         # if was hidden keep it hidden
-        if self.hide_mode and self.is_live and not serviceItem.is_media():
+        if self.hide_mode and self.is_live and not service_item.is_media():
             if Settings().value(u'general/auto unblank'):
                 Registry().execute(u'slidecontroller_live_unblank')
             else:
@@ -442,7 +442,7 @@
         if mode == HideMode.Screen:
             self.frame.evaluateJavaScript(u'show_blank("desktop");')
             self.setVisible(False)
-        elif mode == HideMode.Blank or self.initialFrame:
+        elif mode == HideMode.Blank or self.initial_fame:
             self.frame.evaluateJavaScript(u'show_blank("black");')
         else:
             self.frame.evaluateJavaScript(u'show_blank("theme");')

=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2013-03-06 21:49:46 +0000
+++ openlp/core/ui/media/mediacontroller.py	2013-03-06 23:02:23 +0000
@@ -84,7 +84,7 @@
     The implementation of the Media Controller. The Media Controller adds an own
     class for every Player. Currently these are QtWebkit, Phonon and Vlc.
 
-    displayControllers are an array of controllers keyed on the
+    display_controllers are an array of controllers keyed on the
     slidecontroller or plugin which built them.  ControllerType is the class
     containing the key values.
 
@@ -100,7 +100,7 @@
         Registry().register(u'media_controller', self)
         Registry().register_function(u'bootstrap_initialise', self.check_available_media_players)
         self.media_players = {}
-        self.displayControllers = {}
+        self.display_controllers = {}
         self.current_media_players = {}
         # Timer for video state
         self.timer = QtCore.QTimer()
@@ -125,9 +125,9 @@
         """
         Set the active players and available media files
         """
-        savedPlayers = get_media_players()[0]
+        saved_players = get_media_players()[0]
         for player in self.media_players.keys():
-            self.media_players[player].isActive = player in savedPlayers
+            self.media_players[player].isActive = player in saved_players
 
     def _generate_extensions_lists(self):
         """
@@ -203,7 +203,7 @@
         else:
             any_active = False
             for source in self.current_media_players.keys():
-                display = self._define_display(self.displayControllers[source])
+                display = self._define_display(self.display_controllers[source])
                 self.current_media_players[source].resize(display)
                 self.current_media_players[source].update_ui(display)
                 if self.current_media_players[source].state == MediaState.Playing:
@@ -214,7 +214,7 @@
         # no players are active anymore
         for source in self.current_media_players.keys():
             if self.current_media_players[source].state != MediaState.Paused:
-                display = self._define_display(self.displayControllers[source])
+                display = self._define_display(self.display_controllers[source])
                 display.controller.seekSlider.setSliderPosition(0)
         self.timer.stop()
 
@@ -255,7 +255,7 @@
         ``controller``
             The controller where a player will be placed
         """
-        self.displayControllers[controller.controller_type] = controller
+        self.display_controllers[controller.controller_type] = controller
         self.setup_generic_controls(controller)
 
     def setup_generic_controls(self, controller):
@@ -319,11 +319,11 @@
         self.finalise()
         # update player status
         self._set_active_players()
-        display.hasAudio = True
+        display.has_audio = True
         if display.is_live and preview:
             return
         if preview:
-            display.hasAudio = False
+            display.has_audio = False
         for player in self.media_players.values():
             if player.isActive:
                 player.setup(display)
@@ -359,34 +359,34 @@
         """
         player.resize(display)
 
-    def video(self, source, serviceItem, hidden=False, videoBehindText=False):
+    def video(self, source, service_item, hidden=False, video_behind_text=False):
         """
         Loads and starts a video to run with the option of sound
 
         ``source``
             Where the call originated form
 
-        ``serviceItem``
+        ``service_item``
             The player which is doing the playing
 
         ``hidden``
             The player which is doing the playing
 
-        ``videoBehindText``
+        ``video_behind_text``
             Is the video to be played behind text.
         """
         log.debug(u'video')
-        isValid = False
-        controller = self.displayControllers[source]
+        is_valid = False
+        controller = self.display_controllers[source]
         # stop running videos
         self.media_reset(controller)
         controller.media_info = MediaInfo()
         controller.media_info.volume = controller.volumeSlider.value()
-        controller.media_info.is_background = videoBehindText
-        controller.media_info.file_info = QtCore.QFileInfo(serviceItem.get_frame_path())
+        controller.media_info.is_background = video_behind_text
+        controller.media_info.file_info = QtCore.QFileInfo(service_item.get_frame_path())
         display = self._define_display(controller)
         if controller.is_live:
-            isValid = self._check_file_type(controller, display, serviceItem)
+            is_valid = self._check_file_type(controller, display, service_item)
             display.override[u'theme'] = u''
             display.override[u'video'] = True
             if controller.media_info.is_background:
@@ -394,11 +394,11 @@
                 controller.media_info.start_time = 0
                 controller.media_info.end_time = 0
             else:
-                controller.media_info.start_time = serviceItem.start_time
-                controller.media_info.end_time = serviceItem.end_time
+                controller.media_info.start_time = service_item.start_time
+                controller.media_info.end_time = service_item.end_time
         elif controller.preview_display:
-            isValid = self._check_file_type(controller, display, serviceItem)
-        if not isValid:
+            is_valid = self._check_file_type(controller, display, service_item)
+        if not is_valid:
             # Media could not be loaded correctly
             critical_error_message_box(translate('MediaPlugin.MediaItem', 'Unsupported File'),
                 translate('MediaPlugin.MediaItem', 'Unsupported File'))
@@ -412,7 +412,7 @@
         if not controller.is_live:
             autoplay = True
         # Visible or background requested or Service Item wants to autostart
-        elif not hidden or controller.media_info.is_background or serviceItem.will_auto_start:
+        elif not hidden or controller.media_info.is_background or service_item.will_auto_start:
             autoplay = True
         # Unblank on load set
         elif Settings().value(u'general/auto unblank'):
@@ -426,22 +426,22 @@
         log.debug(u'use %s controller' % self.current_media_players[controller.controller_type])
         return True
 
-    def media_length(self, serviceItem):
+    def media_length(self, service_item):
         """
         Loads and starts a media item to obtain the media length
 
-        ``serviceItem``
+        ``service_item``
             The ServiceItem containing the details to be played.
         """
-        controller = self.displayControllers[DisplayControllerType.Plugin]
+        controller = self.display_controllers[DisplayControllerType.Plugin]
         log.debug(u'media_length')
         # stop running videos
         self.media_reset(controller)
         controller.media_info = MediaInfo()
         controller.media_info.volume = 0
-        controller.media_info.file_info = QtCore.QFileInfo(serviceItem.get_frame_path())
+        controller.media_info.file_info = QtCore.QFileInfo(service_item.get_frame_path())
         display = controller._display
-        if not self._check_file_type(controller, display, serviceItem):
+        if not self._check_file_type(controller, display, service_item):
             # Media could not be loaded correctly
             critical_error_message_box(translate('MediaPlugin.MediaItem', 'Unsupported File'),
                 translate('MediaPlugin.MediaItem', 'Unsupported File'))
@@ -450,31 +450,31 @@
             critical_error_message_box(translate('MediaPlugin.MediaItem', 'Unsupported File'),
                 translate('MediaPlugin.MediaItem', 'Unsupported File'))
             return False
-        serviceItem.set_media_length(controller.media_info.length)
+        service_item.set_media_length(controller.media_info.length)
         self.media_stop(controller)
         log.debug(u'use %s controller' % self.current_media_players[controller.controller_type])
         return True
 
-    def _check_file_type(self, controller, display, serviceItem):
+    def _check_file_type(self, controller, display, service_item):
         """
         Select the correct media Player type from the prioritized Player list
 
         ``controller``
             First element is the controller which should be used
 
-        ``serviceItem``
+        ``service_item``
             The ServiceItem containing the details to be played.
         """
         usedPlayers = get_media_players()[0]
-        if serviceItem.title != UiStrings().Automatic:
-            usedPlayers = [serviceItem.title.lower()]
+        if service_item.title != UiStrings().Automatic:
+            usedPlayers = [service_item.title.lower()]
         if controller.media_info.file_info.isFile():
             suffix = u'*.%s' % controller.media_info.file_info.suffix().lower()
             for title in usedPlayers:
                 player = self.media_players[title]
                 if suffix in player.video_extensions_list:
                     if not controller.media_info.is_background or controller.media_info.is_background and \
-                            player.canBackground:
+                            player.can_background:
                         self.resize(display, player)
                         if player.load(display):
                             self.current_media_players[controller.controller_type] = player
@@ -721,8 +721,8 @@
         Reset all the media controllers when OpenLP shuts down
         """
         self.timer.stop()
-        for controller in self.displayControllers:
-            self.media_reset(self.displayControllers[controller])
+        for controller in self.display_controllers:
+            self.media_reset(self.display_controllers[controller])
 
     def _define_display(self, controller):
         """

=== modified file 'openlp/core/ui/media/mediaplayer.py'
--- openlp/core/ui/media/mediaplayer.py	2013-02-03 19:23:12 +0000
+++ openlp/core/ui/media/mediaplayer.py	2013-03-06 23:02:23 +0000
@@ -47,10 +47,10 @@
         self.name = name
         self.available = self.check_available()
         self.isActive = False
-        self.canBackground = False
+        self.can_background = False
         self.canFolder = False
         self.state = MediaState.Off
-        self.hasOwnWidget = False
+        self.has_own_widget = False
         self.audio_extensions_list = []
         self.video_extensions_list = []
 

=== modified file 'openlp/core/ui/media/phononplayer.py'
--- openlp/core/ui/media/phononplayer.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/media/phononplayer.py	2013-03-06 23:02:23 +0000
@@ -126,16 +126,16 @@
         """
         Set up the player widgets
         """
-        display.phononWidget = Phonon.VideoWidget(display)
-        display.phononWidget.resize(display.size())
-        display.mediaObject = Phonon.MediaObject(display)
-        Phonon.createPath(display.mediaObject, display.phononWidget)
-        if display.hasAudio:
-            display.audio = Phonon.AudioOutput(Phonon.VideoCategory, display.mediaObject)
-            Phonon.createPath(display.mediaObject, display.audio)
-        display.phononWidget.raise_()
-        display.phononWidget.hide()
-        self.hasOwnWidget = True
+        display.phonon_widget = Phonon.VideoWidget(display)
+        display.phonon_widget.resize(display.size())
+        display.media_object = Phonon.MediaObject(display)
+        Phonon.createPath(display.media_object, display.phonon_widget)
+        if display.has_audio:
+            display.audio = Phonon.AudioOutput(Phonon.VideoCategory, display.media_object)
+            Phonon.createPath(display.media_object, display.audio)
+        display.phonon_widget.raise_()
+        display.phonon_widget.hide()
+        self.has_own_widget = True
 
     def check_available(self):
         """
@@ -151,7 +151,7 @@
         controller = display.controller
         volume = controller.media_info.volume
         path = controller.media_info.file_info.absoluteFilePath()
-        display.mediaObject.setCurrentSource(Phonon.MediaSource(path))
+        display.media_object.setCurrentSource(Phonon.MediaSource(path))
         if not self.media_state_wait(display, Phonon.StoppedState):
             return False
         self.volume(display, volume)
@@ -163,9 +163,9 @@
         Wait no longer than 5 seconds.
         """
         start = datetime.now()
-        current_state = display.mediaObject.state()
+        current_state = display.media_object.state()
         while current_state != mediaState:
-            current_state = display.mediaObject.state()
+            current_state = display.media_object.state()
             if current_state == Phonon.ErrorState:
                 return False
             self.application.process_events()
@@ -177,7 +177,7 @@
         """
         Resize the display
         """
-        display.phononWidget.resize(display.size())
+        display.phonon_widget.resize(display.size())
 
     def play(self, display):
         """
@@ -185,26 +185,26 @@
         """
         controller = display.controller
         start_time = 0
-        if display.mediaObject.state() != Phonon.PausedState and \
+        if display.media_object.state() != Phonon.PausedState and \
             controller.media_info.start_time > 0:
             start_time = controller.media_info.start_time
-        display.mediaObject.play()
+        display.media_object.play()
         if not self.media_state_wait(display, Phonon.PlayingState):
             return False
         if start_time > 0:
             self.seek(display, controller.media_info.start_time * 1000)
         self.volume(display, controller.media_info.volume)
-        controller.media_info.length = int(display.mediaObject.totalTime() / 1000)
+        controller.media_info.length = int(display.media_object.totalTime() / 1000)
         controller.seekSlider.setMaximum(controller.media_info.length * 1000)
         self.state = MediaState.Playing
-        display.phononWidget.raise_()
+        display.phonon_widget.raise_()
         return True
 
     def pause(self, display):
         """
         Pause the current media item
         """
-        display.mediaObject.pause()
+        display.media_object.pause()
         if self.media_state_wait(display, Phonon.PausedState):
             self.state = MediaState.Paused
 
@@ -212,7 +212,7 @@
         """
         Stop the current media item
         """
-        display.mediaObject.stop()
+        display.media_object.stop()
         self.set_visible(display, False)
         self.state = MediaState.Stopped
 
@@ -221,7 +221,7 @@
         Set the volume
         """
         # 1.0 is the highest value
-        if display.hasAudio:
+        if display.has_audio:
             vol = float(vol) / float(100)
             display.audio.setVolume(vol)
 
@@ -229,39 +229,39 @@
         """
         Go to a particular point in the current media item
         """
-        display.mediaObject.seek(seekVal)
+        display.media_object.seek(seekVal)
 
     def reset(self, display):
         """
         Reset the media player
         """
-        display.mediaObject.stop()
-        display.mediaObject.clearQueue()
+        display.media_object.stop()
+        display.media_object.clearQueue()
         self.set_visible(display, False)
-        display.phononWidget.setVisible(False)
+        display.phonon_widget.setVisible(False)
         self.state = MediaState.Off
 
     def set_visible(self, display, status):
         """
         Set the visibility of the widget
         """
-        if self.hasOwnWidget:
-            display.phononWidget.setVisible(status)
+        if self.has_own_widget:
+            display.phonon_widget.setVisible(status)
 
     def update_ui(self, display):
         """
         Update the UI
         """
-        if display.mediaObject.state() == Phonon.PausedState and self.state != MediaState.Paused:
+        if display.media_object.state() == Phonon.PausedState and self.state != MediaState.Paused:
             self.stop(display)
         controller = display.controller
         if controller.media_info.end_time > 0:
-            if display.mediaObject.currentTime() > controller.media_info.end_time * 1000:
+            if display.media_object.currentTime() > controller.media_info.end_time * 1000:
                 self.stop(display)
                 self.set_visible(display, False)
         if not controller.seekSlider.isSliderDown():
             controller.seekSlider.blockSignals(True)
-            controller.seekSlider.setSliderPosition(display.mediaObject.currentTime())
+            controller.seekSlider.setSliderPosition(display.media_object.currentTime())
             controller.seekSlider.blockSignals(False)
 
     def get_media_display_css(self):

=== modified file 'openlp/core/ui/media/vlcplayer.py'
--- openlp/core/ui/media/vlcplayer.py	2013-03-01 17:36:43 +0000
+++ openlp/core/ui/media/vlcplayer.py	2013-03-06 23:02:23 +0000
@@ -120,7 +120,7 @@
         display.vlcWidget.setFrameStyle(QtGui.QFrame.NoFrame)
         # creating a basic vlc instance
         command_line_options = u'--no-video-title-show'
-        if not display.hasAudio:
+        if not display.has_audio:
             command_line_options += u' --no-audio --no-video-title-show'
         if Settings().value(u'advanced/hide mouse') and display.controller.is_live:
             command_line_options += u' --mouse-hide-timeout=0'
@@ -145,7 +145,7 @@
         else:
             # for Linux using the X Server
             display.vlcMediaPlayer.set_xwindow(win_id)
-        self.hasOwnWidget = True
+        self.has_own_widget = True
 
     def check_available(self):
         """
@@ -238,7 +238,7 @@
         """
         Set the volume
         """
-        if display.hasAudio:
+        if display.has_audio:
             display.vlcMediaPlayer.audio_set_volume(vol)
 
     def seek(self, display, seekVal):
@@ -260,7 +260,7 @@
         """
         Set the visibility
         """
-        if self.hasOwnWidget:
+        if self.has_own_widget:
             display.vlcWidget.setVisible(status)
 
     def update_ui(self, display):

=== modified file 'openlp/core/ui/media/webkitplayer.py'
--- openlp/core/ui/media/webkitplayer.py	2013-02-20 19:31:51 +0000
+++ openlp/core/ui/media/webkitplayer.py	2013-03-06 23:02:23 +0000
@@ -279,7 +279,7 @@
         self.original_name = u'WebKit'
         self.display_name = u'&WebKit'
         self.parent = parent
-        self.canBackground = True
+        self.can_background = True
         self.audio_extensions_list = AUDIO_EXT
         self.video_extensions_list = VIDEO_EXT
 
@@ -309,7 +309,7 @@
         """
         display.web_view.resize(display.size())
         display.web_view.raise_()
-        self.hasOwnWidget = False
+        self.has_own_widget = False
 
     def check_available(self):
         """
@@ -323,7 +323,7 @@
         """
         log.debug(u'load vid in Webkit Controller')
         controller = display.controller
-        if display.hasAudio and not controller.media_info.is_background:
+        if display.has_audio and not controller.media_info.is_background:
             volume = controller.media_info.volume
             vol = float(volume) / float(100)
         else:
@@ -399,7 +399,7 @@
         """
         controller = display.controller
         # 1.0 is the highest value
-        if display.hasAudio:
+        if display.has_audio:
             vol = float(vol) / float(100)
             if not controller.media_info.is_flash:
                 display.frame.evaluateJavaScript(u'show_video(null, null, %s);' % str(vol))

=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py	2013-03-01 08:38:25 +0000
+++ openlp/core/ui/printserviceform.py	2013-03-06 23:02:23 +0000
@@ -173,18 +173,16 @@
         custom_css = get_text_file_string(css_path)
         if not custom_css:
             custom_css = DEFAULT_CSS
-        self._addElement(u'style', custom_css, html_data.head,
-            attribute=(u'type', u'text/css'))
+        self._addElement(u'style', custom_css, html_data.head, attribute=(u'type', u'text/css'))
         self._addElement(u'body', parent=html_data)
-        self._addElement(u'h1', cgi.escape(self.titleLineEdit.text()),
-            html_data.body, classId=u'serviceTitle')
+        self._addElement(u'h1', cgi.escape(self.titleLineEdit.text()), html_data.body, classId=u'serviceTitle')
         for index, item in enumerate(self.service_manager.service_items):
             self._addPreviewItem(html_data.body, item[u'service_item'], index)
         # Add the custom service notes:
         if self.footerTextEdit.toPlainText():
             div = self._addElement(u'div', parent=html_data.body, classId=u'customNotes')
-            self._addElement(u'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div,
-                classId=u'customNotesTitle')
+            self._addElement(
+                u'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId=u'customNotesTitle')
             self._addElement(u'span', cgi.escape(self.footerTextEdit.toPlainText()), div, classId=u'customNotesText')
         self.document.setHtml(html.tostring(html_data))
         self.previewWidget.updatePreview()
@@ -227,8 +225,7 @@
         if self.notesCheckBox.isChecked():
             if item.notes:
                 p = self._addElement(u'div', classId=u'itemNotes', parent=div)
-                self._addElement(u'span', translate('OpenLP.ServiceManager', 'Notes: '), p,
-                    classId=u'itemNotesTitle')
+                self._addElement(u'span', translate('OpenLP.ServiceManager', 'Notes: '), p, classId=u'itemNotesTitle')
                 self._addElement(u'span', cgi.escape(item.notes).replace(u'\n', u'<br>'), p, classId=u'itemNotesText')
         # Add play length of media files.
         if item.is_media() and self.metaDataCheckBox.isChecked():
@@ -236,13 +233,11 @@
             if item.end_time > 0:
                 tme = item.end_time - item.start_time
             title = self._addElement(u'div', classId=u'media', parent=div)
-            self._addElement(u'span', translate('OpenLP.ServiceManager', 'Playing time: '), title,
-                classId=u'mediaTitle')
-            self._addElement(u'span', unicode(datetime.timedelta(seconds=tme)),
-                title, classId=u'mediaText')
+            self._addElement(
+                u'span', translate('OpenLP.ServiceManager', 'Playing time: '), title, classId=u'mediaTitle')
+            self._addElement(u'span', unicode(datetime.timedelta(seconds=tme)), title, classId=u'mediaText')
 
-    def _addElement(self, tag, text=None, parent=None, classId=None,
-        attribute=None):
+    def _addElement(self, tag, text=None, parent=None, classId=None, attribute=None):
         """
         Creates a html element. If ``text`` is given, the element's text will
         set and if a ``parent`` is given, the element is appended.

=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py	2013-02-01 21:34:23 +0000
+++ openlp/core/ui/serviceitemeditform.py	2013-03-06 23:02:23 +0000
@@ -46,8 +46,7 @@
         QtGui.QDialog.__init__(self, self.main_window)
         self.setupUi(self)
         self.item_list = []
-        QtCore.QObject.connect(self.list_widget, QtCore.SIGNAL(u'currentRowChanged(int)'),
-            self.on_current_row_changed)
+        self.list_widget.currentRowChanged.connect(self.on_current_row_changed)
 
     def set_service_item(self, item):
         """
@@ -57,8 +56,7 @@
         self.item_list = []
         if self.item.is_image():
             self.data = True
-            for frame in self.item._raw_frames:
-                self.item_list.append(frame)
+            self.item_list.extend(self.item._raw_frames)
         self.load_data()
         self.list_widget.setCurrentItem(self.list_widget.currentItem())
 
@@ -94,9 +92,8 @@
         self.item_list.pop(row)
         self.load_data()
         if row == self.list_widget.count():
-            self.list_widget.setCurrentRow(row - 1)
-        else:
-            self.list_widget.setCurrentRow(row)
+            row -= 1
+        self.list_widget.setCurrentRow(row)
 
     def on_up_button_clicked(self):
         """
@@ -163,4 +160,5 @@
             self._main_window = Registry().get(u'main_window')
         return self._main_window
 
-    main_window = property(_get_main_window)
\ No newline at end of file
+    main_window = property(_get_main_window)
+

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2013-03-01 17:36:43 +0000
+++ openlp/core/ui/servicemanager.py	2013-03-06 23:02:23 +0000
@@ -303,9 +303,9 @@
         self._modified = False
         self._file_name = u''
         self.service_has_all_original_files = True
-        self.serviceNoteForm = ServiceNoteForm()
-        self.serviceItemEditForm = ServiceItemEditForm()
-        self.startTimeForm = StartTimeForm()
+        self.service_note_form = ServiceNoteForm()
+        self.service_item_edit_form = ServiceItemEditForm()
+        self.start_time_form = StartTimeForm()
         # start with the layout
         self.layout = QtGui.QVBoxLayout(self)
         self.layout.setSpacing(0)
@@ -337,7 +337,7 @@
         self._file_name = unicode(file_name)
         self.main_window.setServiceModified(self.is_modified(), self.short_file_name())
         Settings().setValue(u'servicemanager/last file', file_name)
-        self._saveLite = self._file_name.endswith(u'.oszl')
+        self._save_lite = self._file_name.endswith(u'.oszl')
 
     def file_name(self):
         """
@@ -505,7 +505,7 @@
             if item[u'service_item'].missing_frames():
                 self.service_items.remove(item)
             else:
-                service_item = item[u'service_item'].get_service_repr(self._saveLite)
+                service_item = item[u'service_item'].get_service_repr(self._save_lite)
                 if service_item[u'header'][u'background_audio']:
                     for i, file_name in enumerate(service_item[u'header'][u'background_audio']):
                         new_file = os.path.join(u'audio', item[u'service_item'].unique_identifier, file_name)
@@ -591,7 +591,7 @@
         self.main_window.displayProgressBar(len(self.service_items) + 1)
         for item in self.service_items:
             self.main_window.incrementProgressBar()
-            service_item = item[u'service_item'].get_service_repr(self._saveLite)
+            service_item = item[u'service_item'].get_service_repr(self._save_lite)
             #@todo check for file item on save.
             service.append({u'serviceitem': service_item})
             self.main_window.incrementProgressBar()
@@ -675,7 +675,7 @@
         """
         if not self.file_name():
             return self.save_file_as()
-        if self._saveLite:
+        if self._save_lite:
             return self.save_local_file()
         else:
             return self.save_file()
@@ -721,7 +721,7 @@
                 for item in items:
                     self.main_window.incrementProgressBar()
                     service_item = ServiceItem()
-                    if self._saveLite:
+                    if self._save_lite:
                         service_item.set_from_service(item)
                     else:
                         service_item.set_from_service(item, self.servicePath)
@@ -848,9 +848,9 @@
         Allow the service note to be edited
         """
         item = self.find_service_item()[0]
-        self.serviceNoteForm.text_edit.setPlainText(self.service_items[item][u'service_item'].notes)
-        if self.serviceNoteForm.exec_():
-            self.service_items[item][u'service_item'].notes = self.serviceNoteForm.text_edit.toPlainText()
+        self.service_note_form.text_edit.setPlainText(self.service_items[item][u'service_item'].notes)
+        if self.service_note_form.exec_():
+            self.service_items[item][u'service_item'].notes = self.service_note_form.text_edit.toPlainText()
             self.repaint_service_list(item, -1)
             self.set_modified()
 
@@ -859,8 +859,8 @@
         Opens a dialog to type in service item notes.
         """
         item = self.find_service_item()[0]
-        self.startTimeForm.item = self.service_items[item]
-        if self.startTimeForm.exec_():
+        self.start_time_form.item = self.service_items[item]
+        if self.start_time_form.exec_():
             self.repaint_service_list(item, -1)
 
     def toggle_auto_play_slides_once(self):
@@ -931,9 +931,9 @@
         display if changes are saved.
         """
         item = self.find_service_item()[0]
-        self.serviceItemEditForm.set_service_item(self.service_items[item][u'service_item'])
-        if self.serviceItemEditForm.exec_():
-            self.add_service_item(self.serviceItemEditForm.get_service_item(),
+        self.service_item_edit_form.set_service_item(self.service_items[item][u'service_item'])
+        if self.service_item_edit_form.exec_():
+            self.add_service_item(self.service_item_edit_form.get_service_item(),
                 replace=True, expand=self.service_items[item][u'expanded'])
 
     def preview_live(self, unique_identifier, row):
@@ -1136,17 +1136,17 @@
             self.repaint_service_list(item - 1, -1)
             self.set_modified()
 
-    def repaint_service_list(self, serviceItem, serviceItemChild):
+    def repaint_service_list(self, service_item, service_item_child):
         """
         Clear the existing service list and prepaint all the items. This is
         used when moving items as the move takes place in a supporting list,
         and when regenerating all the items due to theme changes.
 
-        ``serviceItem``
+        ``service_item``
             The item which changed. (int)
 
-        ``serviceItemChild``
-            The child of the ``serviceItem``, which will be selected. (int)
+        ``service_item_child``
+            The child of the ``service_item``, which will be selected. (int)
         """
         # Correct order of items in array
         count = 1
@@ -1207,10 +1207,10 @@
                 text = frame[u'title'].replace(u'\n', u' ')
                 child.setText(0, text[:40])
                 child.setData(0, QtCore.Qt.UserRole, count)
-                if serviceItem == item_count:
-                    if item[u'expanded'] and serviceItemChild == count:
+                if service_item == item_count:
+                    if item[u'expanded'] and service_item_child == count:
                         self.service_manager_list.setCurrentItem(child)
-                    elif serviceItemChild == -1:
+                    elif service_item_child == -1:
                         self.service_manager_list.setCurrentItem(treewidgetitem)
             treewidgetitem.setExpanded(item[u'expanded'])
 
@@ -1443,20 +1443,20 @@
             (1, 2)
         """
         items = self.service_manager_list.selectedItems()
-        serviceItem = -1
-        serviceItemChild = -1
+        service_item = -1
+        service_item_child = -1
         for item in items:
             parent_item = item.parent()
             if parent_item is None:
-                serviceItem = item.data(0, QtCore.Qt.UserRole)
+                service_item = item.data(0, QtCore.Qt.UserRole)
             else:
-                serviceItem = parent_item.data(0, QtCore.Qt.UserRole)
-                serviceItemChild = item.data(0, QtCore.Qt.UserRole)
+                service_item = parent_item.data(0, QtCore.Qt.UserRole)
+                service_item_child = item.data(0, QtCore.Qt.UserRole)
             # Adjust for zero based arrays.
-            serviceItem -= 1
+            service_item -= 1
             # Only process the first item on the list for this method.
             break
-        return serviceItem, serviceItemChild
+        return service_item, service_item_child
 
     def drop_event(self, event):
         """

=== modified file 'openlp/core/ui/shortcutlistdialog.py'
--- openlp/core/ui/shortcutlistdialog.py	2013-02-01 21:34:23 +0000
+++ openlp/core/ui/shortcutlistdialog.py	2013-03-06 23:02:23 +0000
@@ -69,7 +69,7 @@
         self.shortcutListLayout = QtGui.QVBoxLayout(shortcutListDialog)
         self.shortcutListLayout.setObjectName(u'shortcutListLayout')
         self.descriptionLabel = QtGui.QLabel(shortcutListDialog)
-        self.descriptionLabel.setObjectName(u'descriptionLabel')
+        self.descriptionLabel.setObjectName(u'description_label')
         self.descriptionLabel.setWordWrap(True)
         self.shortcutListLayout.addWidget(self.descriptionLabel)
         self.treeWidget = QtGui.QTreeWidget(shortcutListDialog)

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2013-03-05 17:11:58 +0000
+++ openlp/core/ui/slidecontroller.py	2013-03-06 23:02:23 +0000
@@ -293,7 +293,7 @@
             self.audio_time_label.setObjectName(u'audio_time_label')
             self.toolbar.addToolbarWidget(self.audio_time_label)
             self.toolbar.setWidgetVisible(self.audio_list, False)
-            self.toolbar.setWidgetVisible([u'songMenu'], False)
+            self.toolbar.setWidgetVisible([u'song_menu'], False)
         # Screen preview area
         self.preview_frame = QtGui.QFrame(self.splitter)
         self.preview_frame.setGeometry(QtCore.QRect(0, 0, 300, 300 * self.ratio))
@@ -524,7 +524,7 @@
         self.display.setup()
         if self.is_live:
             self.__addActionsToWidget(self.display)
-            self.display.audioPlayer.connectSlot(QtCore.SIGNAL(u'tick(qint64)'), self.on_audio_time_remaining)
+            self.display.audio_player.connectSlot(QtCore.SIGNAL(u'tick(qint64)'), self.on_audio_time_remaining)
         # The SlidePreview's ratio.
         try:
             self.ratio = float(self.screens.current[u'size'].width()) / float(self.screens.current[u'size'].height())
@@ -639,7 +639,7 @@
         self.mediabar.hide()
         self.song_menu.hide()
         self.toolbar.setWidgetVisible(self.loop_list, False)
-        self.toolbar.setWidgetVisible([u'songMenu'], False)
+        self.toolbar.setWidgetVisible([u'song_menu'], False)
         # Reset the button
         self.play_slides_once.setChecked(False)
         self.play_slides_once.setIcon(build_icon(u':/media/media_time.png'))
@@ -647,7 +647,7 @@
         self.play_slides_loop.setIcon(build_icon(u':/media/media_time.png'))
         if item.is_text():
             if Settings().value(self.main_window.songsSettingsSection + u'/display songbar') and self.slideList:
-                self.toolbar.setWidgetVisible([u'songMenu'], True)
+                self.toolbar.setWidgetVisible([u'song_menu'], True)
         if item.is_capable(ItemCapabilities.CanLoop) and len(item.get_frames()) > 1:
             self.toolbar.setWidgetVisible(self.loop_list)
         if item.is_media():
@@ -754,25 +754,25 @@
         self.preview_list_widget.setColumnWidth(0, width)
         if self.is_live:
             self.song_menu.menu().clear()
-            self.display.audioPlayer.reset()
+            self.display.audio_player.reset()
             self.setAudioItemsVisibility(False)
             self.audio_pause_item.setChecked(False)
             # If the current item has background audio
             if self.service_item.is_capable(ItemCapabilities.HasBackgroundAudio):
                 log.debug(u'Starting to play...')
-                self.display.audioPlayer.add_to_playlist(self.service_item.background_audio)
+                self.display.audio_player.add_to_playlist(self.service_item.background_audio)
                 self.trackMenu.clear()
                 for counter in range(len(self.service_item.background_audio)):
                     action = self.trackMenu.addAction(os.path.basename(self.service_item.background_audio[counter]))
                     action.setData(counter)
                     QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), self.onTrackTriggered)
-                self.display.audioPlayer.repeat = Settings().value(
+                self.display.audio_player.repeat = Settings().value(
                     self.main_window.generalSettingsSection + u'/audio repeat list')
                 if Settings().value(self.main_window.generalSettingsSection + u'/audio start paused'):
                     self.audio_pause_item.setChecked(True)
-                    self.display.audioPlayer.pause()
+                    self.display.audio_player.pause()
                 else:
-                    self.display.audioPlayer.play()
+                    self.display.audio_player.play()
                 self.setAudioItemsVisibility(True)
         row = 0
         text = []
@@ -1212,9 +1212,9 @@
         if not self.audio_pause_item.isVisible():
             return
         if checked:
-            self.display.audioPlayer.pause()
+            self.display.audio_player.pause()
         else:
-            self.display.audioPlayer.play()
+            self.display.audio_player.play()
 
     def timerEvent(self, event):
         """
@@ -1316,13 +1316,13 @@
         """
         Go to the next track when next is clicked
         """
-        self.display.audioPlayer.next()
+        self.display.audio_player.next()
 
     def on_audio_time_remaining(self, time):
         """
         Update how much time is remaining
         """
-        seconds = self.display.audioPlayer.mediaObject.remainingTime() // 1000
+        seconds = self.display.audio_player.media_object.remainingTime() // 1000
         minutes = seconds // 60
         seconds %= 60
         self.audio_time_label.setText(u' %02d:%02d ' % (minutes, seconds))
@@ -1332,7 +1332,7 @@
         Start playing a track
         """
         action = self.sender()
-        self.display.audioPlayer.go_to(action.data())
+        self.display.audio_player.go_to(action.data())
 
     def _get_plugin_manager(self):
         """

=== modified file 'openlp/core/ui/starttimeform.py'
--- openlp/core/ui/starttimeform.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/starttimeform.py	2013-03-06 23:02:23 +0000
@@ -69,12 +69,9 @@
         """
         When the dialog succeeds, this is run
         """
-        start = self.hourSpinBox.value() * 3600 + \
-            self.minuteSpinBox.value() * 60 + \
-            self.secondSpinBox.value()
+        start = self.hourSpinBox.value() * 3600 + self.minuteSpinBox.value() * 60 + self.secondSpinBox.value()
         end = self.hourFinishSpinBox.value() * 3600 + \
-            self.minuteFinishSpinBox.value() * 60 + \
-            self.secondFinishSpinBox.value()
+            self.minuteFinishSpinBox.value() * 60 + self.secondFinishSpinBox.value()
         if end > self.item[u'service_item'].media_length:
             critical_error_message_box(title=translate('OpenLP.StartTimeForm', 'Time Validation Error'),
                 message=translate('OpenLP.StartTimeForm', 'Finish time is set after the end of the media item'))

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2013-03-05 17:11:58 +0000
+++ openlp/core/ui/thememanager.py	2013-03-06 23:02:23 +0000
@@ -243,9 +243,9 @@
                 translate('OpenLP.ThemeManager', 'Rename %s theme?'), False, False):
             item = self.theme_list_widget.currentItem()
             old_theme_name = item.data(QtCore.Qt.UserRole)
-            self.fileRenameForm.fileNameEdit.setText(old_theme_name)
+            self.fileRenameForm.file_name_edit.setText(old_theme_name)
             if self.fileRenameForm.exec_():
-                new_theme_name = self.fileRenameForm.fileNameEdit.text()
+                new_theme_name = self.fileRenameForm.file_name_edit.text()
                 if old_theme_name == new_theme_name:
                     return
                 if self.check_if_theme_exists(new_theme_name):
@@ -264,10 +264,10 @@
         """
         item = self.theme_list_widget.currentItem()
         old_theme_name = item.data(QtCore.Qt.UserRole)
-        self.fileRenameForm.fileNameEdit.setText(translate('OpenLP.ThemeManager',
+        self.fileRenameForm.file_name_edit.setText(translate('OpenLP.ThemeManager',
             'Copy of %s', 'Copy of <theme name>') % old_theme_name)
         if self.fileRenameForm.exec_(True):
-            new_theme_name = self.fileRenameForm.fileNameEdit.text()
+            new_theme_name = self.fileRenameForm.file_name_edit.text()
             if self.check_if_theme_exists(new_theme_name):
                 theme_data = self.get_theme_data(old_theme_name)
                 self.cloneThemeData(theme_data, new_theme_name)
@@ -361,8 +361,7 @@
                 for files in os.walk(source):
                     for name in files[2]:
                         theme_zip.write(
-                            os.path.join(source, name).encode(u'utf-8'),
-                            os.path.join(theme, name).encode(u'utf-8')
+                            os.path.join(source, name).encode(u'utf-8'), os.path.join(theme, name).encode(u'utf-8')
                         )
                 QtGui.QMessageBox.information(self,
                     translate('OpenLP.ThemeManager', 'Theme Exported'),
@@ -768,20 +767,20 @@
         theme = Theme(xml_data)
         new_theme = ThemeXML()
         new_theme.theme_name = self.badV1NameChars.sub(u'', theme.Name)
-        if theme.BackgroundType == 0:
+        if theme.BackgroundType == BackgroundType.Solid:
             new_theme.background_type = BackgroundType.to_string(BackgroundType.Solid)
             new_theme.background_color = unicode(theme.BackgroundParameter1.name())
-        elif theme.BackgroundType == 1:
+        elif theme.BackgroundType == BackgroundType.Horizontal:
             new_theme.background_type = BackgroundType.to_string(BackgroundType.Gradient)
             new_theme.background_direction = BackgroundGradientType.to_string(BackgroundGradientType.Horizontal)
             if theme.BackgroundParameter3.name() == 1:
                 new_theme.background_direction = BackgroundGradientType.to_string(BackgroundGradientType.Horizontal)
             new_theme.background_start_color = unicode(theme.BackgroundParameter1.name())
             new_theme.background_end_color = unicode(theme.BackgroundParameter2.name())
-        elif theme.BackgroundType == 2:
+        elif theme.BackgroundType == BackgroundType.Image:
             new_theme.background_type = BackgroundType.to_string(BackgroundType.Image)
             new_theme.background_filename = unicode(theme.BackgroundParameter1)
-        elif theme.BackgroundType == 3:
+        elif theme.BackgroundType == BackgroundType.Transparent:
             new_theme.background_type = BackgroundType.to_string(BackgroundType.Transparent)
         new_theme.font_main_name = theme.FontName
         new_theme.font_main_color = unicode(theme.FontColor.name())

=== modified file 'openlp/core/ui/themewizard.py'
--- openlp/core/ui/themewizard.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/themewizard.py	2013-03-06 23:02:23 +0000
@@ -48,8 +48,7 @@
         themeWizard.setModal(True)
         themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
         themeWizard.setOptions(QtGui.QWizard.IndependentPages |
-            QtGui.QWizard.NoBackButtonOnStartPage |
-            QtGui.QWizard.HaveCustomButton1)
+            QtGui.QWizard.NoBackButtonOnStartPage | QtGui.QWizard.HaveCustomButton1)
         self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
         # Welcome Page
         add_welcome_page(themeWizard, u':/wizards/wizard_createtheme.bmp')
@@ -398,9 +397,8 @@
         self.titleLabel.setText(u'<span style="font-size:14pt; font-weight:600;">%s</span>' %
             translate('OpenLP.ThemeWizard', 'Welcome to the Theme Wizard'))
         self.informationLabel.setText(
-            translate('OpenLP.ThemeWizard', 'This wizard will help you to '
-                'create and edit your themes. Click the next button below to '
-                'start the process by setting up your background.'))
+            translate('OpenLP.ThemeWizard', 'This wizard will help you to create and edit your themes. Click the next '
+                'button below to start the process by setting up your background.'))
         self.backgroundPage.setTitle(translate('OpenLP.ThemeWizard', 'Set Up Background'))
         self.backgroundPage.setSubTitle(translate('OpenLP.ThemeWizard', 'Set up your theme\'s background '
                 'according to the parameters below.'))
@@ -417,10 +415,8 @@
         self.gradientTypeLabel.setText(translate('OpenLP.ThemeWizard', 'Gradient:'))
         self.gradientComboBox.setItemText(BackgroundGradientType.Horizontal,
             translate('OpenLP.ThemeWizard', 'Horizontal'))
-        self.gradientComboBox.setItemText(BackgroundGradientType.Vertical,
-            translate('OpenLP.ThemeWizard', 'Vertical'))
-        self.gradientComboBox.setItemText(BackgroundGradientType.Circular,
-            translate('OpenLP.ThemeWizard', 'Circular'))
+        self.gradientComboBox.setItemText(BackgroundGradientType.Vertical, translate('OpenLP.ThemeWizard', 'Vertical'))
+        self.gradientComboBox.setItemText(BackgroundGradientType.Circular, translate('OpenLP.ThemeWizard', 'Circular'))
         self.gradientComboBox.setItemText(BackgroundGradientType.LeftTop,
             translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
         self.gradientComboBox.setItemText(BackgroundGradientType.LeftBottom,
@@ -484,12 +480,10 @@
         self.footerHeightSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
         self.footerPositionCheckBox.setText(translate('OpenLP.ThemeWizard', 'Use default location'))
         themeWizard.setOption(QtGui.QWizard.HaveCustomButton1, False)
-        themeWizard.setButtonText(QtGui.QWizard.CustomButton1,
-            translate('OpenLP.ThemeWizard', 'Layout Preview'))
+        themeWizard.setButtonText(QtGui.QWizard.CustomButton1, translate('OpenLP.ThemeWizard', 'Layout Preview'))
         self.previewPage.setTitle(translate('OpenLP.ThemeWizard', 'Preview and Save'))
         self.previewPage.setSubTitle(translate('OpenLP.ThemeWizard', 'Preview the theme and save it.'))
         self.themeNameLabel.setText(translate('OpenLP.ThemeWizard', 'Theme name:'))
         # Align all QFormLayouts towards each other.
-        labelWidth = max(self.backgroundLabel.minimumSizeHint().width(),
-            self.horizontalLabel.minimumSizeHint().width())
+        labelWidth = max(self.backgroundLabel.minimumSizeHint().width(), self.horizontalLabel.minimumSizeHint().width())
         self.spacer.changeSize(labelWidth, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)

=== modified file 'openlp/core/ui/wizard.py'
--- openlp/core/ui/wizard.py	2013-02-07 08:42:17 +0000
+++ openlp/core/ui/wizard.py	2013-03-06 23:02:23 +0000
@@ -57,11 +57,9 @@
     Importing = translate('OpenLP.Ui', 'Importing')
     ImportingType = translate('OpenLP.Ui', 'Importing "%s"...')
     ImportSelect = translate('OpenLP.Ui', 'Select Import Source')
-    ImportSelectLong = translate('OpenLP.Ui',
-        'Select the import format and the location to import from.')
-    NoSqlite = translate('OpenLP.Ui', 'The openlp.org 1.x importer has been '
-        'disabled due to a missing Python module. If you want to use this '
-        'importer, you will need to install the "python-sqlite" module.')
+    ImportSelectLong = translate('OpenLP.Ui', 'Select the import format and the location to import from.')
+    NoSqlite = translate('OpenLP.Ui', 'The openlp.org 1.x importer has been disabled due to a missing Python module. '
+        'If you want to use this importer, you will need to install the "python-sqlite" module.')
     OpenTypeFile = translate('OpenLP.Ui', 'Open %s File')
     OpenTypeFolder = translate('OpenLP.Ui', 'Open %s Folder')
     PercentSymbolFormat = translate('OpenLP.Ui', '%p%')
@@ -106,8 +104,7 @@
         self.setModal(True)
         self.setWizardStyle(QtGui.QWizard.ModernStyle)
         self.setOptions(QtGui.QWizard.IndependentPages |
-            QtGui.QWizard.NoBackButtonOnStartPage |
-            QtGui.QWizard.NoBackButtonOnLastPage)
+            QtGui.QWizard.NoBackButtonOnStartPage | QtGui.QWizard.NoBackButtonOnLastPage)
         add_welcome_page(self, image)
         self.addCustomPages()
         self.addProgressPage()
@@ -281,8 +278,7 @@
             The place where to save the last opened directory.
         """
         folder = QtGui.QFileDialog.getExistingDirectory(self, title,
-            Settings().value(self.plugin.settingsSection + u'/' + setting_name),
-            QtGui.QFileDialog.ShowDirsOnly)
+            Settings().value(self.plugin.settingsSection + u'/' + setting_name), QtGui.QFileDialog.ShowDirsOnly)
         if folder:
             editbox.setText(folder)
         Settings().setValue(self.plugin.settingsSection + u'/' + setting_name, folder)

=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
--- openlp/plugins/bibles/forms/bibleupgradeform.py	2013-02-07 08:42:17 +0000
+++ openlp/plugins/bibles/forms/bibleupgradeform.py	2013-03-06 23:02:23 +0000
@@ -224,8 +224,8 @@
             self.checkBox[number].setText(bible.get_name())
             self.checkBox[number].setCheckState(QtCore.Qt.Checked)
             self.formLayout.addWidget(self.checkBox[number])
-        self.spacerItem = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
-        self.formLayout.addItem(self.spacerItem)
+        self.spacer_item = QtGui.QSpacerItem(20, 5, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.formLayout.addItem(self.spacer_item)
         self.scrollArea.setWidget(self.scrollAreaContents)
 
     def clearScrollArea(self):
@@ -235,7 +235,7 @@
         for number, filename in enumerate(self.files):
             self.formLayout.removeWidget(self.checkBox[number])
             self.checkBox[number].setParent(None)
-        self.formLayout.removeItem(self.spacerItem)
+        self.formLayout.removeItem(self.spacer_item)
 
     def retranslateUi(self):
         """

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2013-02-07 11:33:47 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2013-03-06 23:02:23 +0000
@@ -304,7 +304,7 @@
         log.debug(u'bible manager initialise')
         self.plugin.manager.media = self
         self.loadBibles()
-        self.quickSearchEdit.setSearchTypes([
+        self.quickSearchEdit.set_search_types([
             (BibleSearch.Reference, u':/bibles/bibles_search_reference.png',
                 translate('BiblesPlugin.MediaItem', 'Scripture Reference'),
                 translate('BiblesPlugin.MediaItem', 'Search Scripture Reference...')),
@@ -312,7 +312,7 @@
                 translate('BiblesPlugin.MediaItem', 'Text Search'),
                 translate('BiblesPlugin.MediaItem', 'Search Text...'))
         ])
-        self.quickSearchEdit.setCurrentSearchType(Settings().value(u'%s/last search type' % self.settingsSection))
+        self.quickSearchEdit.set_current_search_type(Settings().value(u'%s/last search type' % self.settingsSection))
         self.config_update()
         log.debug(u'bible manager initialise complete')
 
@@ -432,12 +432,12 @@
         """
         log.debug(u'updateAutoCompleter')
         # Save the current search type to the configuration.
-        Settings().setValue(u'%s/last search type' % self.settingsSection, self.quickSearchEdit.currentSearchType())
+        Settings().setValue(u'%s/last search type' % self.settingsSection, self.quickSearchEdit.current_search_type())
         # Save the current bible to the configuration.
         Settings().setValue(self.settingsSection + u'/quick bible', self.quickVersionComboBox.currentText())
         books = []
         # We have to do a 'Reference Search'.
-        if self.quickSearchEdit.currentSearchType() == BibleSearch.Reference:
+        if self.quickSearchEdit.current_search_type() == BibleSearch.Reference:
             bibles = self.plugin.manager.get_bibles()
             bible = self.quickVersionComboBox.currentText()
             if bible:
@@ -653,7 +653,7 @@
         bible = self.quickVersionComboBox.currentText()
         second_bible = self.quickSecondComboBox.currentText()
         text = self.quickSearchEdit.text()
-        if self.quickSearchEdit.currentSearchType() == BibleSearch.Reference:
+        if self.quickSearchEdit.current_search_type() == BibleSearch.Reference:
             # We are doing a 'Reference Search'.
             self.search_results = self.plugin.manager.get_verses(bible, text)
             if second_bible and self.search_results:

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2013-02-19 21:23:56 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2013-03-06 23:02:23 +0000
@@ -86,14 +86,14 @@
         self.searchTextButton.setText(UiStrings().Search)
 
     def initialise(self):
-        self.searchTextEdit.setSearchTypes([
+        self.searchTextEdit.set_search_types([
             (CustomSearch.Titles, u':/songs/song_search_title.png',
             translate('SongsPlugin.MediaItem', 'Titles'),
             translate('SongsPlugin.MediaItem', 'Search Titles...')),
             (CustomSearch.Themes, u':/slides/slide_theme.png', UiStrings().Themes, UiStrings().SearchThemes)
         ])
         self.loadList(self.manager.get_all_objects(CustomSlide, order_by_ref=CustomSlide.title))
-        self.searchTextEdit.setCurrentSearchType(Settings().value( u'%s/last search type' % self.settingsSection))
+        self.searchTextEdit.set_current_search_type(Settings().value( u'%s/last search type' % self.settingsSection))
         self.config_updated()
 
     def loadList(self, custom_slides):
@@ -207,11 +207,11 @@
 
     def onSearchTextButtonClicked(self):
         # Save the current search type to the configuration.
-        Settings().setValue(u'%s/last search type' % self.settingsSection, self.searchTextEdit.currentSearchType())
+        Settings().setValue(u'%s/last search type' % self.settingsSection, self.searchTextEdit.current_search_type())
         # Reload the list considering the new search type.
         search_keywords = self.searchTextEdit.displayText()
         search_results = []
-        search_type = self.searchTextEdit.currentSearchType()
+        search_type = self.searchTextEdit.current_search_type()
         if search_type == CustomSearch.Titles:
             log.debug(u'Titles Search')
             search_results = self.plugin.manager.get_all_objects(CustomSlide,

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2013-03-06 17:46:19 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2013-03-06 23:02:23 +0000
@@ -60,7 +60,7 @@
         MediaManagerItem.__init__(self, parent, plugin, icon)
         self.singleServiceItem = False
         self.hasSearch = True
-        self.mediaObject = None
+        self.media_object = None
         self.display_controller = DisplayController(parent)
         self.display_controller.controller_layout = QtGui.QVBoxLayout()
         self.media_controller.register_controller(self.display_controller)
@@ -152,8 +152,7 @@
                 service_item.shortname = service_item.title
                 (path, name) = os.path.split(filename)
                 service_item.add_from_command(path, name,CLAPPERBOARD)
-                if self.media_controller.video(DisplayControllerType.Live, service_item,
-                        videoBehindText=True):
+                if self.media_controller.video(DisplayControllerType.Live, service_item, video_behind_text=True):
                     self.resetAction.setVisible(True)
                 else:
                     critical_error_message_box(UiStrings().LiveBGError,
@@ -214,7 +213,7 @@
             u' '.join(self.media_controller.audio_extensions_list), UiStrings().AllFiles)
 
     def display_setup(self):
-        self.media_controller.setup_display(self.display_controller.previewDisplay, False)
+        self.media_controller.setup_display(self.display_controller.preview_display, False)
 
     def populateDisplayTypes(self):
         """

=== modified file 'openlp/plugins/songs/forms/songexportform.py'
--- openlp/plugins/songs/forms/songexportform.py	2013-02-07 08:42:17 +0000
+++ openlp/plugins/songs/forms/songexportform.py	2013-03-06 23:02:23 +0000
@@ -110,15 +110,15 @@
         self.availableListWidget.setObjectName(u'availableListWidget')
         self.verticalLayout.addWidget(self.availableListWidget)
         self.horizontalLayout = QtGui.QHBoxLayout()
-        self.horizontalLayout.setObjectName(u'horizontalLayout')
+        self.horizontalLayout.setObjectName(u'horizontal_layout')
         self.searchLabel = QtGui.QLabel(self.availableSongsPage)
         self.searchLabel.setObjectName(u'searchLabel')
         self.horizontalLayout.addWidget(self.searchLabel)
         self.searchLineEdit = QtGui.QLineEdit(self.availableSongsPage)
         self.searchLineEdit.setObjectName(u'searchLineEdit')
         self.horizontalLayout.addWidget(self.searchLineEdit)
-        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.horizontalLayout.addItem(spacerItem)
+        spacer_item = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.horizontalLayout.addItem(spacer_item)
         self.uncheckButton = QtGui.QPushButton(self.availableSongsPage)
         self.uncheckButton.setObjectName(u'uncheckButton')
         self.horizontalLayout.addWidget(self.uncheckButton)
@@ -139,7 +139,7 @@
         self.selectedListWidget.setObjectName(u'selectedListWidget')
         self.gridLayout.addWidget(self.selectedListWidget, 1, 0, 1, 1)
         self.horizontalLayout = QtGui.QHBoxLayout()
-        self.horizontalLayout.setObjectName(u'horizontalLayout')
+        self.horizontalLayout.setObjectName(u'horizontal_layout')
         self.directoryLabel = QtGui.QLabel(self.exportSongPage)
         self.directoryLabel.setObjectName(u'directoryLabel')
         self.horizontalLayout.addWidget(self.directoryLabel)

=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py	2013-02-28 11:25:05 +0000
+++ openlp/plugins/songs/forms/songimportform.py	2013-03-06 23:02:23 +0000
@@ -157,7 +157,7 @@
             combo_box_text = (custom_combo_text if custom_combo_text else format_name)
             self.formatComboBox.setItemText(format, combo_box_text)
             if description_text is not None:
-                self.formatWidgets[format][u'descriptionLabel'].setText(description_text)
+                self.formatWidgets[format][u'description_label'].setText(description_text)
             if select_mode == SongFormatSelect.MultipleFiles:
                 self.formatWidgets[format][u'addButton'].setText(
                     translate('SongsPlugin.ImportWizardForm', 'Add Files...'))

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2013-02-24 18:13:50 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2013-03-06 23:02:23 +0000
@@ -128,7 +128,7 @@
             'Maintain the lists of authors, topics and books.'))
 
     def initialise(self):
-        self.searchTextEdit.setSearchTypes([
+        self.searchTextEdit.set_search_types([
             (SongSearch.Entire, u':/songs/song_search_all.png',
                 translate('SongsPlugin.MediaItem', 'Entire Song'),
                 translate('SongsPlugin.MediaItem', 'Search Entire Song...')),
@@ -145,16 +145,16 @@
             (SongSearch.Themes, u':/slides/slide_theme.png',
             UiStrings().Themes, UiStrings().SearchThemes)
         ])
-        self.searchTextEdit.setCurrentSearchType(Settings().value(u'%s/last search type' % self.settingsSection))
+        self.searchTextEdit.set_current_search_type(Settings().value(u'%s/last search type' % self.settingsSection))
         self.config_update()
 
     def onSearchTextButtonClicked(self):
         # Save the current search type to the configuration.
-        Settings().setValue(u'%s/last search type' % self.settingsSection, self.searchTextEdit.currentSearchType())
+        Settings().setValue(u'%s/last search type' % self.settingsSection, self.searchTextEdit.current_search_type())
         # Reload the list considering the new search type.
         search_keywords = unicode(self.searchTextEdit.displayText())
         search_results = []
-        search_type = self.searchTextEdit.currentSearchType()
+        search_type = self.searchTextEdit.current_search_type()
         if search_type == SongSearch.Entire:
             log.debug(u'Entire Song Search')
             search_results = self.searchEntire(search_keywords)
@@ -279,9 +279,9 @@
         """
         if self.searchAsYouType:
             search_length = 1
-            if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
+            if self.searchTextEdit.current_search_type() == SongSearch.Entire:
                 search_length = 4
-            elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
+            elif self.searchTextEdit.current_search_type() == SongSearch.Lyrics:
                 search_length = 3
             if len(text) > search_length:
                 self.onSearchTextButtonClicked()

=== modified file 'tests/functional/openlp_core_lib/test_lib.py'
--- tests/functional/openlp_core_lib/test_lib.py	2013-03-05 14:44:47 +0000
+++ tests/functional/openlp_core_lib/test_lib.py	2013-03-06 23:02:23 +0000
@@ -7,7 +7,7 @@
 from mock import MagicMock, patch
 
 from openlp.core.lib import str_to_bool, translate, check_directory_exists, get_text_file_string, build_icon, \
-    image_to_byte, check_item_selected, validate_thumb, create_separated_list, expand_tags
+    image_to_byte, check_item_selected, validate_thumb, create_separated_list, clean_tags, expand_tags
 
 class TestLib(TestCase):
 
@@ -299,6 +299,28 @@
             MockedQtGui.QMessageBox.information.assert_called_with(u'parent', u'mocked translate', 'message')
             assert not result, u'The result should be False'
 
+    def clean_tags_test(self):
+        """
+        Test clean_tags() method.
+        """
+        with patch(u'openlp.core.lib.FormattingTags.get_html_tags') as mocked_get_tags:
+            # GIVEN: Mocked get_html_tags() method.
+            mocked_get_tags.return_value = [{
+                u'desc': u'Black',
+                u'start tag': u'{b}',
+                u'start html': u'<span style="-webkit-text-fill-color:black">',
+                u'end tag': u'{/b}', u'end html': u'</span>', u'protected': True,
+                u'temporary': False
+            }]
+            string_to_pass = u'ASDF<br>foo{br}bar&nbsp;{b}black{/b}'
+            wanted_string = u'ASDF\nfoo\nbar black'
+
+            # WHEN: Clean the string.
+            result_string = clean_tags(string_to_pass)
+
+            # THEN: The strings should be identical.
+            assert result_string == wanted_string, u'The strings should be identical.'
+
     def expand_tags_test(self):
         """
         Test the expand_tags() method.
@@ -411,7 +433,7 @@
             mocked_createSeparatedList.return_value = u'Author 1, Author 2, and Author 3'
             string_list = [u'Author 1', u'Author 2', u'Author 3']
 
-            # WHEN: We get a string build from the entries it the list and a seperator.
+            # WHEN: We get a string build from the entries it the list and a separator.
             string_result = create_separated_list(string_list)
 
             # THEN: We should have "Author 1, Author 2, and Author 3"
@@ -428,7 +450,7 @@
             mocked_qt.qVersion.return_value = u'4.7'
             string_list = []
 
-            # WHEN: We get a string build from the entries it the list and a seperator.
+            # WHEN: We get a string build from the entries it the list and a separator.
             string_result = create_separated_list(string_list)
 
             # THEN: We shoud have an emptry string.
@@ -444,7 +466,7 @@
             mocked_qt.qVersion.return_value = u'4.7'
             string_list = [u'Author 1']
 
-            # WHEN: We get a string build from the entries it the list and a seperator.
+            # WHEN: We get a string build from the entries it the list and a separator.
             string_result = create_separated_list(string_list)
 
             # THEN: We should have "Author 1"

=== modified file 'tests/interfaces/openlp_core_ui/test_filerenamedialog.py'
--- tests/interfaces/openlp_core_ui/test_filerenamedialog.py	2013-02-17 20:11:37 +0000
+++ tests/interfaces/openlp_core_ui/test_filerenamedialog.py	2013-03-06 23:02:23 +0000
@@ -56,28 +56,28 @@
     def line_edit_focus_test(self):
         """
         Regression test for bug1067251
-        Test that the fileNameEdit setFocus has called with True when executed
+        Test that the file_name_edit setFocus has called with True when executed
         """
-        # GIVEN: A mocked QDialog.exec_() method and mocked fileNameEdit.setFocus() method.
+        # GIVEN: A mocked QDialog.exec_() method and mocked file_name_edit.setFocus() method.
         with patch(u'PyQt4.QtGui.QDialog.exec_') as mocked_exec:
             mocked_set_focus = MagicMock()
-            self.form.fileNameEdit.setFocus = mocked_set_focus
+            self.form.file_name_edit.setFocus = mocked_set_focus
 
             # WHEN: The form is executed
             self.form.exec_()
 
-            # THEN: the setFocus method of the fileNameEdit has been called with True
+            # THEN: the setFocus method of the file_name_edit has been called with True
             mocked_set_focus.assert_called_with()
 
     def file_name_validation_test(self):
         """
-        Test the fileNameEdit validation
+        Test the file_name_edit validation
         """
         # GIVEN: QLineEdit with a validator set with illegal file name characters.
 
         # WHEN: 'Typing' a string containing invalid file characters.
-        QtTest.QTest.keyClicks(self.form.fileNameEdit, u'I/n\\v?a*l|i<d> \F[i\l]e" :N+a%me')
+        QtTest.QTest.keyClicks(self.form.file_name_edit, u'I/n\\v?a*l|i<d> \F[i\l]e" :N+a%me')
 
         # THEN: The text in the QLineEdit should be the same as the input string with the invalid characters filtered
         # out.
-        self.assertEqual(self.form.fileNameEdit.text(), u'Invalid File Name')
+        self.assertEqual(self.form.file_name_edit.text(), u'Invalid File Name')