← 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/152062

Hello,

- fixed short lines
- renamed variables/attributes
- added clean_tags() test
-- 
https://code.launchpad.net/~googol/openlp/short-lines/+merge/152062
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 21:57:28 +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 21:57:28 +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 21:57:28 +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 ``_resetImage`` 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/registry.py'
--- openlp/core/lib/registry.py	2013-02-10 16:05:52 +0000
+++ openlp/core/lib/registry.py	2013-03-06 21:57:28 +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 21:57:28 +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.
@@ -238,9 +224,8 @@
         serviceItem.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
@@ -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 21:57:28 +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,19 +82,19 @@
         ``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):
         """
         Readonly property to return the current search type.
         """
-        return self._currentSearchType
+        return self._current_search_type
 
     def setCurrentSearchType(self, identifier):
         """
@@ -104,30 +103,28 @@
         ``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):
         """
-        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._onMenuActionTriggered)
+            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):
         """
-        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/theme.py'
--- openlp/core/lib/theme.py	2013-02-02 21:16:42 +0000
+++ openlp/core/lib/theme.py	2013-03-06 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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/formattingtagform.py'
--- openlp/core/ui/formattingtagform.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/formattingtagform.py	2013-03-06 21:57:28 +0000
@@ -127,7 +127,6 @@
         self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
         self.onRowSelected()
         self.tagTableWidget.scrollToBottom()
-        #self.savePushButton.setEnabled(False)
 
     def onDeleteClicked(self):
         """

=== 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 21:57:28 +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/printserviceform.py'
--- openlp/core/ui/printserviceform.py	2013-03-01 08:38:25 +0000
+++ openlp/core/ui/printserviceform.py	2013-03-06 21:57:28 +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 21:57:28 +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/starttimeform.py'
--- openlp/core/ui/starttimeform.py	2013-02-05 08:05:28 +0000
+++ openlp/core/ui/starttimeform.py	2013-03-06 21:57:28 +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 21:57:28 +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 21:57:28 +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 21:57:28 +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 '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 21:57:28 +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 21:57:28 +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')


Follow ups