← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bug-1266271 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bug-1266271 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1266271 in OpenLP: "Output display returns after pressing esc when looping slides"
  https://bugs.launchpad.net/openlp/+bug/1266271

For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-1266271/+merge/202192

Change the loop state when ESC is pressed on live controller
-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~trb143/openlp/bug-1266271/+merge/202192
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-1266271 into lp:openlp.
=== modified file '.bzrignore'
--- .bzrignore	2013-09-14 02:42:12 +0000
+++ .bzrignore	2014-01-18 07:58:26 +0000
@@ -2,6 +2,7 @@
 *.*~
 \#*\#
 *.eric4project
+*.eric5project
 *.ropeproject
 *.e4*
 .eric4project

=== modified file 'copyright.txt'
--- copyright.txt	2013-12-24 08:56:50 +0000
+++ copyright.txt	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp.py'
--- openlp.py	2013-12-24 08:56:50 +0000
+++ openlp.py	2014-01-18 07:58:26 +0000
@@ -5,8 +5,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit,  #
 # Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout,      #

=== modified file 'openlp/.version'
--- openlp/.version	2013-08-10 14:51:01 +0000
+++ openlp/.version	2014-01-18 07:58:26 +0000
@@ -1,1 +1,5 @@
+<<<<<<< TREE
 2.1.0-bzr2234
+=======
+2.0.3
+>>>>>>> MERGE-SOURCE

=== modified file 'openlp/__init__.py'
--- openlp/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/__init__.py'
--- openlp/core/__init__.py	2013-12-30 19:50:34 +0000
+++ openlp/core/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -232,10 +237,18 @@
     """
     Setup our logging using log_path
     """
+<<<<<<< TREE
     check_directory_exists(log_path, True)
     filename = os.path.join(log_path, 'openlp.log')
     logfile = logging.FileHandler(filename, 'w')
     logfile.setFormatter(logging.Formatter('%(asctime)s %(name)-55s %(levelname)-8s %(message)s'))
+=======
+    check_directory_exists(log_path, True)
+    filename = os.path.join(log_path, u'openlp.log')
+    logfile = logging.FileHandler(filename, u'w')
+    logfile.setFormatter(logging.Formatter(
+        u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s'))
+>>>>>>> MERGE-SOURCE
     log.addHandler(logfile)
     if log.isEnabledFor(logging.DEBUG):
         print('Logging to: %s' % filename)
@@ -285,10 +298,19 @@
         application.setApplicationName('OpenLPPortable')
         Settings.setDefaultFormat(Settings.IniFormat)
         # Get location OpenLPPortable.ini
+<<<<<<< TREE
         application_path = AppLocation.get_directory(AppLocation.AppDir)
         set_up_logging(os.path.abspath(os.path.join(application_path, '..', '..', 'Other')))
         log.info('Running portable')
         portable_settings_file = os.path.abspath(os.path.join(application_path, '..', '..', 'Data', 'OpenLP.ini'))
+=======
+        app_path = AppLocation.get_directory(AppLocation.AppDir)
+        set_up_logging(os.path.abspath(os.path.join(app_path, u'..',
+            u'..', u'Other')))
+        log.info(u'Running portable')
+        portable_settings_file = os.path.abspath(os.path.join(app_path, u'..',
+            u'..', u'Data', u'OpenLP.ini'))
+>>>>>>> MERGE-SOURCE
         # Make this our settings file
         log.info('INI file: %s', portable_settings_file)
         Settings.set_filename(portable_settings_file)
@@ -301,11 +323,17 @@
         portable_settings.setValue('advanced/is portable', True)
         portable_settings.sync()
     else:
+<<<<<<< TREE
         application.setApplicationName('OpenLP')
         set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
     Registry.create()
     Registry().register('application', application)
     application.setApplicationVersion(get_application_version()['version'])
+=======
+        set_up_logging(AppLocation.get_directory(AppLocation.CacheDir))
+        app.setApplicationName(u'OpenLP')
+    app.setApplicationVersion(get_application_version()[u'version'])
+>>>>>>> MERGE-SOURCE
     # Instance check
     if application.is_already_running():
         sys.exit()

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2014-01-01 09:33:07 +0000
+++ openlp/core/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -287,6 +292,7 @@
     return text
 
 
+<<<<<<< TREE
 def create_separated_list(string_list):
     """
     Returns a string that represents a join of a list of strings with a localized separator. This function corresponds
@@ -306,7 +312,48 @@
     elif len(string_list) == 2:
         return translate('OpenLP.core.lib', '%s and %s',
                          'Locale list separator: 2 items') % (string_list[0], string_list[1])
+=======
+def check_directory_exists(dir, do_not_log=False):
+    """
+    Check a theme directory exists and if not create it
+
+    ``dir``
+        Theme directory to make sure exists
+
+    ``do_not_log``
+        To not log anything. This is need for the start up, when the log isn't ready.
+    """
+    if not do_not_log:
+        log.debug(u'check_directory_exists %s' % dir)
+    try:
+        if not os.path.exists(dir):
+            os.makedirs(dir)
+    except IOError:
+        pass
+
+
+def create_separated_list(stringlist):
+    """
+    Returns a string that represents a join of a list of strings with a
+    localized separator. This function corresponds to
+    QLocale::createSeparatedList which was introduced in Qt 4.8 and implements
+    the algorithm from http://www.unicode.org/reports/tr35/#ListPatterns
+
+    ``stringlist``
+        List of unicode strings
+    """
+    if Qt.PYQT_VERSION_STR >= u'4.9' and Qt.qVersion() >= u'4.8':
+        return unicode(QtCore.QLocale().createSeparatedList(stringlist))
+    if not stringlist:
+        return u''
+    elif len(stringlist) == 1:
+        return stringlist[0]
+    elif len(stringlist) == 2:
+        return unicode(translate('OpenLP.core.lib', '%1 and %2',
+            'Locale list separator: 2 items').arg(stringlist[0], stringlist[1]))
+>>>>>>> MERGE-SOURCE
     else:
+<<<<<<< TREE
         merged = translate('OpenLP.core.lib', '%s, and %s',
                            'Locale list separator: end') % (string_list[-2], string_list[-1])
         for index in reversed(list(range(1, len(string_list) - 2))):
@@ -331,3 +378,32 @@
 from .imagemanager import ImageManager
 from .renderer import Renderer
 from .mediamanageritem import MediaManagerItem
+=======
+        merged = unicode(translate('OpenLP.core.lib', '%1, and %2',
+            u'Locale list separator: end').arg(stringlist[-2], stringlist[-1]))
+        for index in reversed(range(1, len(stringlist) - 2)):
+            merged = unicode(translate('OpenLP.core.lib', '%1, %2',
+            u'Locale list separator: middle').arg(stringlist[index], merged))
+        return unicode(translate('OpenLP.core.lib', '%1, %2',
+            u'Locale list separator: start').arg(stringlist[0], merged))
+
+
+from eventreceiver import Receiver
+from filedialog import FileDialog
+from listwidgetwithdnd import ListWidgetWithDnD
+from formattingtags import FormattingTags
+from spelltextedit import SpellTextEdit
+from settingsmanager import SettingsManager
+from plugin import PluginStatus, StringContent, Plugin
+from pluginmanager import PluginManager
+from settingstab import SettingsTab
+from serviceitem import ServiceItem, ServiceItemType, ItemCapabilities
+from htmlbuilder import build_html, build_lyrics_format_css, \
+    build_lyrics_outline_css
+from toolbar import OpenLPToolbar
+from dockwidget import OpenLPDockWidget
+from imagemanager import ImageManager
+from renderer import Renderer
+from mediamanageritem import MediaManagerItem
+from openlp.core.utils.actions import ActionList
+>>>>>>> MERGE-SOURCE

=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py	2013-12-24 08:56:50 +0000
+++ openlp/core/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/dockwidget.py'
--- openlp/core/lib/dockwidget.py	2013-12-24 08:56:50 +0000
+++ openlp/core/lib/dockwidget.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== added file 'openlp/core/lib/eventreceiver.py.OTHER'
--- openlp/core/lib/eventreceiver.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/core/lib/eventreceiver.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,293 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+"""
+Provide event handling code for OpenLP
+"""
+import logging
+
+from PyQt4 import QtCore
+
+log = logging.getLogger(__name__)
+
+class EventReceiver(QtCore.QObject):
+    """
+    Class to allow events to be passed from different parts of the system. This
+    is a private class and should not be used directly but rather via the
+    Receiver class.
+
+    **Mainwindow related and generic signals**
+
+    ``mainwindow_status_text``
+        Changes the bottom status bar text on the mainwindow.
+
+    ``openlp_warning_message``
+        Displays a standalone Warning Message.
+
+    ``openlp_error_message``
+        Displays a standalone Error Message.
+
+    ``openlp_information_message``
+        Displays a standalone Information Message.
+
+    ``cursor_busy``
+        Makes the cursor got to a busy form.
+
+    ``cursor_normal``
+        Resets the cursor to default.
+
+    ``openlp_process_events``
+        Requests the Application to flush the events queue.
+
+    ``openlp_version_check``
+        Version has changed so pop up window.
+
+    ``openlp_stop_wizard``
+        Stops a wizard before completion.
+
+    **Setting related signals**
+
+    ``config_updated``
+        Informs components that the config has changed.
+
+    ``config_screen_changed``
+        The display monitor has been changed.
+
+    **Slidecontroller signals**
+
+    ``slidecontroller_{live|preview}_next``
+        Moves to the next slide.
+
+    ``slidecontroller_{live|preview}_next_noloop``
+        Moves to the next slide without auto advance.
+
+    ``slidecontroller_{live|preview}_previous``
+        Moves to the previous slide.
+
+    ``slidecontroller_{live|preview}_previous_noloop``
+        Moves to the previous slide, without auto advance.
+
+    ``slidecontroller_{live|preview}_set``
+        Moves to a specific slide, by index.
+
+    ``slidecontroller_{live|preview}_started``
+        Broadcasts that an item has been made live/previewed.
+
+    ``slidecontroller_{live|preview}_change``
+        Informs the slidecontroller that a slide change has occurred and to
+        update itself.
+
+    ``slidecontroller_{live|preview}_changed``
+        Broadcasts that the slidecontroller has changed the current slide.
+
+    ``slidecontroller_{live|preview}_blank``
+        Request that the output screen is blanked.
+
+    ``slidecontroller_{live|preview}_unblank``
+        Request that the output screen is unblanked.
+
+    ``slidecontroller_live_spin_delay``
+        Pushes out the loop delay.
+
+    ``slidecontroller_update_slide_limits``
+        Updates the slide_limits variable from the saved settings.
+
+    ``slidecontroller_live_stop_loop``
+        Stop the loop on the main display.
+
+
+    **Servicemanager related signals**
+
+    ``servicemanager_new_service``
+        A new service is being loaded or created.
+
+    ``servicemanager_previous_item``
+        Display the previous item in the service.
+
+    ``servicemanager_preview_live``
+        Requests a Preview item from the Service Manager to update live and add
+        a new item to the preview panel.
+
+    ``servicemanager_next_item``
+        Display the next item in the service.
+
+    ``servicemanager_set_item``
+        Go live on a specific item, by index.
+
+    ``service_item_update``
+        Passes back to the service manager the service item after it has been
+        processed by the plugin.
+
+    **Display signals**
+
+    ``update_display_css``
+        CSS has been updated which needs to be changed on the main display.
+
+    **Live Display signals**
+
+    ``live_display_hide``
+        Hide the live display.
+
+    ``live_display_show``
+        Return the live display.
+
+    ``live_display_active``
+        The live display has been made active.
+
+    ``live_display_blank_check``
+        Check to see if the blank display message is required.
+
+    **Theme related singlas**
+
+    ``theme_update_list``
+        send out message with new themes.
+
+    ``theme_update_global``
+        Tell the components we have a new global theme.
+
+    **Plugin specific signals**
+
+    ``{plugin}_start``
+        Requests a plugin to start a external program. Path and file have to
+        be provided in the message.
+
+    ``{plugin}_first``
+        Requests a plugin to handle a first event.
+
+    ``{plugin}_previous``
+        Requests a plugin to handle a previous event.
+
+    ``{plugin}_next``
+        Requests a plugin to handle a next event.
+
+    ``{plugin}_last``
+        Requests a plugin to handle a last event.
+
+    ``{plugin}_slide``
+        Requests a plugin to handle a go to specific slide event.
+
+    ``{plugin}_stop``
+        Requests a plugin to handle a stop event.
+
+    ``{plugin}_blank``
+        Requests a plugin to handle a blank screen event.
+
+    ``{plugin}_unblank``
+        Requests a plugin to handle an unblank screen event.
+
+    ``{plugin}_edit``
+        Requests a plugin edit a database item with the key as the payload.
+
+    ``{plugin}_edit_clear``
+        Editing has been completed.
+
+    ``{plugin}_load_list``
+        Tells the the plugin to reload the media manager list.
+
+    ``{plugin}_preview``
+        Tells the plugin it's item can be previewed.
+
+    ``{plugin}_add_service_item``
+        Ask the plugin to push the selected items to the service item.
+
+    ``{plugin}_service_load``
+        Ask the plugin to process an individual service item after it has been
+        loaded.
+
+    ``{plugin}_config_updated``
+        The config has changed so tell the plugin about it.
+
+    ``alerts_text``
+        Displays an alert message.
+
+    ``bibles_nobook``
+        Attempt to find book resulted in no match.
+
+    ``remotes_poll_request``
+        Waits for openlp to do something "interesting" and sends a
+        ``remotes_poll_response`` signal when it does.
+
+    """
+    def __init__(self):
+        """
+        Initialise the event receiver, calling the parent constructor.
+        """
+        QtCore.QObject.__init__(self)
+
+    def send_message(self, event, msg=None):
+        """
+        Emit a Qt signal.
+
+        ``event``
+            The event to that was sent.
+
+        ``msg``
+            Defaults to *None*. The message to send with the event.
+        """
+        log.debug(u'Event %s passed with payload %s' % (event, msg))
+        self.emit(QtCore.SIGNAL(event), msg)
+
+
+class Receiver(object):
+    """
+    Class to allow events to be passed from different parts of the system. This
+    is a static wrapper around the ``EventReceiver`` class. As there is only
+    one instance of it in the system the Qt4 signal/slot architecture can send
+    messages across the system.
+
+    To send a message:
+       ``Receiver.send_message(u'<<Message ID>>', data)``
+
+    To receive a Message
+        ``QtCore.QObject.connect(
+            Receiver.get_receiver(),
+            QtCore.SIGNAL(u'<<Message ID>>'),
+            <<ACTION>>
+        )``
+    """
+    __eventreceiver__ = EventReceiver()
+
+    @staticmethod
+    def send_message(event, msg=None):
+        """
+        Sends a message to the messaging system.
+
+        ``event``
+            The event to send.
+
+        ``msg``
+            Defaults to *None*. The message to send with the event.
+        """
+        Receiver.__eventreceiver__.send_message(event, msg)
+
+    @staticmethod
+    def get_receiver():
+        """
+        Get the global ``__eventreceiver__`` instance.
+        """
+        return Receiver.__eventreceiver__

=== added file 'openlp/core/lib/filedialog.py'
--- openlp/core/lib/filedialog.py	1970-01-01 00:00:00 +0000
+++ openlp/core/lib/filedialog.py	2014-01-18 07:58:26 +0000
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+
+"""
+Provide a work around for a bug in QFileDialog
+<https://bugs.launchpad.net/openlp/+bug/1209515>
+"""
+import os
+import urllib
+
+from PyQt4 import QtCore, QtGui
+
+from openlp.core.lib.ui import UiStrings
+
+class FileDialog(QtGui.QFileDialog):
+    """
+    Subclass QFileDialog to work round a bug
+    """
+    @staticmethod
+    def getOpenFileNames(parent, title, path, filters):
+        """
+        Reimplement getOpenFileNames to fix the way it returns some file
+        names that url encoded when selecting multiple files/
+        """
+        files = QtGui.QFileDialog.getOpenFileNames(parent, title, path, filters)
+        file_list = QtCore.QStringList()
+        for file in files:
+            file = unicode(file)
+            if not os.path.exists(file):
+                file = urllib.unquote(file)
+                if not os.path.exists(file):
+                    QtGui.QMessageBox.information(parent,
+                        UiStrings().FileNotFound,
+                        UiStrings().FileNotFoundMessage % file)
+                    continue
+            file_list.append(QtCore.QString(file))
+        return file_list
\ No newline at end of file

=== renamed file 'openlp/core/lib/filedialog.py' => 'openlp/core/lib/filedialog.py.moved'
=== modified file 'openlp/core/lib/formattingtags.py'
--- openlp/core/lib/formattingtags.py	2013-12-24 08:56:50 +0000
+++ openlp/core/lib/formattingtags.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -29,9 +34,17 @@
 """
 Provide HTML Tag management and Formatting Tag access class
 """
+<<<<<<< TREE
 import json
 
 from openlp.core.common import Settings
+=======
+import cPickle
+import json
+
+from PyQt4 import QtCore
+
+>>>>>>> MERGE-SOURCE
 from openlp.core.lib import translate
 
 
@@ -57,7 +70,12 @@
             The tags to be saved..
         """
         # Formatting Tags were also known as display tags.
+<<<<<<< TREE
         Settings().setValue('formattingTags/html_tags', json.dumps(new_tags) if new_tags else '')
+=======
+        Settings().setValue(u'formattingTags/html_tags',
+            QtCore.QVariant(json.dumps(tags) if tags else u''))
+>>>>>>> MERGE-SOURCE
 
     @staticmethod
     def load_tags():
@@ -159,10 +177,40 @@
             'temporary': False})
         FormattingTags.add_html_tags(base_tags)
         FormattingTags.add_html_tags(temporary_tags)
+<<<<<<< TREE
         user_expands_string = str(Settings().value('formattingTags/html_tags'))
         # If we have some user ones added them as well
+=======
+
+        # Formatting Tags were also known as display tags.
+        user_expands = Settings().value(u'formattingTags/html_tags',
+            QtCore.QVariant(u'')).toString()
+        json_loaded = True
+        if not user_expands:
+            user_expands = Settings().value(u'displayTags/html_tags',
+                QtCore.QVariant(u'')).toString()
+            json_loaded = False
+        # cPickle only accepts str not unicode strings
+        user_expands_string = str(user_expands)
+>>>>>>> MERGE-SOURCE
         if user_expands_string:
+<<<<<<< TREE
             user_tags = json.loads(user_expands_string)
+=======
+            if json_loaded:
+                user_tags = json.loads(user_expands_string)
+            else:
+                user_tags = cPickle.loads(user_expands_string)
+                # move the formatting tags to json and remove old settings
+                Settings().setValue(u'formattingTags/html_tags',
+                    QtCore.QVariant(json.dumps(user_tags)))
+                Settings().remove(u'displayTags/html_tags')
+            for tag in user_tags:
+                for element in tag:
+                    if isinstance(tag[element], str):
+                        tag[element] = tag[element].decode('utf8')
+            # If we have some user ones added them as well
+>>>>>>> MERGE-SOURCE
             FormattingTags.add_html_tags(user_tags)
 
     @staticmethod

=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py	2013-12-26 08:56:53 +0000
+++ openlp/core/lib/htmlbuilder.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -486,10 +491,15 @@
         document.getElementById('footer').innerHTML = footertext;
     }
 
+<<<<<<< TREE
     function show_text(new_text){
+=======
+    function show_text(newtext){
+        var fade_direction = 0;
+>>>>>>> MERGE-SOURCE
         var match = /-webkit-text-fill-color:[^;\"]+/gi;
-        if(timer != null)
-            clearTimeout(timer);
+        if (timer != null)
+            clearInterval(timer);
         /*
         QtWebkit bug with outlines and justify causing outline alignment
         problems. (Bug 859950) Surround each word with a <span> to workaround,
@@ -505,9 +515,24 @@
                 new_text = '<span>' + new_text + '</span>';
             }
         }
+<<<<<<< TREE
         text_fade('lyricsmain', new_text);
     }
+=======
+        
+        text_fade('lyricsmain', newtext);
+        text_fade('lyricsoutline', newtext);
+        text_fade('lyricsshadow', newtext.replace(match, ''));
+        if(text_opacity() == 1) return;
+        timer = setInterval(function(){
+            text_fade('lyricsmain', newtext);
+            text_fade('lyricsoutline', newtext);
+            text_fade('lyricsshadow', newtext.replace(match, ''));
+            if(text_opacity() == 1) clearInterval(timer);
+        }, 100);
+>>>>>>> MERGE-SOURCE
 
+<<<<<<< TREE
     function text_fade(id, new_text){
         /*
         Show the text.
@@ -537,6 +562,46 @@
 
     function show_text_completed(){
         return (timer == null);
+=======
+        function text_fade(id, newtext){
+            /*
+            Using -webkit-transition: opacity 1s linear; would have been preferred
+            but it isn't currently quick enough when animating multiple layers of
+            large areas of large text. Therefore do it manually as best we can.
+            Hopefully in the future we can revisit and do more interesting
+            transitions using -webkit-transition and -webkit-transform.
+            However we need to ensure interrupted transitions (quickly change 2
+            slides) still looks pretty and is zippy.
+            */
+            var text = document.getElementById(id);
+            if(text == null) return;
+            if(!transition){
+                text.innerHTML = newtext;
+                return;
+            }
+            if(fade_direction != 1){
+                text.style.opacity = parseFloat(text.style.opacity) - 0.3;
+                if(text.style.opacity <= 0.1){
+                    text.innerHTML = newtext;
+                    fade_direction = 1;
+                }
+            }else{
+                text.style.opacity = parseFloat(text.style.opacity) + 0.3;
+                if(text.style.opacity > 0.7){
+                    text.style.opacity = 1;
+                }
+            }
+        }
+    }
+
+    function text_opacity(){
+        var text = document.getElementById('lyricsmain');
+        return getComputedStyle(text, '').opacity;
+    }
+
+    function show_text_complete(){
+        return (text_opacity() == 1);
+>>>>>>> MERGE-SOURCE
     }
 </script>
 </head>

=== modified file 'openlp/core/lib/imagemanager.py'
--- openlp/core/lib/imagemanager.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/imagemanager.py	2014-01-18 07:58:26 +0000
@@ -5,8 +5,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/listwidgetwithdnd.py'
--- openlp/core/lib/listwidgetwithdnd.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/listwidgetwithdnd.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/mediamanageritem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -35,9 +40,14 @@
 
 from PyQt4 import QtCore, QtGui
 
+<<<<<<< TREE
 from openlp.core.common import Registry, Settings, UiStrings, translate
 from openlp.core.lib import FileDialog, OpenLPToolbar, ServiceItem, StringContent, ListWidgetWithDnD, \
     ServiceItemContext
+=======
+from openlp.core.lib import FileDialog, SettingsManager, OpenLPToolbar, ServiceItem, \
+    StringContent, build_icon, translate, Receiver, ListWidgetWithDnD
+>>>>>>> MERGE-SOURCE
 from openlp.core.lib.searchedit import SearchEdit
 from openlp.core.lib.ui import create_widget_action, critical_error_message_box
 
@@ -319,10 +329,19 @@
         """
         Add a file to the list widget to make it available for showing
         """
+<<<<<<< TREE
         files = FileDialog.getOpenFileNames(self, self.on_new_prompt,
                                             Settings().value(self.settings_section + '/last directory'),
                                             self.on_new_file_masks)
         log.info('New files(s) %s' % files)
+=======
+        files = FileDialog.getOpenFileNames(
+            self, self.onNewPrompt,
+            SettingsManager.get_last_dir(self.settingsSection),
+            self.onNewFileMasks)
+        files =  map(unicode, files)
+        log.info(u'New files(s) %s', unicode(files))
+>>>>>>> MERGE-SOURCE
         if files:
             self.application.set_busy_cursor()
             self.validate_and_load(files)

=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/plugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/pluginmanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/renderer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/screen.py'
--- openlp/core/lib/screen.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/screen.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/searchedit.py'
--- openlp/core/lib/searchedit.py	2013-12-24 08:56:50 +0000
+++ openlp/core/lib/searchedit.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/serviceitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -37,10 +42,18 @@
 import os
 import uuid
 
+<<<<<<< TREE
 from PyQt4 import QtGui
 
 from openlp.core.common import Registry, Settings, translate
 from openlp.core.lib import ImageSource, build_icon, clean_tags, expand_tags
+=======
+from PyQt4 import QtCore, QtGui
+
+from openlp.core.lib import build_icon, clean_tags, expand_tags, translate, \
+    ImageSource
+from openlp.core.lib.settings import Settings
+>>>>>>> MERGE-SOURCE
 
 log = logging.getLogger(__name__)
 
@@ -379,6 +392,7 @@
             which have their files saved with them or None when the saved
             service is lite and the original file paths need to be preserved..
         """
+<<<<<<< TREE
         log.debug('set_from_service called with path %s' % path)
         header = serviceitem['serviceitem']['header']
         self.title = header['title']
@@ -391,6 +405,21 @@
         self.notes = header['notes']
         self.from_plugin = header['from_plugin']
         self.capabilities = header['capabilities']
+=======
+        log.debug(u'set_from_service called with path %s' % path)
+        header = serviceitem[u'serviceitem'][u'header']
+        self.title = header[u'title']
+        self.name = header[u'name']
+        self.service_item_type = header[u'type']
+        self.shortname = header[u'plugin']
+        self.theme = header[u'theme']
+        self.add_icon(header[u'icon'])
+        self.raw_footer = header[u'footer']
+        self.audit = header[u'audit']
+        self.notes = unicode(header[u'notes'])
+        self.from_plugin = header[u'from_plugin']
+        self.capabilities = header[u'capabilities']
+>>>>>>> MERGE-SOURCE
         # Added later so may not be present in older services.
         self.search_string = header.get('search', '')
         self.data_string = header.get('data', '')
@@ -419,6 +448,7 @@
             for slide in serviceitem['serviceitem']['data']:
                 self._raw_frames.append(slide)
         elif self.service_item_type == ServiceItemType.Image:
+<<<<<<< TREE
             settings_section = serviceitem['serviceitem']['header']['name']
             background = QtGui.QColor(Settings().value(settings_section + '/background color'))
             if path:
@@ -429,6 +459,14 @@
             else:
                 for text_image in serviceitem['serviceitem']['data']:
                     self.add_from_image(text_image['path'], text_image['title'], background)
+=======
+            settingsSection = serviceitem[u'serviceitem'][u'header'][u'name']
+            background = QtGui.QColor(Settings().value(settingsSection
+                + u'/background color', QtCore.QVariant(u'#000000')))
+            for text_image in serviceitem[u'serviceitem'][u'data']:
+                filename = os.path.join(path, text_image)
+                self.add_from_image(filename, text_image, background)
+>>>>>>> MERGE-SOURCE
         elif self.service_item_type == ServiceItemType.Command:
             for text_image in serviceitem['serviceitem']['data']:
                 if not self.title:

=== added file 'openlp/core/lib/settings.py.OTHER'
--- openlp/core/lib/settings.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/core/lib/settings.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+"""
+The :mod:``settings`` module provides a thin wrapper for QSettings, which OpenLP
+uses to manage settings persistence.
+"""
+
+import logging
+
+from PyQt4 import QtCore
+
+log = logging.getLogger()
+
+class Settings(QtCore.QSettings):
+    """
+    Class to wrap QSettings.
+
+    * Exposes all the methods of QSettings.
+    * Adds functionality for OpenLP Portable. If the ``defaultFormat`` is set to
+      ``IniFormat``, and the path to the Ini file is set using ``setFilename``,
+      then the Settings constructor (without any arguments) will create a Settings
+      object for accessing settings stored in that Ini file.
+    """
+
+    __filePath = u''
+
+    @staticmethod
+    def setFilename(iniFile):
+        """
+        Sets the complete path to an Ini file to be used by Settings objects.
+
+        Does not affect existing Settings objects.
+        """
+        Settings.__filePath = iniFile
+
+    def __init__(self, *args):
+        if not args and Settings.__filePath and (Settings.defaultFormat() ==
+            Settings.IniFormat):
+            QtCore.QSettings.__init__(self, Settings.__filePath,
+                Settings.IniFormat)
+        else:
+            QtCore.QSettings.__init__(self, *args)

=== added file 'openlp/core/lib/settingsmanager.py.OTHER'
--- openlp/core/lib/settingsmanager.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/core/lib/settingsmanager.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,168 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+"""
+Provide handling for persisting OpenLP settings.  OpenLP uses QSettings to
+manage settings persistence.  QSettings provides a single API for saving and
+retrieving settings from the application but writes to disk in an OS dependant
+format.
+"""
+import os
+
+from PyQt4 import QtCore
+
+from openlp.core.lib.settings import Settings
+from openlp.core.utils import AppLocation
+
+class SettingsManager(object):
+    """
+    Class to provide helper functions for the loading and saving of application
+    settings.
+    """
+
+    @staticmethod
+    def get_last_dir(section, num=None):
+        """
+        Read the last directory used for plugin.
+
+        ``section``
+            The section of code calling the method. This is used in the
+            settings key.
+
+        ``num``
+            Defaults to *None*. A further qualifier.
+        """
+        if num:
+            name = u'last directory %d' % num
+        else:
+            name = u'last directory'
+        last_dir = unicode(Settings().value(
+            section + u'/' + name, QtCore.QVariant(u'')).toString())
+        return last_dir
+
+    @staticmethod
+    def set_last_dir(section, directory, num=None):
+        """
+        Save the last directory used for plugin.
+
+        ``section``
+            The section of code calling the method. This is used in the
+            settings key.
+
+        ``directory``
+            The directory being stored in the settings.
+
+        ``num``
+            Defaults to *None*. A further qualifier.
+        """
+        if num:
+            name = u'last directory %d' % num
+        else:
+            name = u'last directory'
+        Settings().setValue(
+            section + u'/' + name, QtCore.QVariant(directory))
+
+    @staticmethod
+    def set_list(section, name, list):
+        """
+        Save a list to application settings.
+
+        ``section``
+            The section of the settings to store this list.
+
+        ``name``
+            The name of the list to save.
+
+        ``list``
+            The list of values to save.
+        """
+        settings = Settings()
+        settings.beginGroup(section)
+        old_count = settings.value(
+            u'%s count' % name, QtCore.QVariant(0)).toInt()[0]
+        new_count = len(list)
+        settings.setValue(u'%s count' % name, QtCore.QVariant(new_count))
+        for counter in range(new_count):
+            settings.setValue(
+                u'%s %d' % (name, counter), QtCore.QVariant(list[counter-1]))
+        if old_count > new_count:
+            # Tidy up any old list items
+            for counter in range(new_count, old_count):
+                settings.remove(u'%s %d' % (name, counter))
+        settings.endGroup()
+
+    @staticmethod
+    def load_list(section, name):
+        """
+        Load a list from the config file.
+
+        ``section``
+            The section of the settings to load the list from.
+
+        ``name``
+            The name of the list.
+        """
+        settings = Settings()
+        settings.beginGroup(section)
+        list_count = settings.value(
+            u'%s count' % name, QtCore.QVariant(0)).toInt()[0]
+        list = []
+        if list_count:
+            for counter in range(list_count):
+                item = unicode(
+                    settings.value(u'%s %d' % (name, counter)).toString())
+                if item:
+                    list.append(item)
+        settings.endGroup()
+        return list
+
+    @staticmethod
+    def get_files(section=None, extension=None):
+        """
+        Get a list of files from the data files path.
+
+        ``section``
+            Defaults to *None*. The section of code getting the files - used
+            to load from a section's data subdirectory.
+
+        ``extension``
+            Defaults to *None*. The extension to search for.
+        """
+        path = AppLocation.get_data_path()
+        if section:
+            path = os.path.join(path, section)
+        try:
+            files = os.listdir(path)
+        except OSError:
+            return []
+        if extension:
+            return [filename for filename in files
+                if extension == os.path.splitext(filename)[1]]
+        else:
+            # no filtering required
+            return files

=== modified file 'openlp/core/lib/settingstab.py'
--- openlp/core/lib/settingstab.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/settingstab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/spelltextedit.py'
--- openlp/core/lib/spelltextedit.py	2013-12-29 20:18:22 +0000
+++ openlp/core/lib/spelltextedit.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py	2013-12-28 21:33:38 +0000
+++ openlp/core/lib/theme.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py	2013-12-24 08:56:50 +0000
+++ openlp/core/lib/toolbar.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/lib/ui.py'
--- openlp/core/lib/ui.py	2014-01-04 16:33:20 +0000
+++ openlp/core/lib/ui.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -40,6 +45,125 @@
 
 log = logging.getLogger(__name__)
 
+<<<<<<< TREE
+=======
+class UiStrings(object):
+    """
+    Provide standard strings for objects to use.
+    """
+    __instance__ = None
+
+    def __new__(cls):
+        """
+        Override the default object creation method to return a single instance.
+        """
+        if not cls.__instance__:
+            cls.__instance__ = object.__new__(cls)
+        return cls.__instance__
+
+    def __init__(self):
+        """
+        These strings should need a good reason to be retranslated elsewhere.
+        Should some/more/less of these have an &amp; attached?
+        """
+        self.About = translate('OpenLP.Ui', 'About')
+        self.Add = translate('OpenLP.Ui', '&Add')
+        self.Advanced = translate('OpenLP.Ui', 'Advanced')
+        self.AllFiles = translate('OpenLP.Ui', 'All Files')
+        self.Bottom = translate('OpenLP.Ui', 'Bottom')
+        self.Browse = translate('OpenLP.Ui', 'Browse...')
+        self.Cancel = translate('OpenLP.Ui', 'Cancel')
+        self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
+        self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
+        self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
+        self.Continuous = translate('OpenLP.Ui', 'Continuous')
+        self.Default = unicode(translate('OpenLP.Ui', 'Default'))
+        self.Delete = translate('OpenLP.Ui', '&Delete')
+        self.DisplayStyle = translate('OpenLP.Ui', 'Display style:')
+        self.Duplicate = translate('OpenLP.Ui', 'Duplicate Error')
+        self.Edit = translate('OpenLP.Ui', '&Edit')
+        self.EmptyField = translate('OpenLP.Ui', 'Empty Field')
+        self.Error = translate('OpenLP.Ui', 'Error')
+        self.Export = translate('OpenLP.Ui', 'Export')
+        self.File = translate('OpenLP.Ui', 'File')
+        self.FileNotFound = unicode(translate('OpenLP.Ui',
+            'File Not Found'))
+        self.FileNotFoundMessage = unicode(translate('OpenLP.Ui',
+            'File %s not found.\nPlease try selecting it individually.'))
+        self.FontSizePtUnit = translate('OpenLP.Ui', 'pt',
+            'Abbreviated font pointsize unit')
+        self.Help = translate('OpenLP.Ui', 'Help')
+        self.Hours = translate('OpenLP.Ui', 'h',
+            'The abbreviated unit for hours')
+        self.IFdSs = translate('OpenLP.Ui', 'Invalid Folder Selected',
+            'Singular')
+        self.IFSs = translate('OpenLP.Ui', 'Invalid File Selected', 'Singular')
+        self.IFSp = translate('OpenLP.Ui', 'Invalid Files Selected', 'Plural')
+        self.Image = translate('OpenLP.Ui', 'Image')
+        self.Import = translate('OpenLP.Ui', 'Import')
+        self.LayoutStyle = translate('OpenLP.Ui', 'Layout style:')
+        self.Live = translate('OpenLP.Ui', 'Live')
+        self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
+        self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
+        self.Load = translate('OpenLP.Ui', 'Load')
+        self.Minutes = translate('OpenLP.Ui', 'm',
+            'The abbreviated unit for minutes')
+        self.Middle = translate('OpenLP.Ui', 'Middle')
+        self.New = translate('OpenLP.Ui', 'New')
+        self.NewService = translate('OpenLP.Ui', 'New Service')
+        self.NewTheme = translate('OpenLP.Ui', 'New Theme')
+        self.NextTrack = translate('OpenLP.Ui', 'Next Track')
+        self.NFdSs = translate('OpenLP.Ui', 'No Folder Selected', 'Singular')
+        self.NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
+        self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
+        self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
+        self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
+        self.OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
+        self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
+        self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. '
+            'Do you wish to continue?')
+        self.OpenService = translate('OpenLP.Ui', 'Open service.')
+        self.PlaySlidesInLoop = translate('OpenLP.Ui','Play Slides in Loop')
+        self.PlaySlidesToEnd = translate('OpenLP.Ui','Play Slides to End')
+        self.Preview = translate('OpenLP.Ui', 'Preview')
+        self.PrintService = translate('OpenLP.Ui', 'Print Service')
+        self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
+        self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
+        self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
+        self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
+        self.Seconds = translate('OpenLP.Ui', 's',
+            'The abbreviated unit for seconds')
+        self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
+        self.Search = translate('OpenLP.Ui', 'Search')
+        self.SearchThemes = translate(
+            'OpenLP.Ui', 'Search Themes...', 'Search bar place holder text ')
+        self.SelectDelete = translate('OpenLP.Ui', 'You must select an item '
+            'to delete.')
+        self.SelectEdit = translate('OpenLP.Ui', 'You must select an item to '
+            'edit.')
+        self.Settings = translate('OpenLP.Ui', 'Settings')
+        self.SaveService = translate('OpenLP.Ui', 'Save Service')
+        self.Service = translate('OpenLP.Ui', 'Service')
+        self.Split = translate('OpenLP.Ui', 'Optional &Split')
+        self.SplitToolTip = translate('OpenLP.Ui', 'Split a slide into two '
+            'only if it does not fit on the screen as one slide.')
+        self.StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
+        self.StopPlaySlidesInLoop = translate('OpenLP.Ui',
+            'Stop Play Slides in Loop')
+        self.StopPlaySlidesToEnd = translate('OpenLP.Ui',
+            'Stop Play Slides to End')
+        self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
+        self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
+        self.Tools = translate('OpenLP.Ui', 'Tools')
+        self.Top = translate('OpenLP.Ui', 'Top')
+        self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
+        self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
+        self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
+        self.Version = translate('OpenLP.Ui', 'Version')
+        self.View = translate('OpenLP.Ui', 'View')
+        self.ViewMode = translate('OpenLP.Ui', 'View Mode')
+
+>>>>>>> MERGE-SOURCE
 
 def add_welcome_page(parent, image):
     """

=== modified file 'openlp/core/resources.py'
=== added directory 'openlp/core/theme'
=== added file 'openlp/core/theme/__init__.py.OTHER'
--- openlp/core/theme/__init__.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/core/theme/__init__.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+
+from openlp.core.theme.theme import Theme

=== added file 'openlp/core/theme/theme.py.OTHER'
--- openlp/core/theme/theme.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/core/theme/theme.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,242 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+"""
+OpenLP version 1 theme handling
+
+Provides reference data, a default v1 XML theme and class wrapper for
+processing version 1 themes in OpenLP version 2.
+"""
+
+from xml.etree.ElementTree import ElementTree, XML
+from PyQt4 import QtGui
+
+DELPHI_COLORS = {
+    u'clAqua': 0x00FFFF,    u'clBlack': 0x000000,   u'clBlue': 0x0000FF,
+    u'clFuchsia': 0xFF00FF, u'clGray': 0x808080,    u'clGreen': 0x008000,
+    u'clLime': 0x00FF00,    u'clMaroon': 0x800000,  u'clNavy': 0x000080,
+    u'clOlive': 0x808000,   u'clPurple': 0x800080,  u'clRed': 0xFF0000,
+    u'clSilver': 0xC0C0C0,  u'clTeal': 0x008080,    u'clWhite': 0xFFFFFF,
+    u'clYellow': 0xFFFF00
+}
+
+BLANK_STYLE_XML = \
+'''<?xml version="1.0" encoding="iso-8859-1"?>
+<Theme>
+  <Name>BlankStyle</Name>
+  <BackgroundMode>1</BackgroundMode>
+  <BackgroundType>0</BackgroundType>
+  <BackgroundParameter1>$000000</BackgroundParameter1>
+  <BackgroundParameter2/>
+  <BackgroundParameter3/>
+  <FontName>Arial</FontName>
+  <FontColor>clWhite</FontColor>
+  <FontProportion>30</FontProportion>
+  <FontUnits>pixels</FontUnits>
+  <Shadow>0</Shadow>
+  <Outline>0</Outline>
+  <HorizontalAlign>0</HorizontalAlign>
+  <VerticalAlign>0</VerticalAlign>
+  <WrapStyle>0</WrapStyle>
+</Theme>
+'''
+
+class Theme(object):
+    """
+    Provide a class wrapper storing data from an XML theme
+
+    ``name``
+        Theme name
+
+    ``BackgroundMode``
+        The behaviour of the background. Valid modes are:
+
+            * ``0`` - Transparent
+            * ``1`` - Opaque
+
+    ``BackgroundType``
+        The content of the background. Valid types are:
+
+            * ``0`` - solid color
+            * ``1`` - gradient color
+            * ``2`` - image
+
+    ``BackgroundParameter1``
+        Extra information about the background. The contents of this attribute
+        depend on the BackgroundType:
+
+            * ``image`` - image filename
+            * ``gradient`` - start color
+            * ``solid`` - color
+
+    ``BackgroundParameter2``
+        Extra information about the background. The contents of this attribute
+        depend on the BackgroundType:
+
+            * ``image`` - border color
+            * ``gradient`` - end color
+            * ``solid`` - N/A
+
+    ``BackgroundParameter3``
+        Extra information about the background. The contents of this attribute
+        depend on the BackgroundType:
+
+            * ``image`` - N/A
+            * ``gradient`` - The direction of the gradient. Valid entries are:
+
+                * ``0`` - vertical
+                * ``1`` - horizontal
+
+            * ``solid`` - N/A
+
+    ``FontName``
+        Name of the font to use for the main font.
+
+    ``FontColor``
+        The color for the main font
+
+    ``FontProportion``
+        The size of the main font
+
+    ``FontUnits``
+        The units for FontProportion, either <pixels> or <points>
+
+    ``Shadow``
+        The shadow type to apply to the main font.
+
+            * ``0`` - no shadow
+            * non-zero - use shadow
+
+    ``ShadowColor``
+        Color for the shadow
+
+    ``Outline``
+        The outline to apply to the main font
+
+            * ``0`` - no outline
+            * non-zero - use outline
+
+    ``OutlineColor``
+        Color for the outline (or None if Outline is 0)
+
+    ``HorizontalAlign``
+        The horizontal alignment to apply to text. Valid alignments are:
+
+            * ``0`` - left align
+            * ``1`` - right align
+            * ``2`` - centre align
+
+    ``VerticalAlign``
+        The vertical alignment to apply to the text. Valid alignments are:
+
+            * ``0`` - top align
+            * ``1`` - bottom align
+            * ``2`` - centre align
+
+    ``WrapStyle``
+        The wrap style to apply to the text. Valid styles are:
+
+            * ``0`` - normal
+            * ``1`` - lyrics
+    """
+    def __init__(self, xml):
+        """
+        Initialise a theme with data from xml
+
+        ``xml``
+            The data to initialise the theme with
+        """
+        # init to defaults
+        self._set_from_xml(BLANK_STYLE_XML)
+        self._set_from_xml(xml)
+
+    def _get_as_string(self):
+        """
+        Return single line string representation of a theme
+        """
+        theme_strings = []
+        keys = dir(self)
+        keys.sort()
+        for key in keys:
+            if key[0:1] != u'_':
+                theme_strings.append(u'_%s_' % (getattr(self, key)))
+        return u''.join(theme_strings)
+
+    def _set_from_xml(self, xml):
+        """
+        Set theme class attributes with data from XML
+
+        ``xml``
+            The data to apply to the theme
+        """
+        root = ElementTree(element=XML(xml.encode(u'ascii',
+            u'xmlcharrefreplace')))
+        xml_iter = root.getiterator()
+        for element in xml_iter:
+            delphi_color_change = False
+            if element.tag != u'Theme':
+                element_text = element.text
+                val = 0
+                if element_text is None:
+                    val = element_text
+                # strings need special handling to sort the colours out
+                if isinstance(element_text, basestring):
+                    if element_text[0] == u'$': # might be a hex number
+                        try:
+                            val = int(element_text[1:], 16)
+                        except ValueError: # nope
+                            pass
+                    elif element_text in DELPHI_COLORS:
+                        val = DELPHI_COLORS[element_text]
+                        delphi_color_change = True
+                    else:
+                        try:
+                            val = int(element_text)
+                        except ValueError:
+                            val = element_text
+                if (element.tag.find(u'Color') > 0 or
+                    (element.tag.find(u'BackgroundParameter') == 0 and
+                    isinstance(val, int))):
+                    # convert to a wx.Colour
+                    if not delphi_color_change:
+                        val = QtGui.QColor(
+                            val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF)
+                    else:
+                        val = QtGui.QColor(
+                            (val>>16)&0xFF, (val>>8)&0xFF, val&0xFF)
+                setattr(self, element.tag, val)
+
+    def __str__(self):
+        """
+        Provide Python string representation for the class (multiline output)
+        """
+        theme_strings = []
+        for key in dir(self):
+            if key[0:1] != u'_':
+                theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
+        return u'\n'.join(theme_strings)

=== modified file 'openlp/core/ui/__init__.py'
--- openlp/core/ui/__init__.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/aboutdialog.py'
--- openlp/core/ui/aboutdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/aboutdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -271,6 +276,7 @@
             '\n    '.join(documentors)))
         self.about_notebook.setTabText(self.about_notebook.indexOf(self.credits_tab),
             translate('OpenLP.AboutForm', 'Credits'))
+<<<<<<< TREE
         copyright_note = translate('OpenLP.AboutForm',
             'Copyright \xa9 2004-2014 %s\n'
             'Portions copyright \xa9 2004-2014 %s') % ('Raoul Snyman',
@@ -282,6 +288,19 @@
             'Philip Ridout, Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, '
             'Martin Thompson, Jon Tibble, Dave Warnock, Frode Woldsund, '
             'Martin Zibricky, Patrick Zimmermann')
+=======
+        copyright = unicode(translate('OpenLP.AboutForm',
+            'Copyright \xa9 2004-2013 %s\n'
+            'Portions copyright \xa9 2004-2013 %s')) % (u'Raoul Snyman',
+            u'Tim Bentley, Gerald Britton, Jonathan Corwin, Samuel Findlay, '
+            u'Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, '
+            u'Armin K\xf6hler, Erik Lundin, Edwin Lunando, Joshua Miller, '
+            u'Brian T. Meyer, Stevan Pettit, Andreas Preikschat, '
+            u'Mattias P\xf5ldaru, Christian Richter, '
+            u'Philip Ridout, Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, '
+            u'Martin Thompson, Jon Tibble, Dave Warnock, Frode Woldsund, '
+            u'Martin Zibricky')
+>>>>>>> MERGE-SOURCE
         licence = translate('OpenLP.AboutForm',
             'This program is free software; you can redistribute it and/or '
             'modify it under the terms of the GNU General Public License as '

=== modified file 'openlp/core/ui/aboutform.py'
--- openlp/core/ui/aboutform.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/aboutform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py	2013-12-24 11:32:38 +0000
+++ openlp/core/ui/advancedtab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -506,6 +511,7 @@
             self.default_color = new_color.name()
             self.default_color_button.setStyleSheet('background-color: %s' % self.default_color)
 
+<<<<<<< TREE
     def on_default_browse_button_clicked(self):
         """
         Select an image for the default display screen.
@@ -513,6 +519,14 @@
         file_filters = '%s;;%s (*.*) (*)' % (get_images_filter(), UiStrings().AllFiles)
         filename = QtGui.QFileDialog.getOpenFileName(self, translate('OpenLP.AdvancedTab', 'Open File'), '',
                                                      file_filters)
+=======
+    def onDefaultBrowseButtonClicked(self):
+        file_filters = u'%s;;%s (*.*)' % (get_images_filter(),
+            UiStrings().AllFiles)
+        filename = QtGui.QFileDialog.getOpenFileName(self,
+            translate('OpenLP.AdvancedTab', 'Open File'), '',
+            file_filters)
+>>>>>>> MERGE-SOURCE
         if filename:
             self.default_file_edit.setText(filename)
         self.default_file_edit.setFocus()

=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py	2013-12-24 11:32:38 +0000
+++ openlp/core/ui/exceptiondialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/exceptionform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -222,6 +227,7 @@
         self.description_word_count.setText(
             translate('OpenLP.ExceptionDialog', 'Description characters to enter : %s') % count)
 
+<<<<<<< TREE
     def on_attach_file_button_clicked(self):
         """
         Attache files to the bug report e-mail.
@@ -230,6 +236,15 @@
                                                   Settings().value(self.settings_section + '/last directory'),
                                                   '%s (*.*) (*)' % UiStrings().AllFiles)
         log.info('New files(s) %s', str(files))
+=======
+    def onAttachFileButtonClicked(self):
+        files = QtGui.QFileDialog.getOpenFileName(
+            self,translate('ImagePlugin.ExceptionDialog',
+            'Select Attachment'),
+            SettingsManager.get_last_dir(u'exceptions'),
+            u'%s (*.*)' % UiStrings().AllFiles)
+        log.info(u'New files(s) %s', unicode(files))
+>>>>>>> MERGE-SOURCE
         if files:
             self.file_attachment = str(files)
 

=== modified file 'openlp/core/ui/filerenamedialog.py'
--- openlp/core/ui/filerenamedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/filerenamedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/filerenameform.py'
--- openlp/core/ui/filerenameform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/filerenameform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/firsttimeform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -26,9 +31,16 @@
 # with this program; if not, write to the Free Software Foundation, Inc., 59  #
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
+<<<<<<< TREE
 """
 This module contains the first time wizard.
 """
+=======
+"""
+The First Time Wizard
+"""
+import io
+>>>>>>> MERGE-SOURCE
 import logging
 import os
 import sys
@@ -41,10 +53,19 @@
 
 from PyQt4 import QtCore, QtGui
 
+<<<<<<< TREE
 from openlp.core.common import Registry, AppLocation, Settings, check_directory_exists, translate
 from openlp.core.lib import PluginStatus, build_icon
 from openlp.core.utils import get_web_page
 from .firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
+=======
+from openlp.core.lib import translate, PluginStatus, Receiver, build_icon, \
+    check_directory_exists
+from openlp.core.lib.settings import Settings
+from openlp.core.utils import get_web_page, AppLocation, join_url, \
+    get_filesystem_encoding, get_application_version
+from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
+>>>>>>> MERGE-SOURCE
 
 log = logging.getLogger(__name__)
 
@@ -54,16 +75,28 @@
     This thread downloads the theme screenshots.
     """
     def run(self):
+<<<<<<< TREE
         """
         Overridden method to run the thread.
         """
         themes = self.parent().config.get('themes', 'files')
         themes = themes.split(',')
+=======
+        """
+        Run the thread.
+        """
+        themes = self.parent().config.get(u'themes', u'files')
+        themes = themes.split(u',')
+        themes_dir = self.parent().config.get(u'themes', u'directory')
+        tmp_dir = os.path.join(unicode(gettempdir(), get_filesystem_encoding()),
+                u'openlp')
+>>>>>>> MERGE-SOURCE
         config = self.parent().config
         for theme in themes:
             # Stop if the wizard has been cancelled.
             if self.parent().was_download_cancelled:
                 return
+<<<<<<< TREE
             title = config.get('theme_%s' % theme, 'title')
             filename = config.get('theme_%s' % theme, 'filename')
             screenshot = config.get('theme_%s' % theme, 'screenshot')
@@ -71,6 +104,16 @@
                                        os.path.join(gettempdir(), 'openlp', screenshot))
             item = QtGui.QListWidgetItem(title, self.parent().themes_list_widget)
             item.setData(QtCore.Qt.UserRole, filename)
+=======
+            title = config.get(u'theme_%s' % theme, u'title')
+            filename = config.get(u'theme_%s' % theme, u'filename')
+            screenshot = config.get(u'theme_%s' % theme, u'screenshot')
+            urllib.urlretrieve(join_url(self.parent().baseurl,
+                themes_dir, screenshot),
+                os.path.join(tmp_dir, screenshot))
+            item = QtGui.QListWidgetItem(title, self.parent().themesListWidget)
+            item.setData(QtCore.Qt.UserRole, QtCore.QVariant(filename))
+>>>>>>> MERGE-SOURCE
             item.setCheckState(QtCore.Qt.Unchecked)
             item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
 
@@ -88,6 +131,7 @@
         super(FirstTimeForm, self).__init__(parent)
         self.setupUi(self)
         self.screens = screens
+<<<<<<< TREE
         # check to see if we have web access
         self.web = 'http://openlp.org/files/frw/'
         self.config = ConfigParser()
@@ -105,6 +149,37 @@
         self.no_internet_finish_button.clicked.connect(self.on_no_internet_finish_button_clicked)
         self.currentIdChanged.connect(self.on_current_id_changed)
         Registry().register_function('config_screen_changed', self.update_screen_list_combo)
+=======
+        self.config = SafeConfigParser()
+        # The following url should contain 'download.cfg' or redirect OpenLP
+        # to the right url of 'download.cfg' file.
+        # 'download.cfg' file contains definitions for everything that is
+        # available for download into OpenLP in FirstTimeWizard.
+        self.web = u'http://openlp.org/files/frw/'
+        # Base url for dowloading resource files (songs, themes, bibles).
+        # These files could be hosted on different places and thus the base
+        # url is defined in 'download.cfg' file.
+        self.baseurl = None
+        # Check to see if we have web access
+        user_agent = u'OpenLP/' + get_application_version()[u'version']
+        self.webAccess = get_web_page(u'%s%s' % (self.web, u'download.cfg'), header=(u'User-Agent', user_agent))
+        if self.webAccess:
+            files = self.webAccess.read()
+            self.config.readfp(io.BytesIO(files))
+            self.baseurl = self.config.get(u'general', u'base url')
+        self.updateScreenListCombo()
+        self.downloadCancelled = False
+        self.downloading = unicode(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)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'config_screen_changed'), self.updateScreenListCombo)
+>>>>>>> MERGE-SOURCE
 
     def exec_(self):
         """
@@ -121,11 +196,20 @@
         check_directory_exists(os.path.join(gettempdir(), 'openlp'))
         self.no_internet_finish_button.setVisible(False)
         # Check if this is a re-run of the wizard.
+<<<<<<< TREE
         self.has_run_wizard = Settings().value('core/has run wizard')
         # Sort out internet access for downloads
         if self.web_access:
             songs = self.config.get('songs', 'languages')
             songs = songs.split(',')
+=======
+        self.hasRunWizard = Settings().value(
+            u'general/has run wizard', QtCore.QVariant(False)).toBool()
+        # Sort out internet access for downloads.
+        if self.webAccess:
+            songs = self.config.get(u'songs', u'languages')
+            songs = songs.split(u',')
+>>>>>>> MERGE-SOURCE
             for song in songs:
                 title = self.config.get('songs_%s' % song, 'title')
                 filename = self.config.get('songs_%s' % song, 'filename')
@@ -157,16 +241,37 @@
         """
         Determine the next page in the Wizard to go to.
         """
+<<<<<<< TREE
         self.application.process_events()
+=======
+        Receiver.send_message(u'openlp_process_events')
+        # If we are currently on the plugins page
+>>>>>>> MERGE-SOURCE
         if self.currentId() == FirstTimePage.Plugins:
+<<<<<<< TREE
             if not self.web_access:
+=======
+            # But we don't have Internet access
+            if not self.webAccess:
+>>>>>>> MERGE-SOURCE
                 return FirstTimePage.NoInternet
-            else:
+            # The songs plugin is enabled
+            elif self.songsCheckBox.isChecked():
                 return FirstTimePage.Songs
+            # The Bibles plugin is enabled
+            elif self.bibleCheckBox.isChecked():
+                return FirstTimePage.Bibles
+            else:
+                return FirstTimePage.Themes
         elif self.currentId() == FirstTimePage.Progress:
             return -1
         elif self.currentId() == FirstTimePage.NoInternet:
             return FirstTimePage.Progress
+        elif self.currentId() == FirstTimePage.Songs:
+            if self.bibleCheckBox.isChecked():
+                return FirstTimePage.Bibles
+            else:
+                return FirstTimePage.Themes
         elif self.currentId() == FirstTimePage.Themes:
             self.application.set_busy_cursor()
             while not self.theme_screenshot_thread.isFinished():
@@ -265,6 +370,7 @@
         Download a file given a URL.  The file is retrieved in chunks, giving the ability to cancel the download at any
         point.
         """
+        log.debug(u'Downloading %s' % url)
         block_count = 0
         block_size = 4096
         url_file = urllib.request.urlopen(url)
@@ -338,15 +444,30 @@
         Prepare the UI for the process.
         """
         self.max_progress = 0
+<<<<<<< TREE
         self.finish_button.setVisible(False)
         self.application.process_events()
+=======
+        self.finishButton.setVisible(False)
+        Receiver.send_message(u'openlp_process_events')
+        # Directory name appended to base download url as the name
+        # is found in download.cfg file.
+        songs_dir = unicode(self.config.get(u'songs', u'directory'), u'utf8')
+        bibles_dir = unicode(self.config.get(u'bibles', u'directory'), u'utf8')
+        themes_dir = unicode(self.config.get(u'themes', u'directory'), u'utf8')
+>>>>>>> MERGE-SOURCE
         # Loop through the songs list and increase for each selected item
         for i in range(self.songs_list_widget.count()):
             self.application.process_events()
             item = self.songs_list_widget.item(i)
             if item.checkState() == QtCore.Qt.Checked:
+<<<<<<< TREE
                 filename = item.data(QtCore.Qt.UserRole)
                 size = self._getFileSize('%s%s' % (self.web, filename))
+=======
+                filename = item.data(QtCore.Qt.UserRole).toString()
+                size = self._getFileSize(join_url(self.baseurl, songs_dir, filename))
+>>>>>>> MERGE-SOURCE
                 self.max_progress += size
         # Loop through the Bibles list and increase for each selected item
         iterator = QtGui.QTreeWidgetItemIterator(self.bibles_tree_widget)
@@ -354,8 +475,13 @@
             self.application.process_events()
             item = iterator.value()
             if item.parent() and item.checkState(0) == QtCore.Qt.Checked:
+<<<<<<< TREE
                 filename = item.data(0, QtCore.Qt.UserRole)
                 size = self._getFileSize('%s%s' % (self.web, filename))
+=======
+                filename = item.data(0, QtCore.Qt.UserRole).toString()
+                size = self._getFileSize(join_url(self.baseurl, bibles_dir, filename))
+>>>>>>> MERGE-SOURCE
                 self.max_progress += size
             iterator += 1
         # Loop through the themes list and increase for each selected item
@@ -363,11 +489,17 @@
             self.application.process_events()
             item = self.themes_list_widget.item(i)
             if item.checkState() == QtCore.Qt.Checked:
+<<<<<<< TREE
                 filename = item.data(QtCore.Qt.UserRole)
                 size = self._getFileSize('%s%s' % (self.web, filename))
+=======
+                filename = item.data(QtCore.Qt.UserRole).toString()
+                size = self._getFileSize(join_url(self.baseurl, themes_dir, filename))
+>>>>>>> MERGE-SOURCE
                 self.max_progress += size
         if self.max_progress:
             # Add on 2 for plugins status setting plus a "finished" point.
+<<<<<<< TREE
             self.max_progress += 2
             self.progress_bar.setValue(0)
             self.progress_bar.setMinimum(0)
@@ -375,6 +507,17 @@
             self.progress_page.setTitle(translate('OpenLP.FirstTimeWizard', 'Setting Up And Downloading'))
             self.progress_page.setSubTitle(
                 translate('OpenLP.FirstTimeWizard', 'Please wait while OpenLP is set up and your data is downloaded.'))
+=======
+            self.max_progress += 2
+            self.progressBar.setValue(0)
+            self.progressBar.setMinimum(0)
+            self.progressBar.setMaximum(self.max_progress)
+            self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
+                'Setting Up And Downloading'))
+            self.progressPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
+                'Please wait while OpenLP is set up '
+                'and your data is downloaded.'))
+>>>>>>> MERGE-SOURCE
         else:
             self.progress_bar.setVisible(False)
             self.progress_page.setTitle(translate('OpenLP.FirstTimeWizard', 'Setting Up'))
@@ -429,9 +572,21 @@
         self._set_plugin_status(self.alert_check_box, 'alerts/status')
         if self.web_access:
             # Build directories for downloads
+<<<<<<< TREE
             songs_destination = os.path.join(gettempdir(), 'openlp')
             bibles_destination = AppLocation.get_section_data_path('bibles')
             themes_destination = AppLocation.get_section_data_path('themes')
+=======
+            songs_destination = os.path.join(
+                unicode(gettempdir(), get_filesystem_encoding()), u'openlp')
+            bibles_destination = AppLocation.get_section_data_path(u'bibles')
+            themes_destination = AppLocation.get_section_data_path(u'themes')
+            # Directory name appended to base download url as the name
+            # is found in download.cfg file.
+            songs_dir = unicode(self.config.get(u'songs', u'directory'), u'utf8')
+            bibles_dir = unicode(self.config.get(u'bibles', u'directory'), u'utf8')
+            themes_dir = unicode(self.config.get(u'themes', u'directory'), u'utf8')
+>>>>>>> MERGE-SOURCE
             # Download songs
             for i in range(self.songs_list_widget.count()):
                 item = self.songs_list_widget.item(i)
@@ -439,8 +594,15 @@
                     filename = item.data(QtCore.Qt.UserRole)
                     self._increment_progress_bar(self.downloading % filename, 0)
                     self.previous_size = 0
+<<<<<<< TREE
                     destination = os.path.join(songs_destination, str(filename))
                     self.url_get_file('%s%s' % (self.web, filename), destination)
+=======
+                    destination = os.path.join(songs_destination,
+                        unicode(filename))
+                    self.urlGetFile(join_url(self.baseurl, songs_dir, filename),
+                        destination)
+>>>>>>> MERGE-SOURCE
             # Download Bibles
             bibles_iterator = QtGui.QTreeWidgetItemIterator(
                 self.bibles_tree_widget)
@@ -450,7 +612,12 @@
                     bible = item.data(0, QtCore.Qt.UserRole)
                     self._increment_progress_bar(self.downloading % bible, 0)
                     self.previous_size = 0
+<<<<<<< TREE
                     self.url_get_file('%s%s' % (self.web, bible), os.path.join(bibles_destination, bible))
+=======
+                    self.urlGetFile(join_url(self.baseurl, bibles_dir, bible),
+                        os.path.join(bibles_destination, bible))
+>>>>>>> MERGE-SOURCE
                 bibles_iterator += 1
             # Download themes
             for i in range(self.themes_list_widget.count()):
@@ -459,7 +626,12 @@
                     theme = item.data(QtCore.Qt.UserRole)
                     self._increment_progress_bar(self.downloading % theme, 0)
                     self.previous_size = 0
+<<<<<<< TREE
                     self.url_get_file('%s%s' % (self.web, theme), os.path.join(themes_destination, theme))
+=======
+                    self.urlGetFile(join_url(self.baseurl, themes_dir, theme),
+                        os.path.join(themes_destination, theme))
+>>>>>>> MERGE-SOURCE
         # Set Default Display
         if self.display_combo_box.currentIndex() != -1:
             Settings().setValue('core/monitor', self.display_combo_box.currentIndex())

=== modified file 'openlp/core/ui/firsttimelanguagedialog.py'
--- openlp/core/ui/firsttimelanguagedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/firsttimelanguagedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/firsttimelanguageform.py'
--- openlp/core/ui/firsttimelanguageform.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/firsttimelanguageform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/firsttimewizard.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -38,9 +43,15 @@
 
 
 class FirstTimePage(object):
+<<<<<<< TREE
     """
     An enumeration class with each of the pages of the wizard.
     """
+=======
+    """
+    An enumeration object to make it easy for a developer to determine which page is which by index
+    """
+>>>>>>> MERGE-SOURCE
     Welcome = 0
     Plugins = 1
     NoInternet = 2

=== modified file 'openlp/core/ui/formattingtagdialog.py'
--- openlp/core/ui/formattingtagdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/formattingtagdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/formattingtagform.py'
--- openlp/core/ui/formattingtagform.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/formattingtagform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -84,6 +89,7 @@
         """
         Table Row selected so display items and set field state.
         """
+<<<<<<< TREE
         self.delete_button.setEnabled(True)
 
     def on_new_clicked(self):
@@ -127,10 +133,111 @@
                 QtGui.QMessageBox.warning(self, translate('OpenLP.FormattingTagForm', 'Validation Error'), error,
                                           QtGui.QMessageBox.Ok)
                 self.tag_table_widget.selectRow(count)
+=======
+        self.savePushButton.setEnabled(False)
+        self.selected = self.tagTableWidget.currentRow()
+        html = FormattingTags.get_html_tags()[self.selected]
+        self.descriptionLineEdit.setText(html[u'desc'])
+        self.tagLineEdit.setText(self._strip(html[u'start tag']))
+        self.startTagLineEdit.setText(html[u'start html'])
+        self.endTagLineEdit.setText(html[u'end html'])
+        if html[u'protected']:
+            self.descriptionLineEdit.setEnabled(False)
+            self.tagLineEdit.setEnabled(False)
+            self.startTagLineEdit.setEnabled(False)
+            self.endTagLineEdit.setEnabled(False)
+            self.deletePushButton.setEnabled(False)
+        else:
+            self.descriptionLineEdit.setEnabled(True)
+            self.tagLineEdit.setEnabled(True)
+            self.startTagLineEdit.setEnabled(True)
+            self.endTagLineEdit.setEnabled(True)
+            self.deletePushButton.setEnabled(True)
+
+    def onTextEdited(self, text):
+        """
+        Enable the ``savePushButton`` when any of the selected tag's properties
+        has been changed.
+        """
+        self.savePushButton.setEnabled(True)
+        self.savePushButton.setDefault(True)
+
+    def onNewClicked(self):
+        """
+        Add a new tag to list only if it is not a duplicate.
+        """
+        for html in FormattingTags.get_html_tags():
+            if self._strip(html[u'start tag']) == u'n':
+                critical_error_message_box(
+                    translate('OpenLP.FormattingTagForm', 'Update Error'),
+                    translate('OpenLP.FormattingTagForm',
+                    'Tag "n" already defined.'))
+>>>>>>> MERGE-SOURCE
                 return
+<<<<<<< TREE
             count += 1
         self.services.save_tags()
         QtGui.QDialog.accept(self)
+=======
+        # Add new tag to list
+        tag = {
+            u'desc': unicode(translate('OpenLP.FormattingTagForm', 'New Tag')),
+            u'start tag': u'{n}',
+            u'start html': unicode(translate('OpenLP.FormattingTagForm', '<HTML here>')),
+            u'end tag': u'{/n}',
+            u'end html': unicode(translate('OpenLP.FormattingTagForm', '</and here>')),
+            u'protected': False,
+            u'temporary': False
+        }
+        FormattingTags.add_html_tags([tag])
+        FormattingTags.save_html_tags()
+        self._reloadTable()
+        # Highlight new row
+        self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
+        self.onRowSelected()
+        self.tagTableWidget.scrollToBottom()
+        #self.savePushButton.setEnabled(False)
+
+    def onDeleteClicked(self):
+        """
+        Delete selected custom tag.
+        """
+        if self.selected != -1:
+            FormattingTags.remove_html_tag(self.selected)
+            # As the first items are protected we should not have to take care
+            # of negative indexes causing tracebacks.
+            self.tagTableWidget.selectRow(self.selected - 1)
+            self.selected = -1
+            FormattingTags.save_html_tags()
+            self._reloadTable()
+
+    def onSavedClicked(self):
+        """
+        Update Custom Tag details if not duplicate and save the data.
+        """
+        html_expands = FormattingTags.get_html_tags()
+        if self.selected != -1:
+            html = html_expands[self.selected]
+            tag = unicode(self.tagLineEdit.text())
+            for linenumber, html1 in enumerate(html_expands):
+                if self._strip(html1[u'start tag']) == tag and \
+                    linenumber != self.selected:
+                    critical_error_message_box(
+                        translate('OpenLP.FormattingTagForm', 'Update Error'),
+                        unicode(translate('OpenLP.FormattingTagForm',
+                        'Tag %s already defined.')) % tag)
+                    return
+            html[u'desc'] = unicode(self.descriptionLineEdit.text())
+            html[u'start html'] = unicode(self.startTagLineEdit.text())
+            html[u'end html'] = unicode(self.endTagLineEdit.text())
+            html[u'start tag'] = u'{%s}' % tag
+            html[u'end tag'] = u'{/%s}' % tag
+            # Keep temporary tags when the user changes one.
+            html[u'temporary'] = False
+            self.selected = -1
+        FormattingTags.save_html_tags()
+        self._reloadTable()
+>>>>>>> MERGE-SOURCE
 
     def _reloadTable(self):
         """

=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/generaltab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -75,6 +80,7 @@
         self.override_radio_button.setObjectName('override_radio_button')
         self.monitor_layout.addWidget(self.override_radio_button, 2, 0, 1, 5)
         # Custom position
+<<<<<<< TREE
         self.custom_x_label = QtGui.QLabel(self.monitor_group_box)
         self.custom_x_label.setObjectName('custom_x_label')
         self.monitor_layout.addWidget(self.custom_x_label, 3, 1)
@@ -106,6 +112,39 @@
         self.display_on_monitor_check = QtGui.QCheckBox(self.monitor_group_box)
         self.display_on_monitor_check.setObjectName('monitor_combo_box')
         self.monitor_layout.addWidget(self.display_on_monitor_check, 5, 0, 1, 5)
+=======
+        self.customXLabel = QtGui.QLabel(self.monitorGroupBox)
+        self.customXLabel.setObjectName(u'customXLabel')
+        self.monitorLayout.addWidget(self.customXLabel, 3, 1)
+        self.customXValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
+        self.customXValueEdit.setObjectName(u'customXValueEdit')
+        self.customXValueEdit.setRange(-9999, 9999)
+        self.monitorLayout.addWidget(self.customXValueEdit, 4, 1)
+        self.customYLabel = QtGui.QLabel(self.monitorGroupBox)
+        self.customYLabel.setObjectName(u'customYLabel')
+        self.monitorLayout.addWidget(self.customYLabel, 3, 2)
+        self.customYValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
+        self.customYValueEdit.setObjectName(u'customYValueEdit')
+        self.customYValueEdit.setRange(-9999, 9999)
+        self.monitorLayout.addWidget(self.customYValueEdit, 4, 2)
+        self.customWidthLabel = QtGui.QLabel(self.monitorGroupBox)
+        self.customWidthLabel.setObjectName(u'customWidthLabel')
+        self.monitorLayout.addWidget(self.customWidthLabel, 3, 3)
+        self.customWidthValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
+        self.customWidthValueEdit.setObjectName(u'customWidthValueEdit')
+        self.customWidthValueEdit.setRange(1, 9999)
+        self.monitorLayout.addWidget(self.customWidthValueEdit, 4, 3)
+        self.customHeightLabel = QtGui.QLabel(self.monitorGroupBox)
+        self.customHeightLabel.setObjectName(u'customHeightLabel')
+        self.monitorLayout.addWidget(self.customHeightLabel, 3, 4)
+        self.customHeightValueEdit = QtGui.QSpinBox(self.monitorGroupBox)
+        self.customHeightValueEdit.setObjectName(u'customHeightValueEdit')
+        self.customHeightValueEdit.setRange(1, 9999)
+        self.monitorLayout.addWidget(self.customHeightValueEdit, 4, 4)
+        self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox)
+        self.displayOnMonitorCheck.setObjectName(u'monitorComboBox')
+        self.monitorLayout.addWidget(self.displayOnMonitorCheck, 5, 0, 1, 5)
+>>>>>>> MERGE-SOURCE
         # Set up the stretchiness of each column, so that the first column
         # less stretchy (and therefore smaller) than the others
         self.monitor_layout.setColumnStretch(0, 1)

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/maindisplay.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -167,8 +172,10 @@
         """
         if enabled:
             self.setAutoFillBackground(False)
+            self.setStyleSheet("QGraphicsView {background: transparent; border: 0px;}")
         else:
             self.setAttribute(QtCore.Qt.WA_NoSystemBackground, False)
+            self.setStyleSheet("QGraphicsView {}")
         self.setAttribute(QtCore.Qt.WA_TranslucentBackground, enabled)
         self.repaint()
 
@@ -336,9 +343,15 @@
         """
         Generates a preview of the image displayed.
         """
+<<<<<<< TREE
         log.debug('preview for %s', self.is_live)
         was_visible = self.isVisible()
         self.application.process_events()
+=======
+        log.debug(u'preview for %s', self.isLive)
+        was_visible = self.isVisible()
+        Receiver.send_message(u'openlp_process_events')
+>>>>>>> MERGE-SOURCE
         # We must have a service item to preview.
         if self.is_live and hasattr(self, 'service_item'):
             # Wait for the fade to finish before geting the preview.
@@ -351,12 +364,20 @@
         while not self.web_loaded:
             self.application.process_events()
         # if was hidden keep it hidden
+<<<<<<< TREE
         if self.is_live:
             if self.hide_mode:
                 self.hide_display(self.hide_mode)
             # Only continue if the visibility wasn't changed during method call.
             elif was_visible == self.isVisible():
 
+=======
+        if self.isLive:
+            if self.hideMode:
+                self.hideDisplay(self.hideMode)
+            # Only continue if the visibility wasn't changed during method call.
+            elif was_visible == self.isVisible():
+>>>>>>> MERGE-SOURCE
                 # Single screen active
                 if self.screens.display_count == 1:
                     # Only make visible if setting enabled.

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2014-01-16 20:34:37 +0000
+++ openlp/core/ui/mainwindow.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -278,6 +283,7 @@
                                                      icon=':/system/system_settings.png', can_shortcuts=True, 
                                                      category=UiStrings().Settings)
         # Give QT Extra Hint that this is the Preferences Menu Item
+<<<<<<< TREE
         self.settings_configure_item.setMenuRole(QtGui.QAction.PreferencesRole)
         self.settings_import_item = create_action(main_window, 'settingsImportItem', 
                                                   category=UiStrings().Import, can_shortcuts=True)
@@ -287,6 +293,19 @@
         self.about_item = create_action(main_window, 'aboutItem', icon=':/system/system_about.png',
                                         can_shortcuts=True, category=UiStrings().Help, 
                                         triggers=self.on_about_item_clicked)
+=======
+        self.settingsConfigureItem.setMenuRole(QtGui.QAction.PreferencesRole)
+        self.settingsImportItem = create_action(mainWindow,
+           u'settingsImportItem', category=UiStrings().Import)
+        self.settingsExportItem = create_action(mainWindow,
+           u'settingsExportItem', category=UiStrings().Export)
+        action_list.add_category(unicode(UiStrings().Help),
+            CategoryOrder.standardMenu)
+        self.aboutItem = create_action(mainWindow, u'aboutItem',
+            icon=u':/system/system_about.png',
+            shortcuts=[QtGui.QKeySequence(u'Ctrl+F1')],
+            category=UiStrings().Help, triggers=self.onAboutItemClicked)
+>>>>>>> MERGE-SOURCE
         # Give QT Extra Hint that this is an About Menu Item
         self.about_item.setMenuRole(QtGui.QAction.AboutRole)
         if os.name == 'nt':

=== modified file 'openlp/core/ui/media/__init__.py'
--- openlp/core/ui/media/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/media/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/media/mediacontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -511,6 +516,7 @@
         ``msg``
             First element is the controller which should be used
         """
+<<<<<<< TREE
         log.debug('media_play_msg')
         self.media_play(msg[0], status)
 
@@ -547,6 +553,26 @@
             if controller.is_live:
                 if controller.hide_menu.defaultAction().isChecked():
                     controller.hide_menu.defaultAction().trigger()
+=======
+        log.debug(u'video_play')
+        controller = msg[0]
+        controller.seekSlider.blockSignals(True)
+        controller.volumeSlider.blockSignals(True)
+        for display in self.curDisplayMediaPlayer.keys():
+            if display.controller == controller:
+                if not self.curDisplayMediaPlayer[display].play(display):
+                    controller.seekSlider.blockSignals(False)
+                    controller.volumeSlider.blockSignals(False)
+                    return False
+                if status:
+                    if not controller.media_info.is_background:
+                        display.frame.evaluateJavaScript(u'show_blank("desktop");')
+                    self.curDisplayMediaPlayer[display].set_visible(display,
+                        True)
+                    if controller.isLive and not controller.media_info.is_background:
+                        if controller.hideMenu.defaultAction().isChecked():
+                            controller.hideMenu.defaultAction().trigger()
+>>>>>>> MERGE-SOURCE
         # Start Timer for ui updates
         if not self.timer.isActive():
             self.timer.start()

=== modified file 'openlp/core/ui/media/mediaplayer.py'
--- openlp/core/ui/media/mediaplayer.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/media/mediaplayer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/media/phononplayer.py'
--- openlp/core/ui/media/phononplayer.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/media/phononplayer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -79,6 +84,7 @@
         self.display_name = '&Phonon'
         self.parent = parent
         self.additional_extensions = ADDITIONAL_EXT
+<<<<<<< TREE
         mimetypes.init()
         for mime_type in Phonon.BackendCapabilities.availableMimeTypes():
             mime_type = str(mime_type)
@@ -86,6 +92,22 @@
                 self._addToList(self.audio_extensions_list, mime_type)
             elif mime_type.startswith('video/'):
                 self._addToList(self.video_extensions_list, mime_type)
+=======
+        try:
+            mimetypes.init()
+            for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
+                mimetype = unicode(mimetype)
+                if mimetype.startswith(u'audio/'):
+                    self._addToList(self.audio_extensions_list, mimetype)
+                elif mimetype.startswith(u'video/'):
+                    self._addToList(self.video_extensions_list, mimetype)
+        # Work around for http://bugs.python.org/issue9291
+        except UnicodeDecodeError:
+            log.exception(u'UnicodeDecodeError when trying to read mime types. '
+                'Setting extensions to all files')
+            self.audio_extensions_list = [u'*.*']
+            self.video_extensions_list = [u'*.*']
+>>>>>>> MERGE-SOURCE
 
     def _addToList(self, mimetype_list, mimetype):
         """

=== modified file 'openlp/core/ui/media/vendor/vlc.py'
--- openlp/core/ui/media/vendor/vlc.py	2013-08-31 18:17:38 +0000
+++ openlp/core/ui/media/vendor/vlc.py	2014-01-18 07:58:26 +0000
@@ -2,7 +2,7 @@
 
 # Python ctypes bindings for VLC
 #
-# Copyright (C) 2009-2012 the VideoLAN team
+# Copyright (C) 2009-2013 the VideoLAN team
 # $Id: $
 #
 # Authors: Olivier Aubert <olivier.aubert at liris.cnrs.fr>

=== modified file 'openlp/core/ui/media/vlcplayer.py'
--- openlp/core/ui/media/vlcplayer.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/media/vlcplayer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -71,6 +76,7 @@
 AUDIO_EXT = ['*.mp3', '*.wav', '*.wma', '*.ogg']
 
 VIDEO_EXT = [
+<<<<<<< TREE
     '*.3gp',
     '*.asf', '*.wmv',
     '*.au',
@@ -94,6 +100,32 @@
     '*.iso',
     '*.vob',
     '*.webm'
+=======
+    u'*.3gp',
+    u'*.asf', u'*.wmv',
+    u'*.au',
+    u'*.avi',
+    u'*.flv',
+    u'*.mov',
+    u'*.mp4', u'*.m4v',
+    u'*.ogm', u'*.ogv',
+    u'*.mkv', u'*.mka',
+    u'*.ts', u'*.mpg',
+    u'*.mpg', u'*.mp2',
+    u'*.nsc',
+    u'*.nsv',
+    u'*.nut',
+    u'*.ra', u'*.ram', u'*.rm', u'*.rv' ,u'*.rmbv',
+    u'*.a52', u'*.dts', u'*.aac', u'*.flac' ,u'*.dv', u'*.vid',
+    u'*.tta', u'*.tac',
+    u'*.ty',
+    u'*.dts',
+    u'*.xa',
+    u'*.iso',
+    u'*.vob',
+    u'*.webm',
+    u'*.divx'
+>>>>>>> MERGE-SOURCE
 ]
 
 

=== modified file 'openlp/core/ui/media/webkitplayer.py'
--- openlp/core/ui/media/webkitplayer.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/media/webkitplayer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -175,6 +180,7 @@
 """
 
 VIDEO_EXT = [
+<<<<<<< TREE
     '*.3gp',
     '*.3gpp',
     '*.3g2',
@@ -197,11 +203,41 @@
     '*.mpg', '*.wmv', '*.mpeg', '*.avi',
     '*.swf'
 ]
+=======
+        u'*.3gp',
+        u'*.3gpp',
+        u'*.3g2',
+        u'*.3gpp2',
+        u'*.aac',
+        u'*.flv',
+        u'*.f4a',
+        u'*.f4b',
+        u'*.f4p',
+        u'*.f4v',
+        u'*.mov',
+        u'*.m4a',
+        u'*.m4b',
+        u'*.m4p',
+        u'*.m4v',
+        u'*.mkv',
+        u'*.mp4',
+        u'*.ogv',
+        u'*.webm',
+        u'*.mpg', u'*.wmv',  u'*.mpeg', u'*.avi',
+        u'*.swf'
+    ]
+>>>>>>> MERGE-SOURCE
 
 AUDIO_EXT = [
+<<<<<<< TREE
     '*.mp3',
     '*.ogg'
 ]
+=======
+        u'*.mp3',
+        u'*.ogg'
+    ]
+>>>>>>> MERGE-SOURCE
 
 
 class WebkitPlayer(MediaPlayer):

=== modified file 'openlp/core/ui/mediadockmanager.py'
--- openlp/core/ui/mediadockmanager.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/mediadockmanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/plugindialog.py'
--- openlp/core/ui/plugindialog.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/plugindialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/pluginform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/printservicedialog.py'
--- openlp/core/ui/printservicedialog.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/printservicedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/printserviceform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/serviceitemeditdialog.py'
--- openlp/core/ui/serviceitemeditdialog.py	2013-12-24 15:55:01 +0000
+++ openlp/core/ui/serviceitemeditdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/serviceitemeditform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2014-01-04 16:33:20 +0000
+++ openlp/core/ui/servicemanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -504,11 +509,21 @@
         self.log_debug(temp_file_name)
         path_file_name = str(self.file_name())
         path, file_name = os.path.split(path_file_name)
+<<<<<<< TREE
         base_name = os.path.splitext(file_name)[0]
         service_file_name = '%s.osj' % base_name
         self.log_debug('ServiceManager.save_file - %s' % path_file_name)
         Settings().setValue(self.main_window.service_manager_settings_section + '/last directory', path)
         service = self.create_basic_service()
+=======
+        basename = os.path.splitext(file_name)[0]
+        service_file_name = '%s.osj' % basename
+        log.debug(u'ServiceManager.saveFile - %s', path_file_name)
+        SettingsManager.set_last_dir(
+            self.mainwindow.serviceManagerSettingsSection,
+            path)
+        service = []
+>>>>>>> MERGE-SOURCE
         write_list = []
         missing_list = []
         audio_files = []
@@ -559,9 +574,17 @@
         for file_item in write_list:
             file_size = os.path.getsize(file_item)
             total_size += file_size
+<<<<<<< TREE
         self.log_debug('ServiceManager.save_file - ZIP contents size is %i bytes' % total_size)
         service_content = json.dumps(service)
         # Usual Zip file cannot exceed 2GiB, file with Zip64 cannot be extracted using unzip in UNIX.
+=======
+        log.debug(u'ServiceManager.saveFile - ZIP contents size is %i bytes' %
+            total_size)
+        service_content = json.dumps(service)
+        # Usual Zip file cannot exceed 2GiB, file with Zip64 cannot be
+        # extracted using unzip in UNIX.
+>>>>>>> MERGE-SOURCE
         allow_zip_64 = (total_size > 2147483648 + len(service_content))
         self.log_debug('ServiceManager.save_file - allowZip64 is %s' % allow_zip_64)
         zip_file = None
@@ -740,6 +763,7 @@
                     critical_error_message_box(message=translate('OpenLP.ServiceManager',
                                                'File is not a valid service.\n The content encoding is not UTF-8.'))
                     continue
+<<<<<<< TREE
                 os_file = ucs_file.replace('/', os.path.sep)
                 if not os_file.startswith('audio'):
                     os_file = os.path.split(os_file)[1]
@@ -748,7 +772,18 @@
                 zip_file.extract(zip_info, self.service_path)
                 if os_file.endswith('osj') or os_file.endswith('osd'):
                     p_file = os.path.join(self.service_path, os_file)
+=======
+                osfile = ucsfile.replace(u'/', os.path.sep)
+                if not osfile.startswith(u'audio'):
+                    osfile = os.path.split(osfile)[1]
+                log.debug(u'Extract file: %s', osfile)
+                zipinfo.filename = osfile
+                zip.extract(zipinfo, self.servicePath)
+                if osfile.endswith(u'osd') or osfile.endswith(u'osj'):
+                    p_file = os.path.join(self.servicePath, osfile)
+>>>>>>> MERGE-SOURCE
             if 'p_file' in locals():
+<<<<<<< TREE
                 file_to = open(p_file, 'r')
                 if p_file.endswith('osj'):
                     items = json.load(file_to)
@@ -762,6 +797,32 @@
                 self.set_file_name(file_name)
                 self.main_window.display_progress_bar(len(items))
                 self.process_service_items(items)
+=======
+                Receiver.send_message(u'cursor_busy')
+                fileTo = open(p_file, u'r')
+                if p_file.endswith(u'osj'):
+                    items = json.load(fileTo)
+                else:
+                    items = cPickle.load(fileTo)
+                fileTo.close()
+                self.newFile()
+                self.mainwindow.displayProgressBar(len(items))
+                for item in items:
+                    self.mainwindow.incrementProgressBar()
+                    serviceItem = ServiceItem()
+                    serviceItem.renderer = self.mainwindow.renderer
+                    serviceItem.set_from_service(item, self.servicePath)
+                    self.validateItem(serviceItem)
+                    self.load_item_uuid = 0
+                    if serviceItem.is_capable(ItemCapabilities.OnLoadUpdate):
+                        Receiver.send_message(u'%s_service_load' %
+                            serviceItem.name.lower(), serviceItem)
+                    # if the item has been processed
+                    if serviceItem._uuid == self.load_item_uuid:
+                        serviceItem.edit_id = int(self.load_item_edit_id)
+                        serviceItem.temporary_edit = self.load_item_temporary
+                    self.addServiceItem(serviceItem, repaint=False)
+>>>>>>> MERGE-SOURCE
                 delete_file(p_file)
                 self.main_window.add_recent_file(file_name)
                 self.set_modified(False)
@@ -895,6 +956,7 @@
             if service_item['service_item'].theme is None:
                 theme_action = self.theme_menu.defaultAction()
             else:
+<<<<<<< TREE
                 theme_action = self.theme_menu.findChild(QtGui.QAction, service_item['service_item'].theme)
             if theme_action is not None:
                 theme_action.setChecked(True)
@@ -913,6 +975,25 @@
             self.set_modified()
 
     def on_start_time_form(self, field=None):
+=======
+                themeAction = self.themeMenu.findChild(
+                    QtGui.QAction, serviceItem[u'service_item'].theme)
+            if themeAction is not None:
+                themeAction.setChecked(True)
+        self.menu.exec_(self.serviceManagerList.mapToGlobal(point))
+
+    def onServiceItemNoteForm(self):
+        item = self.findServiceItem()[0]
+        self.serviceNoteForm.textEdit.setPlainText(
+            self.serviceItems[item][u'service_item'].notes)
+        if self.serviceNoteForm.exec_():
+            self.serviceItems[item][u'service_item'].notes = \
+                unicode(self.serviceNoteForm.textEdit.toPlainText())
+            self.repaintServiceList(item, -1)
+            self.setModified()
+
+    def onStartTimeForm(self):
+>>>>>>> MERGE-SOURCE
         """
         Opens a dialog to type in service item notes.
         :param field:

=== modified file 'openlp/core/ui/servicenoteform.py'
--- openlp/core/ui/servicenoteform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/servicenoteform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/settingsdialog.py'
--- openlp/core/ui/settingsdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/settingsdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py	2013-12-31 20:29:03 +0000
+++ openlp/core/ui/settingsform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/shortcutlistdialog.py'
--- openlp/core/ui/shortcutlistdialog.py	2013-12-24 20:45:29 +0000
+++ openlp/core/ui/shortcutlistdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/shortcutlistform.py'
--- openlp/core/ui/shortcutlistform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/shortcutlistform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -72,8 +77,14 @@
         """
         if event.key() == QtCore.Qt.Key_Space:
             self.keyReleaseEvent(event)
+<<<<<<< TREE
         elif self.primary_push_button.isChecked() or self.alternate_push_button.isChecked():
             self.keyReleaseEvent(event)
+=======
+        elif self.primaryPushButton.isChecked() or \
+            self.alternatePushButton.isChecked():
+            self.keyReleaseEvent(event)
+>>>>>>> MERGE-SOURCE
         elif event.key() == QtCore.Qt.Key_Escape:
             event.accept()
             self.close()

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2014-01-04 11:50:27 +0000
+++ openlp/core/ui/slidecontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -42,6 +47,7 @@
 from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
 from openlp.core.lib.ui import create_action
 from openlp.core.utils.actions import ActionList, CategoryOrder
+<<<<<<< TREE
 from openlp.core.ui.listpreviewwidget import ListPreviewWidget
 
 # Threshold which has to be trespassed to toggle.
@@ -83,6 +89,26 @@
     Controller is a general display controller widget.
     """
     def __init__(self, parent):
+=======
+
+log = logging.getLogger(__name__)
+
+
+class SlideList(QtGui.QTableWidget):
+    """
+    Customised version of QTableWidget which can respond to keyboard
+    events.
+    """
+    def __init__(self, parent=None):
+        QtGui.QTableWidget.__init__(self, parent.controller)
+
+
+class Controller(QtGui.QWidget):
+    """
+    Controller is a general controller widget.
+    """
+    def __init__(self, parent, isLive=False):
+>>>>>>> MERGE-SOURCE
         """
         Set up the general Controller.
         """
@@ -129,6 +155,20 @@
             self.ratio = self.screens.current['size'].width() / self.screens.current['size'].height()
         except ZeroDivisionError:
             self.ratio = 1
+<<<<<<< TREE
+=======
+        self.imageManager = self.parent().imageManager
+        self.mediaController = self.parent().mediaController
+        self.loopList = [
+            u'playSlidesMenu',
+            u'loopSeparator',
+            u'delaySpinBox'
+        ]
+        self.audioList = [
+            u'audioPauseItem',
+            u'audioTimeLabel'
+        ]
+>>>>>>> MERGE-SOURCE
         self.timer_id = 0
         self.song_edit = False
         self.selected_row = 0
@@ -280,6 +320,7 @@
             self.audio_pause_item = self.toolbar.add_toolbar_action('audioPauseItem',
                 icon=':/slides/media_playback_pause.png', text=translate('OpenLP.SlideController', 'Pause Audio'),
                 tooltip=translate('OpenLP.SlideController', 'Pause audio.'),
+<<<<<<< TREE
                 checked=False, visible=False, category=self.category, context=QtCore.Qt.WindowShortcut,
                 can_shortcuts=True, triggers=self.set_audio_pause_clicked)
             self.audio_menu = QtGui.QMenu(translate('OpenLP.SlideController', 'Background Audio'), self.toolbar)
@@ -302,6 +343,42 @@
             self.toolbar.add_toolbar_widget(self.audio_time_label)
             self.toolbar.set_widget_visible(AUDIO_LIST, False)
             self.toolbar.set_widget_visible(['song_menu'], False)
+=======
+                checked=False, visible=False, category=self.category,
+                context=QtCore.Qt.WindowShortcut,
+                shortcuts=[], triggers=self.onAudioPauseClicked)
+            self.audioMenu = QtGui.QMenu(
+                translate('OpenLP.SlideController', 'Background Audio'), self.toolbar)
+            self.audioPauseItem.setMenu(self.audioMenu)
+            self.audioPauseItem.setParent(self.toolbar)
+            self.toolbar.widgetForAction(self.audioPauseItem).setPopupMode(
+                QtGui.QToolButton.MenuButtonPopup)
+            self.nextTrackItem = create_action(self, u'nextTrackItem',
+                text=UiStrings().NextTrack,
+                icon=u':/slides/media_playback_next.png', tooltip=translate(
+                'OpenLP.SlideController', 'Go to next audio track.'),
+                category=self.category,
+                shortcuts=[], triggers=self.onNextTrackClicked)
+            self.audioMenu.addAction(self.nextTrackItem)
+            self.trackMenu = self.audioMenu.addMenu(
+                translate('OpenLP.SlideController', 'Tracks'))
+            self.audioTimeLabel = QtGui.QLabel(u' 00:00 ', self.toolbar)
+            self.audioTimeLabel.setAlignment(
+                QtCore.Qt.AlignCenter|QtCore.Qt.AlignHCenter)
+            self.audioTimeLabel.setStyleSheet(
+                u'background-color: palette(background); '
+                u'border-top-color: palette(shadow); '
+                u'border-left-color: palette(shadow); '
+                u'border-bottom-color: palette(light); '
+                u'border-right-color: palette(light); '
+                u'border-radius: 3px; border-style: inset; '
+                u'border-width: 1; font-family: monospace; margin: 2px;'
+            )
+            self.audioTimeLabel.setObjectName(u'audioTimeLabel')
+            self.toolbar.addToolbarWidget(self.audioTimeLabel)
+            self.toolbar.setWidgetVisible(self.audioList, False)
+            self.toolbar.setWidgetVisible([u'songMenu'], False)
+>>>>>>> MERGE-SOURCE
         # Screen preview area
         self.preview_frame = QtGui.QFrame(self.splitter)
         self.preview_frame.setGeometry(QtCore.QRect(0, 0, 300, 300 * self.ratio))
@@ -362,6 +439,7 @@
                                                       triggers=self._slide_shortcut_activated) for s in shortcuts])
             self.shortcut_timer.timeout.connect(self._slide_shortcut_activated)
         # Signals
+<<<<<<< TREE
         self.preview_widget.itemSelectionChanged.connect(self.on_slide_selected)
         if self.is_live:
             # Need to use event as called across threads and UI is updated
@@ -388,6 +466,55 @@
                                self.on_slide_selected_next)
         QtCore.QObject.connect(self, QtCore.SIGNAL('slidecontroller_%s_previous' % self.type_prefix),
                                self.on_slide_selected_previous)
+=======
+        QtCore.QObject.connect(self.previewListWidget,
+            QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSlideSelected)
+        QtCore.QObject.connect(self.previewListWidget.verticalHeader(),
+            QtCore.SIGNAL(u'sectionClicked(int)'), self.onSlideSelected)
+        if self.isLive:
+            QtCore.QObject.connect(Receiver.get_receiver(),
+                QtCore.SIGNAL(u'slidecontroller_live_spin_delay'),
+                self.receiveSpinDelay)
+            QtCore.QObject.connect(Receiver.get_receiver(),
+                QtCore.SIGNAL(u'slidecontroller_toggle_display'),
+                self.toggleDisplay)
+            self.toolbar.setWidgetVisible(self.loopList, False)
+        else:
+            QtCore.QObject.connect(self.previewListWidget,
+                QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
+                self.onGoLiveClick)
+            self.toolbar.setWidgetVisible([u'editSong'], False)
+        if self.isLive:
+            self.setLiveHotkeys(self)
+            self.__addActionsToWidget(self.previewListWidget)
+        else:
+            self.previewListWidget.addActions(
+                [self.nextItem, self.previousItem])
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_stop_loop' % self.typePrefix),
+            self.onStopLoop)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_next' % self.typePrefix),
+            self.onSlideSelectedNext)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_previous' % self.typePrefix),
+            self.onSlideSelectedPrevious)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_change' % self.typePrefix),
+            self.onSlideChange)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_set' % self.typePrefix),
+            self.onSlideSelectedIndex)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_blank' % self.typePrefix),
+            self.onSlideBlank)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_%s_unblank' % self.typePrefix),
+            self.onSlideUnblank)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_update_slide_limits'),
+            self.updateSlideLimits)
+>>>>>>> MERGE-SOURCE
 
     def _slide_shortcut_activated(self):
         """
@@ -474,7 +601,12 @@
         If you press ESC on the live screen it should close the display temporarily.
         """
         self.display.setVisible(False)
+<<<<<<< TREE
         self.media_controller.media_stop(self)
+=======
+        self.mediaController.video_stop([self])
+        self.onPlaySlidesLoop(False)
+>>>>>>> MERGE-SOURCE
 
     def toggle_display(self, action):
         """
@@ -658,19 +790,35 @@
         # See bug #791050
         self.toolbar.hide()
         self.mediabar.hide()
+<<<<<<< TREE
         self.song_menu.hide()
         self.toolbar.set_widget_visible(LOOP_LIST, False)
         self.toolbar.set_widget_visible(['song_menu'], False)
+=======
+        self.songMenu.hide()
+        self.toolbar.setWidgetVisible([u'songMenu'], False)
+        self.toolbar.setWidgetVisible(self.loopList, False)
+>>>>>>> MERGE-SOURCE
         # Reset the button
         self.play_slides_once.setChecked(False)
         self.play_slides_once.setIcon(build_icon(':/media/media_time.png'))
         self.play_slides_loop.setChecked(False)
         self.play_slides_loop.setIcon(build_icon(':/media/media_time.png'))
         if item.is_text():
+<<<<<<< TREE
             if Settings().value(self.main_window.songs_settings_section + '/display songbar') and self.slide_list:
                 self.toolbar.set_widget_visible(['song_menu'], True)
         if item.is_capable(ItemCapabilities.CanLoop) and len(item.get_frames()) > 1:
             self.toolbar.set_widget_visible(LOOP_LIST)
+=======
+            if Settings().value(
+                self.parent().songsSettingsSection + u'/display songbar',
+                QtCore.QVariant(True)).toBool() and self.slideList:
+                self.toolbar.setWidgetVisible([u'songMenu'], True)
+        if item.is_capable(ItemCapabilities.CanLoop) and \
+            len(item.get_frames()) > 1:
+            self.toolbar.setWidgetVisible(self.loopList)
+>>>>>>> MERGE-SOURCE
         if item.is_media():
             self.mediabar.show()
         self.previous_item.setVisible(not item.is_media())
@@ -975,7 +1123,11 @@
             else:
                 Registry().execute('live_display_show')
 
+<<<<<<< TREE
     def on_slide_selected(self, field=None):
+=======
+    def onSlideSelected(self, index):
+>>>>>>> MERGE-SOURCE
         """
         Slide selected in controller
         Note for some reason a dummy field is required.  Nothing is passed!

=== modified file 'openlp/core/ui/splashscreen.py'
--- openlp/core/ui/splashscreen.py	2013-12-24 08:56:50 +0000
+++ openlp/core/ui/splashscreen.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/starttimedialog.py'
--- openlp/core/ui/starttimedialog.py	2013-12-24 20:45:29 +0000
+++ openlp/core/ui/starttimedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/starttimeform.py'
--- openlp/core/ui/starttimeform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/starttimeform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/themeform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -38,8 +43,13 @@
 from openlp.core.lib.theme import BackgroundType, BackgroundGradientType
 from openlp.core.lib.ui import critical_error_message_box
 from openlp.core.ui import ThemeLayoutForm
+<<<<<<< TREE
 from openlp.core.utils import get_images_filter, is_not_image_file
 from .themewizard import Ui_ThemeWizard
+=======
+from openlp.core.utils import get_images_filter, is_not_image_file
+from themewizard import Ui_ThemeWizard
+>>>>>>> MERGE-SOURCE
 
 log = logging.getLogger(__name__)
 
@@ -61,6 +71,7 @@
         super(ThemeForm, self).__init__(parent)
         self.setupUi(self)
         self.registerFields()
+<<<<<<< TREE
         self.update_theme_allowed = True
         self.temp_background_filename = ''
         self.theme_layout_form = ThemeLayoutForm(self)
@@ -90,6 +101,70 @@
         self.main_font_combo_box.activated.connect(self.calculate_lines)
         self.footer_font_combo_box.activated.connect(self.update_theme)
         self.footer_size_spin_box.valueChanged.connect(self.update_theme)
+=======
+        self.updateThemeAllowed = True
+        self.temp_background_filename = u''
+        self.themeLayoutForm = ThemeLayoutForm(self)
+        QtCore.QObject.connect(self.backgroundComboBox,
+            QtCore.SIGNAL(u'currentIndexChanged(int)'),
+            self.onBackgroundComboBoxCurrentIndexChanged)
+        QtCore.QObject.connect(self.gradientComboBox,
+            QtCore.SIGNAL(u'currentIndexChanged(int)'),
+            self.onGradientComboBoxCurrentIndexChanged)
+        QtCore.QObject.connect(self.colorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onColorButtonClicked)
+        QtCore.QObject.connect(self.imageColorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onImageColorButtonClicked)
+        QtCore.QObject.connect(self.gradientStartButton,
+            QtCore.SIGNAL(u'clicked()'), self.onGradientStartButtonClicked)
+        QtCore.QObject.connect(self.gradientEndButton,
+            QtCore.SIGNAL(u'clicked()'), self.onGradientEndButtonClicked)
+        QtCore.QObject.connect(self.imageBrowseButton,
+            QtCore.SIGNAL(u'clicked()'), self.onImageBrowseButtonClicked)
+        QtCore.QObject.connect(self.imageFileEdit,
+            QtCore.SIGNAL(u'editingFinished()'), self.onImageFileEditEditingFinished)
+        QtCore.QObject.connect(self.mainColorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onMainColorButtonClicked)
+        QtCore.QObject.connect(self.outlineColorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onOutlineColorButtonClicked)
+        QtCore.QObject.connect(self.shadowColorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onShadowColorButtonClicked)
+        QtCore.QObject.connect(self.outlineCheckBox,
+            QtCore.SIGNAL(u'stateChanged(int)'),
+            self.onOutlineCheckCheckBoxStateChanged)
+        QtCore.QObject.connect(self.shadowCheckBox,
+            QtCore.SIGNAL(u'stateChanged(int)'),
+            self.onShadowCheckCheckBoxStateChanged)
+        QtCore.QObject.connect(self.footerColorButton,
+            QtCore.SIGNAL(u'clicked()'), self.onFooterColorButtonClicked)
+        QtCore.QObject.connect(self,
+            QtCore.SIGNAL(u'customButtonClicked(int)'),
+            self.onCustom1ButtonClicked)
+        QtCore.QObject.connect(self.mainPositionCheckBox,
+            QtCore.SIGNAL(u'stateChanged(int)'),
+            self.onMainPositionCheckBoxStateChanged)
+        QtCore.QObject.connect(self.footerPositionCheckBox,
+            QtCore.SIGNAL(u'stateChanged(int)'),
+            self.onFooterPositionCheckBoxStateChanged)
+        QtCore.QObject.connect(self,
+            QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'theme_line_count'), self.updateLinesText)
+        QtCore.QObject.connect(self.mainSizeSpinBox,
+            QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
+        QtCore.QObject.connect(self.lineSpacingSpinBox,
+            QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
+        QtCore.QObject.connect(self.outlineSizeSpinBox,
+            QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
+        QtCore.QObject.connect(self.shadowSizeSpinBox,
+            QtCore.SIGNAL(u'valueChanged(int)'), self.calculateLines)
+        QtCore.QObject.connect(self.mainFontComboBox,
+            QtCore.SIGNAL(u'activated(int)'), self.calculateLines)
+        QtCore.QObject.connect(self.footerFontComboBox,
+            QtCore.SIGNAL(u'activated(int)'), self.updateTheme)
+        QtCore.QObject.connect(self.footerSizeSpinBox,
+            QtCore.SIGNAL(u'valueChanged(int)'), self.updateTheme)
+>>>>>>> MERGE-SOURCE
 
     def setDefaults(self):
         """
@@ -177,11 +252,21 @@
         Validate the current page
         """
         background_image = BackgroundType.to_string(BackgroundType.Image)
+<<<<<<< TREE
         if self.page(self.currentId()) == self.background_page and \
                 self.theme.background_type == background_image and is_not_image_file(self.theme.background_filename):
             QtGui.QMessageBox.critical(self, translate('OpenLP.ThemeWizard', 'Background Image Empty'),
                                        translate('OpenLP.ThemeWizard', '_you have not selected a '
                                        'background image. Please select one before continuing.'))
+=======
+        if self.page(self.currentId()) == self.backgroundPage and \
+            self.theme.background_type == background_image and \
+            is_not_image_file(self.theme.background_filename):
+            QtGui.QMessageBox.critical(self,
+                translate('OpenLP.ThemeWizard', 'Background Image Empty'),
+                translate('OpenLP.ThemeWizard', 'You have not selected a '
+                    'background image. Please select one before continuing.'))
+>>>>>>> MERGE-SOURCE
             return False
         else:
             return True
@@ -433,10 +518,19 @@
         Background Image button pushed.
         """
         images_filter = get_images_filter()
+<<<<<<< TREE
         images_filter = '%s;;%s (*.*) (*)' % (images_filter, UiStrings().AllFiles)
         filename = QtGui.QFileDialog.getOpenFileName(self, translate('OpenLP.ThemeWizard', 'Select Image'), '',
                                                      images_filter)
+=======
+        images_filter = u'%s;;%s (*.*)' % (
+            images_filter, UiStrings().AllFiles)
+        filename = QtGui.QFileDialog.getOpenFileName(self,
+            translate('OpenLP.ThemeWizard', 'Select Image'), u'',
+            images_filter)
+>>>>>>> MERGE-SOURCE
         if filename:
+<<<<<<< TREE
             self.theme.background_filename = str(filename)
         self.set_background_page_values()
 
@@ -475,6 +569,38 @@
         self.set_footer_area_page_values()
 
     def update_theme(self):
+=======
+            self.theme.background_filename = unicode(filename)
+        self.setBackgroundPageValues()
+
+    def onImageFileEditEditingFinished(self):
+        """
+        Background image path edited
+        """
+        self.theme.background_filename = unicode(self.imageFileEdit.text())
+
+    def onMainColorButtonClicked(self):
+        self.theme.font_main_color = \
+            self._colorButton(self.theme.font_main_color)
+        self.setMainAreaPageValues()
+
+    def onOutlineColorButtonClicked(self):
+        self.theme.font_main_outline_color = \
+            self._colorButton(self.theme.font_main_outline_color)
+        self.setMainAreaPageValues()
+
+    def onShadowColorButtonClicked(self):
+        self.theme.font_main_shadow_color = \
+            self._colorButton(self.theme.font_main_shadow_color)
+        self.setMainAreaPageValues()
+
+    def onFooterColorButtonClicked(self):
+        self.theme.font_footer_color = \
+            self._colorButton(self.theme.font_footer_color)
+        self.setFooterAreaPageValues()
+
+    def updateTheme(self):
+>>>>>>> MERGE-SOURCE
         """
         Update the theme object from the UI for fields not already updated
         when the are changed.

=== modified file 'openlp/core/ui/themelayoutdialog.py'
--- openlp/core/ui/themelayoutdialog.py	2013-12-26 17:36:00 +0000
+++ openlp/core/ui/themelayoutdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/themelayoutform.py'
--- openlp/core/ui/themelayoutform.py	2013-12-26 17:36:00 +0000
+++ openlp/core/ui/themelayoutform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2014-01-01 09:33:07 +0000
+++ openlp/core/ui/thememanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -36,12 +41,24 @@
 from xml.etree.ElementTree import ElementTree, XML
 from PyQt4 import QtCore, QtGui
 
+<<<<<<< TREE
 from openlp.core.common import Registry, AppLocation, Settings, OpenLPMixin, RegistryMixin, check_directory_exists, \
     UiStrings, translate
 from openlp.core.lib import FileDialog, ImageSource, OpenLPToolbar, get_text_file_string, build_icon, \
     check_item_selected, create_thumb, validate_thumb
 from openlp.core.lib.theme import ThemeXML, BackgroundType
 from openlp.core.lib.ui import critical_error_message_box, create_widget_action
+=======
+from openlp.core.lib import FileDialog, OpenLPToolbar, get_text_file_string, build_icon, \
+    Receiver, SettingsManager, translate, check_item_selected, \
+    check_directory_exists, create_thumb, validate_thumb, ImageSource
+from openlp.core.lib.theme import ThemeXML, BackgroundType, VerticalType, \
+    BackgroundGradientType
+from openlp.core.lib.settings import Settings
+from openlp.core.lib.ui import UiStrings, critical_error_message_box, \
+    create_widget_action
+from openlp.core.theme import Theme
+>>>>>>> MERGE-SOURCE
 from openlp.core.ui import FileRenameForm, ThemeForm
 from openlp.core.utils import delete_file, get_locale_key, get_filesystem_encoding
 
@@ -408,6 +425,7 @@
                     theme_zip.close()
         self.application.set_normal_cursor()
 
+<<<<<<< TREE
     def on_import_theme(self, field=None):
         """
         Opens a file dialog to select the theme file(s) to import before attempting to extract OpenLP themes from
@@ -419,6 +437,20 @@
                                             Settings().value(self.settings_section + '/last directory import'),
                                             translate('OpenLP.ThemeManager', 'OpenLP Themes (*.theme *.otz)'))
         self.log_info('New Themes %s' % str(files))
+=======
+    def onImportTheme(self):
+        """
+        Opens a file dialog to select the theme file(s) to import before
+        attempting to extract OpenLP themes from those files. This process
+        will load both OpenLP version 1 and version 2 themes.
+        """
+        files = FileDialog.getOpenFileNames(self,
+            translate('OpenLP.ThemeManager', 'Select Theme Import File'),
+            SettingsManager.get_last_dir(self.settingsSection),
+            unicode(translate('OpenLP.ThemeManager',
+            'OpenLP Themes (*.theme *.otz)')))
+        log.info(u'New Themes %s', unicode(files))
+>>>>>>> MERGE-SOURCE
         if not files:
             return
         self.application.set_busy_cursor()

=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/themestab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/ui/themewizard.py'
--- openlp/core/ui/themewizard.py	2013-12-26 17:36:00 +0000
+++ openlp/core/ui/themewizard.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -138,6 +143,7 @@
         self.background_layout.addLayout(self.background_stack)
         themeWizard.addPage(self.background_page)
         # Main Area Page
+<<<<<<< TREE
         self.main_area_page = QtGui.QWizardPage()
         self.main_area_page.setObjectName('main_area_page')
         self.main_area_layout = QtGui.QFormLayout(self.main_area_page)
@@ -218,6 +224,90 @@
         self.shadow_layout.addWidget(self.shadow_size_spin_box)
         self.main_area_layout.addRow(self.shadow_check_box, self.shadow_layout)
         themeWizard.addPage(self.main_area_page)
+=======
+        self.mainAreaPage = QtGui.QWizardPage()
+        self.mainAreaPage.setObjectName(u'MainAreaPage')
+        self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage)
+        self.mainAreaLayout.setObjectName(u'MainAreaLayout')
+        self.mainFontLabel = QtGui.QLabel(self.mainAreaPage)
+        self.mainFontLabel.setObjectName(u'MainFontLabel')
+        self.mainFontComboBox = QtGui.QFontComboBox(self.mainAreaPage)
+        self.mainFontComboBox.setObjectName(u'MainFontComboBox')
+        self.mainAreaLayout.addRow(self.mainFontLabel, self.mainFontComboBox)
+        self.mainColorLabel = QtGui.QLabel(self.mainAreaPage)
+        self.mainColorLabel.setObjectName(u'MainColorLabel')
+        self.mainPropertiesLayout = QtGui.QHBoxLayout()
+        self.mainPropertiesLayout.setObjectName(u'MainPropertiesLayout')
+        self.mainColorButton = QtGui.QPushButton(self.mainAreaPage)
+        self.mainColorButton.setObjectName(u'MainColorButton')
+        self.mainPropertiesLayout.addWidget(self.mainColorButton)
+        self.mainPropertiesLayout.addSpacing(20)
+        self.mainBoldCheckBox = QtGui.QCheckBox(self.mainAreaPage)
+        self.mainBoldCheckBox.setObjectName(u'MainBoldCheckBox')
+        self.mainPropertiesLayout.addWidget(self.mainBoldCheckBox)
+        self.mainPropertiesLayout.addSpacing(20)
+        self.mainItalicsCheckBox = QtGui.QCheckBox(self.mainAreaPage)
+        self.mainItalicsCheckBox.setObjectName(u'MainItalicsCheckBox')
+        self.mainPropertiesLayout.addWidget(self.mainItalicsCheckBox)
+        self.mainAreaLayout.addRow(self.mainColorLabel,
+            self.mainPropertiesLayout)
+        self.mainSizeLabel = QtGui.QLabel(self.mainAreaPage)
+        self.mainSizeLabel.setObjectName(u'MainSizeLabel')
+        self.mainSizeLayout = QtGui.QHBoxLayout()
+        self.mainSizeLayout.setObjectName(u'MainSizeLayout')
+        self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
+        self.mainSizeSpinBox.setMaximum(999)
+        self.mainSizeSpinBox.setValue(16)
+        self.mainSizeSpinBox.setObjectName(u'MainSizeSpinBox')
+        self.mainSizeLayout.addWidget(self.mainSizeSpinBox)
+        self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage)
+        self.mainLineCountLabel.setObjectName(u'MainLineCountLabel')
+        self.mainSizeLayout.addWidget(self.mainLineCountLabel)
+        self.mainAreaLayout.addRow(self.mainSizeLabel, self.mainSizeLayout)
+        self.lineSpacingLabel = QtGui.QLabel(self.mainAreaPage)
+        self.lineSpacingLabel.setObjectName(u'LineSpacingLabel')
+        self.lineSpacingSpinBox = QtGui.QSpinBox(self.mainAreaPage)
+        self.lineSpacingSpinBox.setMinimum(-250)
+        self.lineSpacingSpinBox.setMaximum(250)
+        self.lineSpacingSpinBox.setObjectName(u'LineSpacingSpinBox')
+        self.mainAreaLayout.addRow(self.lineSpacingLabel,
+            self.lineSpacingSpinBox)
+        self.outlineCheckBox = QtGui.QCheckBox(self.mainAreaPage)
+        self.outlineCheckBox.setObjectName(u'OutlineCheckBox')
+        self.outlineLayout = QtGui.QHBoxLayout()
+        self.outlineLayout.setObjectName(u'OutlineLayout')
+        self.outlineColorButton = QtGui.QPushButton(self.mainAreaPage)
+        self.outlineColorButton.setEnabled(False)
+        self.outlineColorButton.setObjectName(u'OutlineColorButton')
+        self.outlineLayout.addWidget(self.outlineColorButton)
+        self.outlineLayout.addSpacing(20)
+        self.outlineSizeLabel = QtGui.QLabel(self.mainAreaPage)
+        self.outlineSizeLabel.setObjectName(u'OutlineSizeLabel')
+        self.outlineLayout.addWidget(self.outlineSizeLabel)
+        self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
+        self.outlineSizeSpinBox.setEnabled(False)
+        self.outlineSizeSpinBox.setObjectName(u'OutlineSizeSpinBox')
+        self.outlineLayout.addWidget(self.outlineSizeSpinBox)
+        self.mainAreaLayout.addRow(self.outlineCheckBox, self.outlineLayout)
+        self.shadowCheckBox = QtGui.QCheckBox(self.mainAreaPage)
+        self.shadowCheckBox.setObjectName(u'ShadowCheckBox')
+        self.shadowLayout = QtGui.QHBoxLayout()
+        self.shadowLayout.setObjectName(u'ShadowLayout')
+        self.shadowColorButton = QtGui.QPushButton(self.mainAreaPage)
+        self.shadowColorButton.setEnabled(False)
+        self.shadowColorButton.setObjectName(u'shadowColorButton')
+        self.shadowLayout.addWidget(self.shadowColorButton)
+        self.shadowLayout.addSpacing(20)
+        self.shadowSizeLabel = QtGui.QLabel(self.mainAreaPage)
+        self.shadowSizeLabel.setObjectName(u'ShadowSizeLabel')
+        self.shadowLayout.addWidget(self.shadowSizeLabel)
+        self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
+        self.shadowSizeSpinBox.setEnabled(False)
+        self.shadowSizeSpinBox.setObjectName(u'ShadowSizeSpinBox')
+        self.shadowLayout.addWidget(self.shadowSizeSpinBox)
+        self.mainAreaLayout.addRow(self.shadowCheckBox, self.shadowLayout)
+        themeWizard.addPage(self.mainAreaPage)
+>>>>>>> MERGE-SOURCE
         # Footer Area Page
         self.footer_area_page = QtGui.QWizardPage()
         self.footer_area_page.setObjectName('footer_area_page')

=== modified file 'openlp/core/ui/wizard.py'
--- openlp/core/ui/wizard.py	2013-12-28 21:33:38 +0000
+++ openlp/core/ui/wizard.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/utils/__init__.py'
--- openlp/core/utils/__init__.py	2013-12-28 21:33:38 +0000
+++ openlp/core/utils/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -37,10 +42,18 @@
 import re
 from subprocess import Popen, PIPE
 import sys
+<<<<<<< TREE
 import urllib.request
 import urllib.error
 import urllib.parse
 from random import randint
+=======
+import urllib2
+import urlparse
+from random import randint
+
+from openlp.core.lib.settings import Settings
+>>>>>>> MERGE-SOURCE
 
 from PyQt4 import QtGui, QtCore
 
@@ -63,6 +76,7 @@
 UNO_CONNECTION_TYPE = 'pipe'
 CONTROL_CHARS = re.compile(r'[\x00-\x1F\x7F-\x9F]', re.UNICODE)
 INVALID_FILE_CHARS = re.compile(r'[\\/:\*\?"<>\|\+\[\]%]', re.UNICODE)
+<<<<<<< TREE
 DIGITS_OR_NONDIGITS = re.compile(r'\d+|\D+', re.UNICODE)
 USER_AGENTS = {
     'win32': [
@@ -85,6 +99,29 @@
     ]
 }
 
+=======
+USER_AGENTS = {
+    u'win32': [
+        'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36',
+        'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36',
+        'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36'
+    ],
+    u'darwin': [
+        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31',
+        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11',
+        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11'
+    ],
+    u'linux2': [
+        'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22',
+        'Mozilla/5.0 (X11; CrOS armv7l 2913.260.0) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.99 Safari/537.11',
+        'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.27 (KHTML, like Gecko) Chrome/26.0.1389.0 Safari/537.27'
+    ],
+    u'default': [
+        'Mozilla/5.0 (X11; NetBSD amd64; rv:18.0) Gecko/20130120 Firefox/18.0'
+    ]
+}
+
+>>>>>>> MERGE-SOURCE
 
 class VersionThread(QtCore.QThread):
     """
@@ -99,8 +136,138 @@
         log.debug('Version thread - run')
         app_version = get_application_version()
         version = check_latest_version(app_version)
+<<<<<<< TREE
         if LooseVersion(str(version)) > LooseVersion(str(app_version['full'])):
             Registry().execute('openlp_version_check', '%s' % version)
+=======
+        if LooseVersion(str(version)) > LooseVersion(str(app_version[u'full'])):
+            Receiver.send_message(u'openlp_version_check', u'%s' % version)
+
+
+class AppLocation(object):
+    """
+    The :class:`AppLocation` class is a static class which retrieves a
+    directory based on the directory type.
+    """
+    AppDir = 1
+    ConfigDir = 2
+    DataDir = 3
+    PluginsDir = 4
+    VersionDir = 5
+    CacheDir = 6
+    LanguageDir = 7
+
+    # Base path where data/config/cache dir is located
+    BaseDir = None
+
+    @staticmethod
+    def get_directory(dir_type=1):
+        """
+        Return the appropriate directory according to the directory type.
+
+        ``dir_type``
+            The directory type you want, for instance the data directory.
+        """
+        if dir_type == AppLocation.AppDir:
+            return _get_frozen_path(
+                os.path.abspath(os.path.split(sys.argv[0])[0]),
+                os.path.split(openlp.__file__)[0])
+        elif dir_type == AppLocation.PluginsDir:
+            app_path = os.path.abspath(os.path.split(sys.argv[0])[0])
+            return _get_frozen_path(os.path.join(app_path, u'plugins'),
+                os.path.join(os.path.split(openlp.__file__)[0], u'plugins'))
+        elif dir_type == AppLocation.VersionDir:
+            return _get_frozen_path(
+                os.path.abspath(os.path.split(sys.argv[0])[0]),
+                os.path.split(openlp.__file__)[0])
+        elif dir_type == AppLocation.LanguageDir:
+            app_path = _get_frozen_path(
+                os.path.abspath(os.path.split(sys.argv[0])[0]),
+                _get_os_dir_path(dir_type))
+            return os.path.join(app_path, u'i18n')
+        elif dir_type == AppLocation.DataDir and AppLocation.BaseDir:
+            return os.path.join(AppLocation.BaseDir, 'data')
+        else:
+            return _get_os_dir_path(dir_type)
+
+    @staticmethod
+    def get_data_path():
+        """
+        Return the path OpenLP stores all its data under.
+        """
+        # Check if we have a different data location.
+        if Settings().contains(u'advanced/data path'):
+            path = unicode(Settings().value(
+                u'advanced/data path').toString())
+        else:
+            path = AppLocation.get_directory(AppLocation.DataDir)
+            check_directory_exists(path)
+        return os.path.normpath(path)
+
+    @staticmethod
+    def get_section_data_path(section):
+        """
+        Return the path a particular module stores its data under.
+        """
+        data_path = AppLocation.get_data_path()
+        path = os.path.join(data_path, section)
+        check_directory_exists(path)
+        return path
+
+
+def _get_os_dir_path(dir_type):
+    """
+    Return a path based on which OS and environment we are running in.
+    """
+    encoding = sys.getfilesystemencoding()
+    if sys.platform == u'win32':
+        if dir_type == AppLocation.DataDir:
+            return os.path.join(unicode(os.getenv(u'APPDATA'), encoding),
+                u'openlp', u'data')
+        elif dir_type == AppLocation.LanguageDir:
+            return os.path.split(openlp.__file__)[0]
+        return os.path.join(unicode(os.getenv(u'APPDATA'), encoding),
+            u'openlp')
+    elif sys.platform == u'darwin':
+        if dir_type == AppLocation.DataDir:
+            return os.path.join(unicode(os.getenv(u'HOME'), encoding),
+                u'Library', u'Application Support', u'openlp', u'Data')
+        elif dir_type == AppLocation.LanguageDir:
+            return os.path.split(openlp.__file__)[0]
+        return os.path.join(unicode(os.getenv(u'HOME'), encoding),
+            u'Library', u'Application Support', u'openlp')
+    else:
+        if dir_type == AppLocation.LanguageDir:
+            prefixes = [u'/usr/local', u'/usr']
+            for prefix in prefixes:
+                directory = os.path.join(prefix, u'share', u'openlp')
+                if os.path.exists(directory):
+                    return directory
+            return os.path.join(u'/usr', u'share', u'openlp')
+        if XDG_BASE_AVAILABLE:
+            if dir_type == AppLocation.ConfigDir:
+                return os.path.join(unicode(BaseDirectory.xdg_config_home,
+                    encoding), u'openlp')
+            elif dir_type == AppLocation.DataDir:
+                return os.path.join(
+                    unicode(BaseDirectory.xdg_data_home, encoding), u'openlp')
+            elif dir_type == AppLocation.CacheDir:
+                return os.path.join(unicode(BaseDirectory.xdg_cache_home,
+                    encoding), u'openlp')
+        if dir_type == AppLocation.DataDir:
+            return os.path.join(unicode(os.getenv(u'HOME'), encoding),
+                u'.openlp', u'data')
+        return os.path.join(unicode(os.getenv(u'HOME'), encoding), u'.openlp')
+
+
+def _get_frozen_path(frozen_option, non_frozen_option):
+    """
+    Return a path based on the system status.
+    """
+    if hasattr(sys, u'frozen') and sys.frozen == 1:
+        return frozen_option
+    return non_frozen_option
+>>>>>>> MERGE-SOURCE
 
 
 def get_application_version():
@@ -259,6 +426,7 @@
     return IMAGES_FILTER
 
 
+<<<<<<< TREE
 def is_not_image_file(file_name):
     """
     Validate that the file is not an image file.
@@ -276,6 +444,42 @@
         return True
 
 
+=======
+def is_not_image_file(file_name):
+    """
+    Validate that the file is not an image file.
+
+    ``file_name``
+        File name to be checked.
+    """
+    if not file_name:
+        return True
+    formats = [unicode(fmt).lower()
+        for fmt in QtGui.QImageReader.supportedImageFormats()]
+    file_part, file_extension = os.path.splitext(unicode(file_name))
+    if file_extension[1:].lower() in formats and os.path.exists(file_name):
+        return False
+    return True
+
+
+def join_url(base, *args):
+    """
+    Join one or more url components with the base url.
+
+    ``base``
+        Base url containing top level domain.
+        e.g. http://www.example.org
+
+    ``args``
+        url components to be appended to the base url.
+    """
+    # Remove leading and trailing slash from components.
+    # Also ensure QString is converted to unicode().
+    args = [unicode(x).strip('/') for x in args]
+    return urlparse.urljoin(base, '/'.join(args))
+
+
+>>>>>>> MERGE-SOURCE
 def split_filename(path):
     """
     Return a list of the parts in a given path.
@@ -317,6 +521,7 @@
         return False
 
 
+<<<<<<< TREE
 def _get_user_agent():
     """
     Return a user agent customised for the platform the user is on.
@@ -328,6 +533,19 @@
     return browser_list[random_index]
 
 
+=======
+def _get_user_agent():
+    """
+    Return a user agent customised for the platform the user is on.
+    """
+    browser_list = USER_AGENTS.get(sys.platform, None)
+    if not browser_list:
+        browser_list = USER_AGENTS[u'default']
+    random_index = randint(0, len(browser_list) - 1)
+    return browser_list[random_index]
+
+
+>>>>>>> MERGE-SOURCE
 def get_web_page(url, header=None, update_openlp=False):
     """
     Attempts to download the webpage at url and returns that page or None.
@@ -347,19 +565,39 @@
     # http://docs.python.org/library/urllib2.html
     if not url:
         return None
+<<<<<<< TREE
     req = urllib.request.Request(url)
     if not header or header[0].lower() != 'user-agent':
         user_agent = _get_user_agent()
         req.add_header('User-Agent', user_agent)
     if header:
         req.add_header(header[0], header[1])
+=======
+    req = urllib2.Request(url)
+    if not header or header[0].lower() != u'user-agent':
+        user_agent = _get_user_agent()
+        req.add_header('User-Agent', str(user_agent))
+    elif header:
+        req.add_header(str(header[0]), str(header[1]))
+>>>>>>> MERGE-SOURCE
     page = None
     log.debug('Downloading URL = %s' % url)
     try:
+<<<<<<< TREE
         page = urllib.request.urlopen(req)
         log.debug('Downloaded URL = %s' % page.geturl())
     except urllib.error.URLError:
         log.exception('The web page could not be downloaded')
+=======
+        page = urllib2.urlopen(req)
+        downloaded_url = page.geturl()
+        # Sometimes we get redirected, in this case page.geturl is encoded in utf-8
+        if not isinstance(downloaded_url, unicode):
+            downloaded_url = downloaded_url.decode('utf-8')
+        log.debug(u'Downloaded URL = %s' % downloaded_url)
+    except urllib2.URLError:
+        log.exception(u'The web page could not be downloaded')
+>>>>>>> MERGE-SOURCE
     if not page:
         return None
     if update_openlp:

=== modified file 'openlp/core/utils/actions.py'
--- openlp/core/utils/actions.py	2013-12-24 08:56:50 +0000
+++ openlp/core/utils/actions.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/core/utils/languagemanager.py'
--- openlp/core/utils/languagemanager.py	2013-12-24 08:56:50 +0000
+++ openlp/core/utils/languagemanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/__init__.py'
--- openlp/plugins/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/__init__.py'
--- openlp/plugins/alerts/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/alerts/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/alertsplugin.py'
--- openlp/plugins/alerts/alertsplugin.py	2014-01-01 09:57:06 +0000
+++ openlp/plugins/alerts/alertsplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/forms/__init__.py'
--- openlp/plugins/alerts/forms/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/alerts/forms/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/forms/alertdialog.py'
--- openlp/plugins/alerts/forms/alertdialog.py	2014-01-01 09:57:06 +0000
+++ openlp/plugins/alerts/forms/alertdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py	2014-01-01 09:57:06 +0000
+++ openlp/plugins/alerts/forms/alertform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/lib/__init__.py'
--- openlp/plugins/alerts/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/alerts/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/lib/alertsmanager.py'
--- openlp/plugins/alerts/lib/alertsmanager.py	2014-01-01 09:57:06 +0000
+++ openlp/plugins/alerts/lib/alertsmanager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py	2014-01-01 09:33:07 +0000
+++ openlp/plugins/alerts/lib/alertstab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/alerts/lib/db.py'
--- openlp/plugins/alerts/lib/db.py	2014-01-01 09:33:07 +0000
+++ openlp/plugins/alerts/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/__init__.py'
--- openlp/plugins/bibles/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/__init__.py'
--- openlp/plugins/bibles/forms/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
--- openlp/plugins/bibles/forms/bibleupgradeform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/forms/bibleupgradeform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/booknamedialog.py'
--- openlp/plugins/bibles/forms/booknamedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/booknamedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/booknameform.py'
--- openlp/plugins/bibles/forms/booknameform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/booknameform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/editbibledialog.py'
--- openlp/plugins/bibles/forms/editbibledialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/editbibledialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/editbibleform.py'
--- openlp/plugins/bibles/forms/editbibleform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/forms/editbibleform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/languagedialog.py'
--- openlp/plugins/bibles/forms/languagedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/languagedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/forms/languageform.py'
--- openlp/plugins/bibles/forms/languageform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/forms/languageform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/__init__.py'
--- openlp/plugins/bibles/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/biblestab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -202,6 +207,7 @@
         self.language_selection_combo_box.setItemText(LanguageSelection.English,
             translate('BiblesPlugin.BiblesTab', 'English'))
 
+<<<<<<< TREE
     def on_bible_theme_combo_box_changed(self):
         self.bible_theme = self.bible_theme_combo_box.currentText()
 
@@ -222,6 +228,21 @@
         self.check_is_verse_number_visible()
 
     def on_new_chapters_check_box_changed(self, check_state):
+=======
+    def onBibleThemeComboBoxChanged(self):
+        self.bible_theme = unicode(self.bibleThemeComboBox.currentText())
+
+    def onDisplayStyleComboBoxChanged(self):
+        self.display_style = self.displayStyleComboBox.currentIndex()
+
+    def onLayoutStyleComboBoxChanged(self):
+        self.layout_style = self.layoutStyleComboBox.currentIndex()
+
+    def onLanguageSelectionComboBoxChanged(self):
+        self.language_selection = self.languageSelectionComboBox.currentIndex()
+
+    def onNewChaptersCheckBoxChanged(self, check_state):
+>>>>>>> MERGE-SOURCE
         self.show_new_chapters = False
         # We have a set value convert to True/False.
         if check_state == QtCore.Qt.Checked:

=== modified file 'openlp/plugins/bibles/lib/csvbible.py'
--- openlp/plugins/bibles/lib/csvbible.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/csvbible.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -32,9 +37,15 @@
 import os
 import re
 import sqlite3
+import time
 
 from PyQt4 import QtCore
+<<<<<<< TREE
 from sqlalchemy import Column, ForeignKey, Table, or_, types, func
+=======
+from sqlalchemy import Column, ForeignKey, or_, Table, types, func
+from sqlalchemy.exc import OperationalError
+>>>>>>> MERGE-SOURCE
 from sqlalchemy.orm import class_mapper, mapper, relation
 from sqlalchemy.orm.exc import UnmappedClassError
 
@@ -48,6 +59,7 @@
 
 RESERVED_CHARACTERS = '\\.^$*+?{}[]()'
 
+
 class BibleMeta(BaseModel):
     """
     Bible Meta Data
@@ -255,7 +267,12 @@
                 text=verse_text
             )
             self.session.add(verse)
-        self.session.commit()
+        try:
+            self.session.commit()
+        except OperationalError:
+            # Wait 10ms and try again.
+            time.sleep(0.01)
+            self.session.commit()
 
     def create_verse(self, book_id, chapter, verse, text):
         """
@@ -855,6 +872,26 @@
         return None
 
     @staticmethod
+    def get_language_by_id(language_id):
+        """
+        Return a dict containing the language id, name and code by id.
+
+        ``id``
+            The id of the language in the database.
+        """
+        log.debug(u'BiblesResourcesDB.get_language_by_id(%d)', language_id)
+        language = BiblesResourcesDB.run_sql(u'SELECT id, name, code FROM '
+                u'language WHERE id = ?', (language_id,))
+        if language:
+            return {
+                u'id': language[0][0],
+                u'name': unicode(language[0][1]),
+                u'code': unicode(language[0][2])
+            }
+        else:
+            return None
+
+    @staticmethod
     def get_language(name):
         """
         Return a dict containing the language id, name and code by name or
@@ -1026,6 +1063,7 @@
         """
         log.info('OldBibleDB loaded')
         QtCore.QObject.__init__(self)
+<<<<<<< TREE
         if 'path' not in kwargs:
             raise KeyError('Missing keyword argument "path".')
         if  'file' not in kwargs:
@@ -1034,6 +1072,16 @@
             self.path = kwargs['path']
         if 'file' in kwargs:
             self.file = kwargs['file']
+=======
+        if u'path' not in kwargs:
+            raise KeyError(u'Missing keyword argument "path".')
+        if u'file' not in kwargs:
+            raise KeyError(u'Missing keyword argument "file".')
+        if u'path' in kwargs:
+            self.path = kwargs[u'path']
+        if u'file' in kwargs:
+            self.file = kwargs[u'file']
+>>>>>>> MERGE-SOURCE
 
     def get_cursor(self):
         """

=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/http.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -243,6 +248,8 @@
         if not soup:
             return None
         div = soup.find('div', 'result-text-style-normal')
+        if not div:
+            return None
         self._clean_soup(div)
         span_list = div.find_all('span', 'text')
         log.debug('Span list: %s', span_list)
@@ -377,6 +384,7 @@
             log.error('No books found in the Bibleserver response.')
             send_error_message('parse')
             return None
+<<<<<<< TREE
         content = content.find_all('li')
         return [book.contents[0].contents[0] for book in content if len(book.contents[0].contents)]
 
@@ -393,6 +401,13 @@
             return self._application
 
     application = property(_get_application)
+=======
+        content = content.findAll(u'li')
+        return [
+            book.contents[0].contents[0] for book in content
+                if len(book.contents[0].contents)
+        ]
+>>>>>>> MERGE-SOURCE
 
 
 class CWExtract(object):

=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/manager.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -57,6 +62,7 @@
     """
     This is the custom media manager item for Bibles.
     """
+<<<<<<< TREE
     log.info('Bible Media Item loaded')
 
     def __init__(self, parent, plugin):
@@ -69,6 +75,14 @@
         """
         Do some additional setup.
         """
+=======
+    log.info(u'Bible Media Item loaded')
+
+    def __init__(self, parent, plugin, icon):
+        self.lockIcon = build_icon(u':/bibles/bibles_search_lock.png')
+        self.unlockIcon = build_icon(u':/bibles/bibles_search_unlock.png')
+        MediaManagerItem.__init__(self, parent, plugin, icon)
+>>>>>>> MERGE-SOURCE
         # Place to store the search results for both bibles.
         self.settings = self.plugin.settings_tab
         self.quick_preview_allowed = True
@@ -174,6 +188,7 @@
         layout.addLayout(search_button_layout, idx + 3, 1, 1, 2)
         self.page_layout.addWidget(tab)
         tab.setVisible(False)
+<<<<<<< TREE
         lockButton.toggled.connect(self.onLockButtonToggled)
         setattr(self, prefix + 'VersionLabel', versionLabel)
         setattr(self, prefix + 'VersionComboBox', versionComboBox)
@@ -184,6 +199,21 @@
         setattr(self, prefix + 'LockButton', lockButton)
         setattr(self, prefix + 'SearchButtonLayout', search_button_layout)
         setattr(self, prefix + 'SearchButton', searchButton)
+=======
+        QtCore.QObject.connect(lockButton, QtCore.SIGNAL(u'toggled(bool)'),
+            self.onLockButtonToggled)
+        QtCore.QObject.connect(secondComboBox, QtCore.SIGNAL(u'currentIndexChanged(QString)'),
+                               self.onSecondBibleComboBoxCurrentIndexChanged)
+        setattr(self, prefix + u'VersionLabel', versionLabel)
+        setattr(self, prefix + u'VersionComboBox', versionComboBox)
+        setattr(self, prefix + u'SecondLabel', secondLabel)
+        setattr(self, prefix + u'SecondComboBox', secondComboBox)
+        setattr(self, prefix + u'StyleLabel', styleLabel)
+        setattr(self, prefix + u'StyleComboBox', styleComboBox)
+        setattr(self, prefix + u'LockButton', lockButton)
+        setattr(self, prefix + u'SearchButtonLayout', searchButtonLayout)
+        setattr(self, prefix + u'SearchButton', searchButton)
+>>>>>>> MERGE-SOURCE
 
     def add_end_header_bar(self):
         self.searchTabBar = QtGui.QTabBar(self)
@@ -261,18 +291,25 @@
         else:
             self.advancedBookComboBox.setFocus()
 
+<<<<<<< TREE
     def config_update(self):
         log.debug('config_update')
         if Settings().value(self.settings_section + '/second bibles'):
+=======
+    def configUpdated(self):
+        log.debug(u'configUpdated')
+        if Settings().value(self.settingsSection + u'/second bibles',
+            QtCore.QVariant(True)).toBool():
+            self.quickSecondLabel.setVisible(True)
+            self.quickSecondComboBox.setVisible(True)
+>>>>>>> MERGE-SOURCE
             self.advancedSecondLabel.setVisible(True)
             self.advancedSecondComboBox.setVisible(True)
-            self.quickSecondLabel.setVisible(True)
-            self.quickSecondComboBox.setVisible(True)
         else:
+            self.quickSecondLabel.setVisible(False)
+            self.quickSecondComboBox.setVisible(False)
             self.advancedSecondLabel.setVisible(False)
             self.advancedSecondComboBox.setVisible(False)
-            self.quickSecondLabel.setVisible(False)
-            self.quickSecondComboBox.setVisible(False)
         self.quickStyleComboBox.setCurrentIndex(self.settings.layout_style)
         self.advancedStyleComboBox.setCurrentIndex(self.settings.layout_style)
 
@@ -469,9 +506,24 @@
                 books.sort(key=get_locale_key)
         set_case_insensitive_completer(books, self.quickSearchEdit)
 
+<<<<<<< TREE
     def on_import_click(self):
         if not hasattr(self, 'import_wizard'):
             self.import_wizard = BibleImportForm(self, self.plugin.manager, self.plugin)
+=======
+    def onSecondBibleComboBoxCurrentIndexChanged(self, text):
+        if text is None or not unicode(text):
+            self.quickStyleComboBox.setEnabled(True)
+            self.advancedStyleComboBox.setEnabled(True)
+        else:
+            self.quickStyleComboBox.setEnabled(False)
+            self.advancedStyleComboBox.setEnabled(False)
+
+    def onImportClick(self):
+        if not hasattr(self, u'import_wizard'):
+            self.import_wizard = BibleImportForm(self, self.plugin.manager,
+                self.plugin)
+>>>>>>> MERGE-SOURCE
         # If the import was not cancelled then reload.
         if self.import_wizard.exec_():
             self.reload_bibles()

=== added file 'openlp/plugins/bibles/lib/openlp1.py.OTHER'
--- openlp/plugins/bibles/lib/openlp1.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/plugins/bibles/lib/openlp1.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,118 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+
+import logging
+import sqlite
+import sys
+
+from openlp.core.lib import Receiver
+from openlp.core.ui.wizard import WizardStrings
+from openlp.plugins.bibles.lib.db import BibleDB, BiblesResourcesDB
+
+log = logging.getLogger(__name__)
+
+class OpenLP1Bible(BibleDB):
+    """
+    This class provides the OpenLPv1 bible importer.
+    """
+    def __init__(self, parent, **kwargs):
+        """
+        Constructor.
+        """
+        log.debug(self.__class__.__name__)
+        BibleDB.__init__(self, parent, **kwargs)
+        self.filename = kwargs[u'filename']
+
+    def do_import(self, bible_name=None):
+        """
+        Imports an openlp.org v1 bible.
+        """
+        connection = None
+        cursor = None
+        try:
+            connection = sqlite.connect(
+                self.filename.encode(sys.getfilesystemencoding()))
+            cursor = connection.cursor()
+        except sqlite.DatabaseError:
+            log.exception(u'File "%s" is encrypted or not a sqlite database, '
+            'therefore not an openlp.org 1.x database either' % self.filename)
+            # Please add an user error here!
+            # This file is not an openlp.org 1.x bible database.
+            return False
+        #Create the bible language
+        language_id = self.get_language(bible_name)
+        if not language_id:
+            log.exception(u'Importing books from "%s" failed' % self.filename)
+            return False
+        # Create all books.
+        try:
+            cursor.execute(
+                u'SELECT id, testament_id, name, abbreviation FROM book')
+        except sqlite.DatabaseError as error:
+            log.exception(u'DatabaseError: %s' % error)
+            # Please add an user error here!
+            # This file is not an openlp.org 1.x bible database.
+            return False
+        books = cursor.fetchall()
+        self.wizard.progressBar.setMaximum(len(books) + 1)
+        for book in books:
+            if self.stop_import_flag:
+                connection.close()
+                return False
+            book_id = int(book[0])
+            testament_id = int(book[1])
+            name = unicode(book[2], u'cp1252')
+            abbreviation = unicode(book[3], u'cp1252')
+            book_ref_id = self.get_book_ref_id_by_name(name, len(books),
+                language_id)
+            if not book_ref_id:
+                log.exception(u'Importing books from "%s" '\
+                    'failed' % self.filename)
+                return False
+            book_details = BiblesResourcesDB.get_book_by_id(book_ref_id)
+            db_book = self.create_book(name, book_ref_id,
+                book_details[u'testament_id'])
+            # Update the progess bar.
+            self.wizard.incrementProgressBar(WizardStrings.ImportingType % name)
+            # Import the verses for this book.
+            cursor.execute(u'SELECT chapter, verse, text || \'\' AS text FROM '
+                'verse WHERE book_id=%s' % book_id)
+            verses = cursor.fetchall()
+            for verse in verses:
+                if self.stop_import_flag:
+                    connection.close()
+                    return False
+                chapter = int(verse[0])
+                verse_number = int(verse[1])
+                text = unicode(verse[2], u'cp1252')
+                self.create_verse(db_book.id, chapter, verse_number, text)
+                Receiver.send_message(u'openlp_process_events')
+            self.session.commit()
+        connection.close()
+        return True

=== modified file 'openlp/plugins/bibles/lib/opensong.py'
--- openlp/plugins/bibles/lib/opensong.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/opensong.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/osis.py'
--- openlp/plugins/bibles/lib/osis.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/bibles/lib/osis.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -33,7 +38,12 @@
 import codecs
 import re
 
+<<<<<<< TREE
 from openlp.core.common import AppLocation, translate
+=======
+from openlp.core.lib import Receiver, translate
+from openlp.core.utils import AppLocation, LanguageManager
+>>>>>>> MERGE-SOURCE
 from openlp.plugins.bibles.lib.db import BibleDB, BiblesResourcesDB
 
 log = logging.getLogger(__name__)
@@ -143,10 +153,31 @@
                         log.error('Importing books from "%s" failed' % self.filename)
                         return False
                     book_details = BiblesResourcesDB.get_book_by_id(book_ref_id)
+<<<<<<< TREE
                     if not db_book or db_book.name != book_details['name']:
                         log.debug('New book: "%s"' % book_details['name'])
+=======
+                    bible_language = BiblesResourcesDB.get_language_by_id(language_id)
+                    if bible_language is not None:
+                        # The language of this bible was found, so we can
+                        # translate the name of this book
+                        custom_translator = LanguageManager.get_translator(
+                            bible_language['code'])[0]
+                        book_name_localized = unicode(custom_translator.translate(
+                            'BiblesPlugin', book_details[u'name']))
+                    else:
+                        # The language of this bible was not found, so we just
+                        # use the English name for this book
+                        book_name_localized = book_details[u'name']
+                    if not db_book or db_book.name != book_name_localized:
+                        log.debug(u'New book: "%s"' % book_name_localized)
+>>>>>>> MERGE-SOURCE
                         db_book = self.create_book(
+<<<<<<< TREE
                             book_details['name'],
+=======
+                            book_name_localized,
+>>>>>>> MERGE-SOURCE
                             book_ref_id,
                             book_details['testament_id'])
                     if last_chapter == 0:
@@ -154,8 +185,15 @@
                     if last_chapter != chapter:
                         if last_chapter != 0:
                             self.session.commit()
+<<<<<<< TREE
                         self.wizard.increment_progress_bar(translate('BiblesPlugin.OsisImport', 'Importing %s %s...',
                             'Importing <book name> <chapter>...') % (book_details['name'], chapter))
+=======
+                        self.wizard.incrementProgressBar(unicode(translate(
+                            'BiblesPlugin.OsisImport', 'Importing %s %s...',
+                            'Importing <book name> <chapter>...')) %
+                            (book_name_localized, chapter))
+>>>>>>> MERGE-SOURCE
                         last_chapter = chapter
                     # All of this rigmarol below is because the mod2osis tool from the Sword library embeds XML in the
                     # OSIS but neglects to enclose the verse text (with XML) in <[CDATA[ ]]> tags.

=== modified file 'openlp/plugins/bibles/lib/upgrade.py'
--- openlp/plugins/bibles/lib/upgrade.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/lib/upgrade.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/bibles/lib/versereferencelist.py'
--- openlp/plugins/bibles/lib/versereferencelist.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/bibles/lib/versereferencelist.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/__init__.py'
--- openlp/plugins/custom/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/custom/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/custom/customplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/forms/__init__.py'
--- openlp/plugins/custom/forms/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/custom/forms/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
--- openlp/plugins/custom/forms/editcustomdialog.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/forms/editcustomdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/forms/editcustomform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/forms/editcustomslidedialog.py'
--- openlp/plugins/custom/forms/editcustomslidedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/custom/forms/editcustomslidedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/forms/editcustomslideform.py'
--- openlp/plugins/custom/forms/editcustomslideform.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/forms/editcustomslideform.py	2014-01-18 07:58:26 +0000
@@ -5,8 +5,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/lib/__init__.py'
--- openlp/plugins/custom/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/custom/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/lib/customtab.py'
--- openlp/plugins/custom/lib/customtab.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/lib/customtab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/lib/customxmlhandler.py'
--- openlp/plugins/custom/lib/customxmlhandler.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/lib/customxmlhandler.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/lib/db.py'
--- openlp/plugins/custom/lib/db.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2014-01-01 10:56:23 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/images/__init__.py'
--- openlp/plugins/images/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/images/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/images/imageplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/images/lib/__init__.py'
--- openlp/plugins/images/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/images/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/images/lib/imagetab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -75,6 +80,7 @@
     def retranslateUi(self):
         self.on_new_prompt = translate('ImagePlugin.MediaItem', 'Select Image(s)')
         file_formats = get_images_filter()
+<<<<<<< TREE
         self.on_new_file_masks = '%s;;%s (*.*) (*)' % (file_formats, UiStrings().AllFiles)
         self.addGroupAction.setText(UiStrings().AddGroup)
         self.addGroupAction.setToolTip(UiStrings().AddGroup)
@@ -82,6 +88,14 @@
         self.replace_action.setToolTip(UiStrings().ReplaceLiveBG)
         self.reset_action.setText(UiStrings().ResetBG)
         self.reset_action.setToolTip(UiStrings().ResetLiveBG)
+=======
+        self.onNewFileMasks = u'%s;;%s (*.*)' % (file_formats,
+            UiStrings().AllFiles)
+        self.replaceAction.setText(UiStrings().ReplaceBG)
+        self.replaceAction.setToolTip(UiStrings().ReplaceLiveBG)
+        self.resetAction.setText(UiStrings().ResetBG)
+        self.resetAction.setToolTip(UiStrings().ResetLiveBG)
+>>>>>>> MERGE-SOURCE
 
     def required_icons(self):
         """

=== modified file 'openlp/plugins/media/__init__.py'
--- openlp/plugins/media/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/media/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/media/lib/__init__.py'
--- openlp/plugins/media/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/media/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2013-12-31 20:29:03 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/media/lib/mediatab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/media/lib/mediatab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/media/mediaplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/__init__.py'
--- openlp/plugins/presentations/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/lib/__init__.py'
--- openlp/plugins/presentations/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -44,6 +49,7 @@
 if os.name == 'nt':
     from win32com.client import Dispatch
     import pywintypes
+
     # Declare an empty exception to match the exception imported from UNO
     class ErrorCodeIOException(Exception):
         pass
@@ -77,10 +83,18 @@
         """
         Initialise the class
         """
+<<<<<<< TREE
         log.debug('Initialising')
         super(ImpressController, self).__init__(plugin, 'Impress', ImpressDocument)
         self.supports = ['odp']
         self.also_supports = ['ppt', 'pps', 'pptx', 'ppsx']
+=======
+        log.debug(u'Initialising')
+        PresentationController.__init__(self, plugin, u'Impress',
+            ImpressDocument)
+        self.supports = [u'odp']
+        self.alsosupports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
+>>>>>>> MERGE-SOURCE
         self.process = None
         self.desktop = None
         self.manager = None

=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -46,6 +51,7 @@
 ERROR_IMAGE = QtGui.QImage(':/general/general_delete.png')
 
 
+
 class PresentationMediaItem(MediaManagerItem):
     """
     This is the Presentation media manager item for Presentation Items. It can present files using Openoffice and
@@ -88,6 +94,7 @@
         file_type_string = ''
         for controller in self.controllers:
             if self.controllers[controller].enabled():
+<<<<<<< TREE
                 file_types = self.controllers[controller].supports + self.controllers[controller].also_supports
                 for file_type in file_types:
                     if file_type not in file_type_string:
@@ -121,6 +128,44 @@
         self.display_layout.addRow(self.display_type_label, self.display_type_combo_box)
         # Add the Presentation widget to the page layout.
         self.page_layout.addWidget(self.presentation_widget)
+=======
+                types = self.controllers[controller].supports + \
+                    self.controllers[controller].alsosupports
+                for type_ in types:
+                    if fileType.find(type_) == -1:
+                        fileType += u'*.%s ' % type_
+                        self.plugin.serviceManager.supportedSuffixes(type_)
+        self.onNewFileMasks = unicode(translate('PresentationPlugin.MediaItem',
+            'Presentations (%s)')) % fileType
+
+    def requiredIcons(self):
+        """
+        Set which icons the media manager tab should show
+        """
+        MediaManagerItem.requiredIcons(self)
+        self.hasFileIcon = True
+        self.hasNewIcon = False
+        self.hasEditIcon = False
+
+    def addEndHeaderBar(self):
+        """
+        Display custom media manager items for presentations
+        """
+        self.presentationWidget = QtGui.QWidget(self)
+        self.presentationWidget.setObjectName(u'presentationWidget')
+        self.displayLayout = QtGui.QFormLayout(self.presentationWidget)
+        self.displayLayout.setMargin(self.displayLayout.spacing())
+        self.displayLayout.setObjectName(u'displayLayout')
+        self.displayTypeLabel = QtGui.QLabel(self.presentationWidget)
+        self.displayTypeLabel.setObjectName(u'displayTypeLabel')
+        self.displayTypeComboBox = create_horizontal_adjusting_combo_box(
+            self.presentationWidget, u'displayTypeComboBox')
+        self.displayTypeLabel.setBuddy(self.displayTypeComboBox)
+        self.displayLayout.addRow(self.displayTypeLabel,
+            self.displayTypeComboBox)
+        # Add the Presentation widget to the page layout
+        self.pageLayout.addWidget(self.presentationWidget)
+>>>>>>> MERGE-SOURCE
 
     def initialise(self):
         """
@@ -140,12 +185,22 @@
         for item in self.controllers:
             # load the drop down selection
             if self.controllers[item].enabled():
+<<<<<<< TREE
                 self.display_type_combo_box.addItem(item)
         if self.display_type_combo_box.count() > 1:
             self.display_type_combo_box.insertItem(0, self.automatic)
             self.display_type_combo_box.setCurrentIndex(0)
         if Settings().value(self.settings_section + '/override app') == QtCore.Qt.Checked:
             self.presentation_widget.show()
+=======
+                self.displayTypeComboBox.addItem(item)
+        if self.displayTypeComboBox.count() > 1:
+            self.displayTypeComboBox.insertItem(0, self.Automatic, userData=u'automatic')
+            self.displayTypeComboBox.setCurrentIndex(0)
+        if Settings().value(self.settingsSection + u'/override app',
+            QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
+            self.presentationWidget.show()
+>>>>>>> MERGE-SOURCE
         else:
             self.presentation_widget.hide()
 
@@ -251,16 +306,28 @@
                 return False
         service_item.processor = self.display_type_combo_box.currentText()
         service_item.add_capability(ItemCapabilities.ProvidesOwnDisplay)
+<<<<<<< TREE
         if not self.display_type_combo_box.currentText():
+=======
+        service_item.add_capability(ItemCapabilities.HasDetailedTitleDisplay)
+        if not service_item.shortname:
+>>>>>>> MERGE-SOURCE
             return False
         for bitem in items:
             filename = bitem.data(QtCore.Qt.UserRole)
             (path, name) = os.path.split(filename)
             service_item.title = name
             if os.path.exists(filename):
+<<<<<<< TREE
                 if service_item.processor == self.automatic:
                     service_item.processor = self.findControllerByType(filename)
                     if not service_item.processor:
+=======
+                if self.displayTypeComboBox.itemData(
+                    self.displayTypeComboBox.currentIndex()) == u'automatic':
+                    service_item.shortname = self.findControllerByType(filename)
+                    if not service_item.shortname:
+>>>>>>> MERGE-SOURCE
                         return False
                 controller = self.controllers[service_item.processor]
                 doc = controller.add_document(filename)

=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -46,6 +51,7 @@
 log = logging.getLogger(__name__)
 
 
+
 class PowerpointController(PresentationController):
     """
     Class to control interactions with PowerPoint Presentations. It creates the runtime Environment , Loads the and
@@ -57,9 +63,16 @@
         """
         Initialise the class
         """
+<<<<<<< TREE
         log.debug('Initialising')
         super(PowerpointController, self).__init__(plugin, 'Powerpoint', PowerpointDocument)
         self.supports = ['ppt', 'pps', 'pptx', 'ppsx']
+=======
+        log.debug(u'Initialising')
+        PresentationController.__init__(self, plugin, u'Powerpoint',
+            PowerpointDocument)
+        self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
+>>>>>>> MERGE-SOURCE
         self.process = None
 
     def check_available(self):

=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -29,6 +34,7 @@
 
 import os
 import logging
+import sys
 
 if os.name == 'nt':
     from ctypes import cdll
@@ -54,8 +60,14 @@
         """
         log.debug('Initialising')
         self.process = None
+<<<<<<< TREE
         super(PptviewController, self).__init__(plugin, 'Powerpoint Viewer', PptviewDocument)
         self.supports = ['ppt', 'pps', 'pptx', 'ppsx']
+=======
+        PresentationController.__init__(self, plugin, u'Powerpoint Viewer',
+            PptviewDocument)
+        self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
+>>>>>>> MERGE-SOURCE
 
     def check_available(self):
         """
@@ -120,14 +132,33 @@
         Called when a presentation is added to the SlideController. It builds the environment, starts communication with
         the background PptView task started earlier.
         """
+<<<<<<< TREE
         log.debug('LoadPresentation')
         size = ScreenList().current['size']
         rect = RECT(size.x(), size.y(), size.right(), size.bottom())
         filepath = str(self.filepath.replace('/', '\\'))
+=======
+        log.debug(u'LoadPresentation')
+        renderer = self.controller.plugin.renderer
+        rect = renderer.screens.current[u'size']
+        rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom())
+        file_system_encoding = 'utf-16-le'
+        file_path = os.path.normpath(self.filepath)
+        preview_path = os.path.join(self.get_temp_folder(), u'slide')
+        # Ensure that the paths are null terminated
+        file_path = file_path.encode(file_system_encoding) + '\0'
+        preview_path = preview_path.encode(file_system_encoding) + '\0'
+>>>>>>> MERGE-SOURCE
         if not os.path.isdir(self.get_temp_folder()):
             os.makedirs(self.get_temp_folder())
+<<<<<<< TREE
         self.ppt_id = self.controller.process.OpenPPT(filepath, None, rect, str(self.get_temp_folder()) + '\\slide')
         if self.ppt_id >= 0:
+=======
+        self.pptid = self.controller.process.OpenPPT(file_path, None, rect,
+            preview_path)
+        if self.pptid >= 0:
+>>>>>>> MERGE-SOURCE
             self.create_thumbnails()
             self.stop_presentation()
             return True

=== modified file 'openlp/plugins/presentations/lib/pptviewlib/README.TXT'
--- openlp/plugins/presentations/lib/pptviewlib/README.TXT	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/pptviewlib/README.TXT	2014-01-18 07:58:26 +0000
@@ -1,6 +1,10 @@
 
 PPTVIEWLIB - Control PowerPoint Viewer 2003/2007 (for openlp.org)
+<<<<<<< TREE
 Copyright (C) 2008-2014 Jonathan Corwin (j@xxxxxxxxxxxx)
+=======
+Copyright (C) 2008-2013 Jonathan Corwin (j@xxxxxxxxxxxx)
+>>>>>>> MERGE-SOURCE
 
 This library wrappers the free Microsoft PowerPoint Viewer (2003/2007) program,
 allowing it to be more easily controlled from another program.

=== modified file 'openlp/plugins/presentations/lib/pptviewlib/ppttest.py'
--- openlp/plugins/presentations/lib/pptviewlib/ppttest.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/pptviewlib/ppttest.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -27,7 +32,9 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 
+import os
 import sys
+
 from PyQt4 import QtGui, QtCore
 from ctypes import *
 from ctypes.wintypes import RECT
@@ -172,9 +179,14 @@
         oldid = self.pptid;
         rect = RECT(int(self.xEdit.text()), int(self.yEdit.text()),
             int(self.widthEdit.text()), int(self.heightEdit.text()))
+<<<<<<< TREE
         filename = str(self.pptEdit.text().replace('/', '\\'))
         folder = str(self.folderEdit.text().replace('/', '\\'))
         print(filename, folder)
+=======
+        filename = os.path.normpath(unicode(self.pptEdit.text())).encode('utf-16-le') + '\0'
+        folder = os.path.normpath(unicode(self.folderEdit.text())).encode('utf-16-le') + '\0'
+>>>>>>> MERGE-SOURCE
         self.pptid = self.pptdll.OpenPPT(filename, None, rect, folder)
         print('id: ' + str(self.pptid))
         if oldid >= 0:

=== modified file 'openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp'
--- openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/pptviewlib/pptviewlib.cpp	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
 * OpenLP - Open Source Lyrics Projection                                      *
 * --------------------------------------------------------------------------- *
+<<<<<<< TREE
 * Copyright (c) 2008-2014 Raoul Snyman                                        *
 * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+* Copyright (c) 2008-2013 Raoul Snyman                                        *
+* Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
 * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
 * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
 * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *
@@ -61,18 +66,18 @@
     switch(ulReasonForCall)
     {
         case DLL_PROCESS_ATTACH:
-            DEBUG("PROCESS_ATTACH\n");
+            DEBUG(L"PROCESS_ATTACH\n");
             break;
         case DLL_THREAD_ATTACH:
-            //DEBUG("THREAD_ATTACH\n");
+            //DEBUG(L"THREAD_ATTACH\n");
             break;
         case DLL_THREAD_DETACH:
-            //DEBUG("THREAD_DETACH\n");
+            //DEBUG(L"THREAD_DETACH\n");
             break;
         case DLL_PROCESS_DETACH:
             // Clean up... hopefully there is only the one process attached?
             // We'll find out soon enough during tests!
-            DEBUG("PROCESS_DETACH\n");
+            DEBUG(L"PROCESS_DETACH\n");
             for (int i = 0; i < MAX_PPTS; i++)
                 ClosePPT(i);
             break;
@@ -84,18 +89,18 @@
 {
     printf("SetDebug\n");
     debug = onOff;
-    DEBUG("enabled\n");
+    DEBUG(L"enabled\n");
 }
 
 DllExport BOOL CheckInstalled()
 {
-    char cmdLine[MAX_PATH * 2];
+    wchar_t cmdLine[MAX_PATH * 2];
 
-    DEBUG("CheckInstalled\n");
+    DEBUG(L"CheckInstalled\n");
     BOOL found = GetPPTViewerPath(cmdLine, sizeof(cmdLine));
     if(found)
     {
-        DEBUG("Exe: %s\n", cmdLine);
+        DEBUG(L"Exe: %s\n", cmdLine);
     }
     return found;
 }
@@ -106,20 +111,20 @@
 // "<n>.bmp" will be appended to complete the path. E.g. "c:\temp\slide" would
 // create "c:\temp\slide1.bmp" slide2.bmp, slide3.bmp etc.
 // It will also create a *info.txt containing information about the ppt
-DllExport int OpenPPT(char *filename, HWND hParentWnd, RECT rect,
-    char *previewPath)
+DllExport int OpenPPT(wchar_t *filename, HWND hParentWnd, RECT rect,
+    wchar_t *previewPath)
 {
     STARTUPINFO si;
     PROCESS_INFORMATION pi;
-    char cmdLine[MAX_PATH * 2];
+    wchar_t cmdLine[MAX_PATH * 2];
     int id;
 
-    DEBUG("OpenPPT start: %s; %s\n", filename, previewPath);
-    DEBUG("OpenPPT start: %u; %i, %i, %i, %i\n", hParentWnd, rect.top,
+    DEBUG(L"OpenPPT start: %s; %s\n", filename, previewPath);
+    DEBUG(L"OpenPPT start: %u; %i, %i, %i, %i\n", hParentWnd, rect.top,
         rect.left, rect.bottom, rect.right);
     if (GetPPTViewerPath(cmdLine, sizeof(cmdLine)) == FALSE)
     {
-        DEBUG("OpenPPT: GetPPTViewerPath failed\n");
+        DEBUG(L"OpenPPT: GetPPTViewerPath failed\n");
         return -1;
     }
     id = -1;
@@ -133,12 +138,12 @@
     }
     if (id < 0)
     {
-        DEBUG("OpenPPT: Too many PPTs\n");
+        DEBUG(L"OpenPPT: Too many PPTs\n");
         return -1;
     }
     memset(&pptView[id], 0, sizeof(PPTVIEW));
-    strcpy_s(pptView[id].filename, MAX_PATH, filename);
-    strcpy_s(pptView[id].previewPath, MAX_PATH, previewPath);
+    wcscpy_s(pptView[id].filename, MAX_PATH, filename);
+    wcscpy_s(pptView[id].previewPath, MAX_PATH, previewPath);
     pptView[id].state = PPT_CLOSED;
     pptView[id].slideCount = 0;
     pptView[id].currentSlide = 0;
@@ -169,9 +174,9 @@
         pptView[id].rect.bottom = rect.bottom;
         pptView[id].rect.right = rect.right;
     }
-    strcat_s(cmdLine, MAX_PATH * 2, " /F /S \"");
-    strcat_s(cmdLine, MAX_PATH * 2, filename);
-    strcat_s(cmdLine, MAX_PATH * 2, "\"");
+    wcscat_s(cmdLine, MAX_PATH * 2, L" /F /S \"");
+    wcscat_s(cmdLine, MAX_PATH * 2, filename);
+    wcscat_s(cmdLine, MAX_PATH * 2, L"\"");
     memset(&si, 0, sizeof(si));
     memset(&pi, 0, sizeof(pi));
     BOOL gotInfo = GetPPTInfo(id);
@@ -190,7 +195,7 @@
     globalHook = SetWindowsHookEx(WH_CBT, CbtProc, hInstance, NULL);
     if (globalHook == 0)
     {
-        DEBUG("OpenPPT: SetWindowsHookEx failed\n");
+        DEBUG(L"OpenPPT: SetWindowsHookEx failed\n");
         ClosePPT(id);
         return -1;
     }
@@ -198,7 +203,7 @@
     Sleep(10);
     if (!CreateProcess(NULL, cmdLine, NULL, NULL, FALSE, 0, 0, NULL, &si, &pi))
     {
-        DEBUG("OpenPPT: CreateProcess failed: %s\n", cmdLine);
+        DEBUG(L"OpenPPT: CreateProcess failed: %s\n", cmdLine);
         ClosePPT(id);
         return -1;
     }
@@ -210,13 +215,13 @@
         Sleep(10);
     if (gotInfo)
     {
-        DEBUG("OpenPPT: Info loaded, no refresh\n");
+        DEBUG(L"OpenPPT: Info loaded, no refresh\n");
         pptView[id].state = PPT_LOADED;
         Resume(id);
     }
     else
     {
-        DEBUG("OpenPPT: Get info\n");
+        DEBUG(L"OpenPPT: Get info\n");
         pptView[id].steps = 0;
         int steps = 0;
         while (pptView[id].state == PPT_OPENED)
@@ -224,18 +229,18 @@
             if (steps <= pptView[id].steps)
             {
                 Sleep(20);
-                DEBUG("OpenPPT: Step %d/%d\n", steps, pptView[id].steps);
+                DEBUG(L"OpenPPT: Step %d/%d\n", steps, pptView[id].steps);
                 steps++;
                 NextStep(id);
             }
             Sleep(10);
         }
-        DEBUG("OpenPPT: Slides %d, Steps %d, first slide steps %d\n",
+        DEBUG(L"OpenPPT: Slides %d, Steps %d, first slide steps %d\n",
             pptView[id].slideCount, pptView[id].steps,
             pptView[id].firstSlideSteps);
         for(int i = 1; i <= pptView[id].slideCount; i++)
         {
-            DEBUG("OpenPPT: Slide %d = %d\n", i, pptView[id].slideNos[i]);
+            DEBUG(L"OpenPPT: Slide %d = %d\n", i, pptView[id].slideNos[i]);
         }
         SavePPTInfo(id);
         if (pptView[id].state == PPT_CLOSING
@@ -257,7 +262,7 @@
         }
         pptView[id].msgHook = NULL;
     }
-    DEBUG("OpenPPT: Exit: id=%i\n", id);
+    DEBUG(L"OpenPPT: Exit: id=%i\n", id);
     return id;
 }
 // Load information about the ppt from an info.txt file.
@@ -270,75 +275,75 @@
 BOOL GetPPTInfo(int id)
 {
     struct _stat fileStats;
-    char info[MAX_PATH];
+    wchar_t info[MAX_PATH];
     FILE* pFile;
-    char buf[100];
+    wchar_t buf[100];
 
-    DEBUG("GetPPTInfo: start\n");
-    if (_stat(pptView[id].filename, &fileStats) != 0)
+    DEBUG(L"GetPPTInfo: start\n");
+    if (_wstat(pptView[id].filename, &fileStats) != 0)
     {
         return FALSE;
     }
-    sprintf_s(info, MAX_PATH, "%sinfo.txt", pptView[id].previewPath);
-    int err = fopen_s(&pFile, info, "r");
+    swprintf_s(info, MAX_PATH, L"%sinfo.txt", pptView[id].previewPath);
+    int err = _wfopen_s(&pFile, info, L"r");
     if (err != 0)
     {
-        DEBUG("GetPPTInfo: file open failed - %d\n", err);
-        return FALSE;
-    }
-    fgets(buf, 100, pFile); // version == 1
-    fgets(buf, 100, pFile);
-    if (fileStats.st_mtime != atoi(buf))
-    {
-        DEBUG("GetPPTInfo: date changed\n");
-        fclose (pFile);
-        return FALSE;
-    }
-    fgets(buf, 100, pFile);
-    if (fileStats.st_size != atoi(buf))
-    {
-        DEBUG("GetPPTInfo: size changed\n");
-        fclose (pFile);
-        return FALSE;
-    }
-    fgets(buf, 100, pFile); // slidecount
-    int slideCount = atoi(buf);
-    fgets(buf, 100, pFile); // first slide steps
-    int firstSlideSteps = atoi(buf);
+        DEBUG(L"GetPPTInfo: file open failed - %d\n", err);
+        return FALSE;
+    }
+    fgetws(buf, 100, pFile); // version == 1
+    fgetws(buf, 100, pFile);
+    if (fileStats.st_mtime != _wtoi(buf))
+    {
+        DEBUG(L"GetPPTInfo: date changed\n");
+        fclose (pFile);
+        return FALSE;
+    }
+    fgetws(buf, 100, pFile);
+    if (fileStats.st_size != _wtoi(buf))
+    {
+        DEBUG(L"GetPPTInfo: size changed\n");
+        fclose (pFile);
+        return FALSE;
+    }
+    fgetws(buf, 100, pFile); // slidecount
+    int slideCount = _wtoi(buf);
+    fgetws(buf, 100, pFile); // first slide steps
+    int firstSlideSteps = _wtoi(buf);
     // check all the preview images still exist
     for (int i = 1; i <= slideCount; i++)
     {
-        sprintf_s(info, MAX_PATH, "%s%i.bmp", pptView[id].previewPath, i);
+        swprintf_s(info, MAX_PATH, L"%s%i.bmp", pptView[id].previewPath, i);
         if (GetFileAttributes(info) == INVALID_FILE_ATTRIBUTES)
         {
-            DEBUG("GetPPTInfo: bmp not found\n");
+            DEBUG(L"GetPPTInfo: bmp not found\n");
             return FALSE;
         }
     }
     fclose(pFile);
     pptView[id].slideCount = slideCount;
     pptView[id].firstSlideSteps = firstSlideSteps;
-    DEBUG("GetPPTInfo: exit ok\n");
+    DEBUG(L"GetPPTInfo: exit ok\n");
     return TRUE;
 }
 
 BOOL SavePPTInfo(int id)
 {
     struct _stat fileStats;
-    char info[MAX_PATH];
+    wchar_t info[MAX_PATH];
     FILE* pFile;
 
-    DEBUG("SavePPTInfo: start\n");
-    if (_stat(pptView[id].filename, &fileStats) != 0)
+    DEBUG(L"SavePPTInfo: start\n");
+    if (_wstat(pptView[id].filename, &fileStats) != 0)
     {
-        DEBUG("SavePPTInfo: stat of %s failed\n", pptView[id].filename);
+        DEBUG(L"SavePPTInfo: stat of %s failed\n", pptView[id].filename);
         return FALSE;
     }
-    sprintf_s(info, MAX_PATH, "%sinfo.txt", pptView[id].previewPath);
-    int err = fopen_s(&pFile, info, "w");
+    swprintf_s(info, MAX_PATH, L"%sinfo.txt", pptView[id].previewPath);
+    int err = _wfopen_s(&pFile, info, L"w");
     if (err != 0)
     {
-        DEBUG("SavePPTInfo: fopen of %s failed%i\n", info, err);
+        DEBUG(L"SavePPTInfo: fopen of %s failed%i\n", info, err);
         return FALSE;
     }
     fprintf(pFile, "1\n");
@@ -347,21 +352,21 @@
     fprintf(pFile, "%u\n", pptView[id].slideCount);
     fprintf(pFile, "%u\n", pptView[id].firstSlideSteps);
     fclose(pFile);
-    DEBUG("SavePPTInfo: exit ok\n");
+    DEBUG(L"SavePPTInfo: exit ok\n");
     return TRUE;
 }
 
 // Get the path of the PowerPoint viewer from the registry
-BOOL GetPPTViewerPath(char *pptViewerPath, int stringSize)
+BOOL GetPPTViewerPath(wchar_t *pptViewerPath, int stringSize)
 {
-    char cwd[MAX_PATH];
+    wchar_t cwd[MAX_PATH];
 
-    DEBUG("GetPPTViewerPath: start\n");
+    DEBUG(L"GetPPTViewerPath: start\n");
     if(GetPPTViewerPathFromReg(pptViewerPath, stringSize))
     {
-        if(_access(pptViewerPath, 0) != -1)
+        if(_waccess(pptViewerPath, 0) != -1)
         {
-            DEBUG("GetPPTViewerPath: exit registry\n");
+            DEBUG(L"GetPPTViewerPath: exit registry\n");
             return TRUE;
         }
     }
@@ -370,37 +375,37 @@
     // upset those who like to put things somewhere else
 
     // Viewer 2007 in 64bit Windows:
-    if(_access("C:\\Program Files (x86)\\Microsoft Office\\Office12\\PPTVIEW.EXE",
+    if(_waccess(L"C:\\Program Files (x86)\\Microsoft Office\\Office12\\PPTVIEW.EXE",
         0) != -1)
     {
-        strcpy_s(
-            "C:\\Program Files (x86)\\Microsoft Office\\Office12\\PPTVIEW.EXE",
+        wcscpy_s(
+            L"C:\\Program Files (x86)\\Microsoft Office\\Office12\\PPTVIEW.EXE",
             stringSize, pptViewerPath);
-        DEBUG("GetPPTViewerPath: exit 64bit 2007\n");
+        DEBUG(L"GetPPTViewerPath: exit 64bit 2007\n");
         return TRUE;
     }
     // Viewer 2007 in 32bit Windows:
-    if(_access("C:\\Program Files\\Microsoft Office\\Office12\\PPTVIEW.EXE", 0)
+    if(_waccess(L"C:\\Program Files\\Microsoft Office\\Office12\\PPTVIEW.EXE", 0)
         != -1)
     {
-        strcpy_s("C:\\Program Files\\Microsoft Office\\Office12\\PPTVIEW.EXE",
+        wcscpy_s(L"C:\\Program Files\\Microsoft Office\\Office12\\PPTVIEW.EXE",
             stringSize, pptViewerPath);
-        DEBUG("GetPPTViewerPath: exit 32bit 2007\n");
+        DEBUG(L"GetPPTViewerPath: exit 32bit 2007\n");
         return TRUE;
     }
     // Give them the opportunity to place it in the same folder as the app
-    _getcwd(cwd, MAX_PATH);
-    strcat_s(cwd, MAX_PATH, "\\PPTVIEW.EXE");
-    if(_access(cwd, 0) != -1)
+    _wgetcwd(cwd, MAX_PATH);
+    wcscat_s(cwd, MAX_PATH, L"\\PPTVIEW.EXE");
+    if(_waccess(cwd, 0) != -1)
     {
-        strcpy_s(pptViewerPath, stringSize, cwd);
-        DEBUG("GetPPTViewerPath: exit local\n");
+        wcscpy_s(pptViewerPath, stringSize, cwd);
+        DEBUG(L"GetPPTViewerPath: exit local\n");
         return TRUE;
     }
-    DEBUG("GetPPTViewerPath: exit fail\n");
+    DEBUG(L"GetPPTViewerPath: exit fail\n");
     return FALSE;
 }
-BOOL GetPPTViewerPathFromReg(char *pptViewerPath, int stringSize)
+BOOL GetPPTViewerPathFromReg(wchar_t *pptViewerPath, int stringSize)
 {
     HKEY hKey;
     DWORD dwType, dwSize;
@@ -411,17 +416,17 @@
     // PPT Viewer 2003 (recent versions)
     // PPT Viewer 2003 (older versions) 
     // PPT Viewer 97
-    if ((RegOpenKeyEx(HKEY_CLASSES_ROOT,
-        "PowerPointViewer.Show.12\\shell\\Show\\command", 0, KEY_READ, &hKey)
-        != ERROR_SUCCESS)
-        && (RegOpenKeyEx(HKEY_CLASSES_ROOT,
-        "PowerPointViewer.Show.11\\shell\\Show\\command", 0, KEY_READ, &hKey)
-        != ERROR_SUCCESS)
-        && (RegOpenKeyEx(HKEY_CLASSES_ROOT,
-        "Applications\\PPTVIEW.EXE\\shell\\open\\command", 0, KEY_READ, &hKey)
-        != ERROR_SUCCESS)
-        && (RegOpenKeyEx(HKEY_CLASSES_ROOT,
-        "Applications\\PPTVIEW.EXE\\shell\\Show\\command", 0, KEY_READ, &hKey)
+    if ((RegOpenKeyExW(HKEY_CLASSES_ROOT,
+        L"PowerPointViewer.Show.12\\shell\\Show\\command", 0, KEY_READ, &hKey)
+        != ERROR_SUCCESS)
+        && (RegOpenKeyExW(HKEY_CLASSES_ROOT,
+        L"PowerPointViewer.Show.11\\shell\\Show\\command", 0, KEY_READ, &hKey)
+        != ERROR_SUCCESS)
+        && (RegOpenKeyExW(HKEY_CLASSES_ROOT,
+        L"Applications\\PPTVIEW.EXE\\shell\\open\\command", 0, KEY_READ, &hKey)
+        != ERROR_SUCCESS)
+        && (RegOpenKeyExW(HKEY_CLASSES_ROOT,
+        L"Applications\\PPTVIEW.EXE\\shell\\Show\\command", 0, KEY_READ, &hKey)
         != ERROR_SUCCESS))
     {
         return FALSE;
@@ -436,14 +441,14 @@
         return FALSE;
     }
     // remove "%1" from end of key value
-    pptViewerPath[strlen(pptViewerPath) - 4] = '\0';
+    pptViewerPath[wcslen(pptViewerPath) - 4] = '\0';
     return TRUE;
 }
 
 // Unhook the Windows hook
 void Unhook(int id)
 {
-    DEBUG("Unhook: start %d\n", id);
+    DEBUG(L"Unhook: start %d\n", id);
     if (pptView[id].hook != NULL)
     {
         UnhookWindowsHookEx(pptView[id].hook);
@@ -454,13 +459,13 @@
     }
     pptView[id].hook = NULL;
     pptView[id].msgHook = NULL;
-    DEBUG("Unhook: exit ok\n");
+    DEBUG(L"Unhook: exit ok\n");
 }
 
 // Close the PowerPoint viewer, release resources
 DllExport void ClosePPT(int id)
 {
-    DEBUG("ClosePPT: start%d\n", id);
+    DEBUG(L"ClosePPT: start%d\n", id);
     pptView[id].state = PPT_CLOSED;
     Unhook(id);
     if (pptView[id].hWnd == 0)
@@ -474,13 +479,13 @@
     CloseHandle(pptView[id].hThread);
     CloseHandle(pptView[id].hProcess);
     memset(&pptView[id], 0, sizeof(PPTVIEW));
-    DEBUG("ClosePPT: exit ok\n");
+    DEBUG(L"ClosePPT: exit ok\n");
     return;
 }
 // Moves the show back onto the display
 DllExport void Resume(int id)
 {
-    DEBUG("Resume: %d\n", id);
+    DEBUG(L"Resume: %d\n", id);
     MoveWindow(pptView[id].hWnd, pptView[id].rect.left,
         pptView[id].rect.top,
         pptView[id].rect.right - pptView[id].rect.left,
@@ -490,7 +495,7 @@
 // Moves the show off the screen so it can't be seen
 DllExport void Stop(int id)
 {
-    DEBUG("Stop:%d\n", id);
+    DEBUG(L"Stop:%d\n", id);
     MoveWindow(pptView[id].hWnd, -32000, -32000,
         pptView[id].rect.right - pptView[id].rect.left,
         pptView[id].rect.bottom - pptView[id].rect.top, TRUE);
@@ -499,7 +504,7 @@
 // Return the total number of slides
 DllExport int GetSlideCount(int id)
 {
-    DEBUG("GetSlideCount:%d\n", id);
+    DEBUG(L"GetSlideCount:%d\n", id);
     if (pptView[id].state == 0)
     {
         return -1;
@@ -513,7 +518,7 @@
 // Return the number of the slide currently viewing
 DllExport int GetCurrentSlide(int id)
 {
-    DEBUG("GetCurrentSlide:%d\n", id);
+    DEBUG(L"GetCurrentSlide:%d\n", id);
     if (pptView[id].state == 0)
     {
         return -1;
@@ -527,7 +532,7 @@
 // Take a step forwards through the show
 DllExport void NextStep(int id)
 {
-    DEBUG("NextStep:%d (%d)\n", id, pptView[id].currentSlide);
+    DEBUG(L"NextStep:%d (%d)\n", id, pptView[id].currentSlide);
     if (pptView[id].currentSlide > pptView[id].slideCount) return;
     if (pptView[id].currentSlide < pptView[id].slideCount)
     {
@@ -540,7 +545,7 @@
 // Take a step backwards through the show
 DllExport void PrevStep(int id)
 {
-    DEBUG("PrevStep:%d (%d)\n", id, pptView[id].currentSlide);
+    DEBUG(L"PrevStep:%d (%d)\n", id, pptView[id].currentSlide);
     if (pptView[id].currentSlide > 1)
     {
         pptView[id].guess = pptView[id].currentSlide - 1;
@@ -556,7 +561,7 @@
     // So send random unmapped letter first (say 'A'), then we can
     // better guarantee B will blank instead of trying to guess
     // whether it was already blank or not.
-    DEBUG("Blank:%d\n", id);
+    DEBUG(L"Blank:%d\n", id);
     HWND h1 = GetForegroundWindow();
     HWND h2 = GetFocus();
     SetForegroundWindow(pptView[id].hWnd);
@@ -573,7 +578,7 @@
 // Unblank the show
 DllExport void Unblank(int id)
 {
-    DEBUG("Unblank:%d\n", id);
+    DEBUG(L"Unblank:%d\n", id);
     // Pressing any key resumes.
     // For some reason SendMessage works for unblanking, but not blanking.
     SendMessage(pptView[id].hWnd2, WM_CHAR, 'A', 0);
@@ -582,7 +587,7 @@
 // Go directly to a slide
 DllExport void GotoSlide(int id, int slideNo)
 {
-    DEBUG("GotoSlide %i %i:\n", id, slideNo);
+    DEBUG(L"GotoSlide %i %i:\n", id, slideNo);
     // Did try WM_KEYDOWN/WM_CHAR/WM_KEYUP with SendMessage but didn't work
     // perhaps I was sending to the wrong window? No idea.
     // Anyway fall back to keybd_event, which is OK as long we makesure
@@ -619,7 +624,7 @@
     // Only way I've found to get around this is to step backwards all the way
     // through. Lets move the window out of the way first so the audience
     // doesn't see this.
-    DEBUG("RestartShow:%d\n", id);
+    DEBUG(L"RestartShow:%d\n", id);
     Stop(id);
     GotoSlide(id, pptView[id].slideCount);
     for (int i=0; i <= pptView[id].steps - pptView[id].lastSlideSteps; i++)
@@ -644,12 +649,12 @@
     HHOOK hook = globalHook;
     if (nCode == HCBT_CREATEWND)
     {
-        char csClassName[16];
+        wchar_t csClassName[32];
         HWND hCurrWnd = (HWND)wParam;
         DWORD retProcId = NULL;
         GetClassName(hCurrWnd, csClassName, sizeof(csClassName));
-        if ((strcmp(csClassName, "paneClassDC") == 0)
-          ||(strcmp(csClassName, "screenClass") == 0))
+        if ((wcscmp(csClassName, L"paneClassDC") == 0)
+          ||(wcscmp(csClassName, L"screenClass") == 0))
         {
             int id = -1;
             DWORD windowThread = GetWindowThreadProcessId(hCurrWnd, NULL);
@@ -663,7 +668,7 @@
             }
             if (id >= 0)
             {
-                if (strcmp(csClassName, "paneClassDC") == 0)
+                if (wcscmp(csClassName, L"paneClassDC") == 0)
                 {
                     pptView[id].hWnd2 = hCurrWnd;
                 }
@@ -737,7 +742,7 @@
     CWPSTRUCT *cwp;
     cwp = (CWPSTRUCT *)lParam;
     HHOOK hook = NULL;
-    char filename[MAX_PATH];
+    wchar_t filename[MAX_PATH];
 
     DWORD windowThread = GetWindowThreadProcessId(cwp->hwnd, NULL);
     int id = -1;
@@ -758,9 +763,9 @@
             {
                 if ((pptView[id].currentSlide > 0)
                     && (pptView[id].previewPath != NULL
-                    && strlen(pptView[id].previewPath) > 0))
+                    && wcslen(pptView[id].previewPath) > 0))
                 {
-                    sprintf_s(filename, MAX_PATH, "%s%i.bmp",
+                    swprintf_s(filename, MAX_PATH, L"%s%i.bmp",
                         pptView[id].previewPath,
                         pptView[id].currentSlide);
                     CaptureAndSaveWindow(cwp->hwnd, filename);
@@ -820,7 +825,7 @@
     return CallNextHookEx(hook, nCode, wParam, lParam);
 }
 
-VOID CaptureAndSaveWindow(HWND hWnd, CHAR* filename)
+VOID CaptureAndSaveWindow(HWND hWnd, wchar_t* filename)
 {
     HBITMAP hBmp;
     if ((hBmp = CaptureWindow(hWnd)) == NULL)
@@ -863,7 +868,7 @@
 
         // Writing:
         FILE* pFile;
-        int err = fopen_s(&pFile, filename, "wb");
+        int err = _wfopen_s(&pFile, filename, L"wb");
         if (err == 0)
         {
             fwrite(&bmf, sizeof(bmf), 1, pFile);
@@ -893,7 +898,7 @@
         if ((hMemDC = CreateCompatibleDC(hDC)) != NULL)
         {
             hDCBmp = (HBITMAP)SelectObject(hMemDC, hImage);
-            HMODULE hLib = LoadLibrary("User32");
+			HMODULE hLib = LoadLibrary(L"User32");
             // PrintWindow works for windows outside displayable area
             // but was only introduced in WinXP. BitBlt requires the window to
             // be topmost and within the viewable area of the display

=== modified file 'openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h'
--- openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/pptviewlib/pptviewlib.h	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
 * OpenLP - Open Source Lyrics Projection                                      *
 * --------------------------------------------------------------------------- *
+<<<<<<< TREE
 * Copyright (c) 2008-2014 Raoul Snyman                                        *
 * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+* Copyright (c) 2008-2013 Raoul Snyman                                        *
+* Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
 * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
 * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
 * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *
@@ -26,13 +31,13 @@
 
 #define DllExport extern "C"  __declspec( dllexport )
 
-#define DEBUG(...)  if (debug) printf(__VA_ARGS__)
+#define DEBUG(...)  if (debug) wprintf(__VA_ARGS__)
 
 enum PPTVIEWSTATE {PPT_CLOSED, PPT_STARTED, PPT_OPENED, PPT_LOADED,
     PPT_CLOSING};
 
-DllExport int OpenPPT(char *filename, HWND hParentWnd, RECT rect,
-    char *previewPath);
+DllExport int OpenPPT(wchar_t *filename, HWND hParentWnd, RECT rect,
+    wchar_t *previewPath);
 DllExport BOOL CheckInstalled();
 DllExport void ClosePPT(int id);
 DllExport int GetCurrentSlide(int id);
@@ -50,11 +55,11 @@
 LRESULT CALLBACK CbtProc(int nCode, WPARAM wParam, LPARAM lParam);
 LRESULT CALLBACK CwpProc(int nCode, WPARAM wParam, LPARAM lParam);
 LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam);
-BOOL GetPPTViewerPath(char *pptViewerPath, int stringSize);
-BOOL GetPPTViewerPathFromReg(char *pptViewerPath, int stringSize);
+BOOL GetPPTViewerPath(wchar_t *pptViewerPath, int stringSize);
+BOOL GetPPTViewerPathFromReg(wchar_t *pptViewerPath, int stringSize);
 HBITMAP CaptureWindow(HWND hWnd);
-VOID SaveBitmap(CHAR* filename, HBITMAP hBmp) ;
-VOID CaptureAndSaveWindow(HWND hWnd, CHAR* filename);
+VOID SaveBitmap(wchar_t* filename, HBITMAP hBmp) ;
+VOID CaptureAndSaveWindow(HWND hWnd, wchar_t* filename);
 BOOL GetPPTInfo(int id);
 BOOL SavePPTInfo(int id);
 void Unhook(int id);
@@ -80,8 +85,8 @@
     int lastSlideSteps;
     int steps;
     int guess;
-    char filename[MAX_PATH];
-    char previewPath[MAX_PATH];
+    wchar_t filename[MAX_PATH];
+    wchar_t previewPath[MAX_PATH];
     int slideNos[MAX_SLIDES];
     PPTVIEWSTATE state;
 };

=== modified file 'openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj'
--- openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj	2010-09-14 18:18:47 +0000
+++ openlp/plugins/presentations/lib/pptviewlib/pptviewlib.vcproj	2014-01-18 07:58:26 +0000
@@ -21,7 +21,7 @@
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
-			CharacterSet="2"
+			CharacterSet="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -93,7 +93,7 @@
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
-			CharacterSet="2"
+			CharacterSet="1"
 			WholeProgramOptimization="1"
 			>
 			<Tool

=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/__init__.py'
--- openlp/plugins/remotes/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/html/index.html'
--- openlp/plugins/remotes/html/index.html	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/index.html	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/html/openlp.css'
--- openlp/plugins/remotes/html/openlp.css	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/openlp.css	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
 * OpenLP - Open Source Lyrics Projection                                      *
 * --------------------------------------------------------------------------- *
+<<<<<<< TREE
 * Copyright (c) 2008-2014 Raoul Snyman                                        *
 * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+* Copyright (c) 2008-2013 Raoul Snyman                                        *
+* Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
 * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
 * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
 * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *

=== modified file 'openlp/plugins/remotes/html/openlp.js'
--- openlp/plugins/remotes/html/openlp.js	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/openlp.js	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
  * OpenLP - Open Source Lyrics Projection                                      *
  * --------------------------------------------------------------------------- *
+<<<<<<< TREE
  * Copyright (c) 2008-2014 Raoul Snyman                                        *
  * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+ * Copyright (c) 2008-2013 Raoul Snyman                                        *
+ * Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
  * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
  * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
  * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *

=== modified file 'openlp/plugins/remotes/html/stage.css'
--- openlp/plugins/remotes/html/stage.css	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/stage.css	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
 * OpenLP - Open Source Lyrics Projection                                      *
 * --------------------------------------------------------------------------- *
+<<<<<<< TREE
 * Copyright (c) 2008-2014 Raoul Snyman                                        *
 * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+* Copyright (c) 2008-2013 Raoul Snyman                                        *
+* Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
 * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
 * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
 * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *

=== modified file 'openlp/plugins/remotes/html/stage.html'
--- openlp/plugins/remotes/html/stage.html	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/stage.html	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/html/stage.js'
--- openlp/plugins/remotes/html/stage.js	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/html/stage.js	2014-01-18 07:58:26 +0000
@@ -1,8 +1,13 @@
 /******************************************************************************
  * OpenLP - Open Source Lyrics Projection                                      *
  * --------------------------------------------------------------------------- *
+<<<<<<< TREE
  * Copyright (c) 2008-2014 Raoul Snyman                                        *
  * Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      *
+=======
+ * Copyright (c) 2008-2013 Raoul Snyman                                        *
+ * Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      *
+>>>>>>> MERGE-SOURCE
  * Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      *
  * Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   *
  * Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          *

=== modified file 'openlp/plugins/remotes/lib/__init__.py'
--- openlp/plugins/remotes/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/lib/httpserver.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -49,6 +54,7 @@
 
 log = logging.getLogger(__name__)
 
+<<<<<<< TREE
 
 class CustomHandler(BaseHTTPRequestHandler, HttpRouter):
     """
@@ -148,3 +154,492 @@
 
 
 
+=======
+class HttpResponse(object):
+    """
+    A simple object to encapsulate a pseudo-http response.
+    """
+    code = '200 OK'
+    content = ''
+    headers = {
+        'Content-Type': 'text/html; charset="utf-8"\r\n'
+    }
+
+    def __init__(self, content='', headers={}, code=None):
+        self.content = content
+        for key, value in headers.iteritems():
+            self.headers[key] = value
+        if code:
+            self.code = code
+
+
+class HttpServer(object):
+    """
+    Ability to control OpenLP via a web browser.
+    """
+    def __init__(self, plugin):
+        """
+        Initialise the httpserver, and start the server.
+        """
+        log.debug(u'Initialise httpserver')
+        self.plugin = plugin
+        self.html_dir = os.path.join(
+            AppLocation.get_directory(AppLocation.PluginsDir),
+            u'remotes', u'html')
+        self.connections = []
+        self.current_item = None
+        self.current_slide = None
+        self.start_tcp()
+
+    def start_tcp(self):
+        """
+        Start the http server, use the port in the settings default to 4316.
+        Listen out for slide and song changes so they can be broadcast to
+        clients. Listen out for socket connections.
+        """
+        log.debug(u'Start TCP server')
+        port = Settings().value(
+            self.plugin.settingsSection + u'/port',
+            QtCore.QVariant(4316)).toInt()[0]
+        address = Settings().value(
+            self.plugin.settingsSection + u'/ip address',
+            QtCore.QVariant(u'0.0.0.0')).toString()
+        self.server = QtNetwork.QTcpServer()
+        self.server.listen(QtNetwork.QHostAddress(address), port)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_live_changed'),
+            self.slide_change)
+        QtCore.QObject.connect(Receiver.get_receiver(),
+            QtCore.SIGNAL(u'slidecontroller_live_started'),
+            self.item_change)
+        QtCore.QObject.connect(self.server,
+            QtCore.SIGNAL(u'newConnection()'), self.new_connection)
+        log.debug(u'TCP listening on port %d' % port)
+
+    def slide_change(self, row):
+        """
+        Slide change listener. Store the item and tell the clients.
+        """
+        self.current_slide = row
+
+    def item_change(self, items):
+        """
+        Item (song) change listener. Store the slide and tell the clients.
+        """
+        self.current_item = items[0]
+
+    def new_connection(self):
+        """
+        A new http connection has been made. Create a client object to handle
+        communication.
+        """
+        log.debug(u'new http connection')
+        socket = self.server.nextPendingConnection()
+        if socket:
+            self.connections.append(HttpConnection(self, socket))
+
+    def close_connection(self, connection):
+        """
+        The connection has been closed. Clean up
+        """
+        log.debug(u'close http connection')
+        if connection in self.connections:
+            self.connections.remove(connection)
+
+    def close(self):
+        """
+        Close down the http server.
+        """
+        log.debug(u'close http server')
+        self.server.close()
+
+
+class HttpConnection(object):
+    """
+    A single connection, this handles communication between the server
+    and the client.
+    """
+    def __init__(self, parent, socket):
+        """
+        Initialise the http connection. Listen out for socket signals.
+        """
+        log.debug(u'Initialise HttpConnection: %s' %
+            socket.peerAddress().toString())
+        self.socket = socket
+        self.parent = parent
+        self.routes = [
+            (u'^/$', self.serve_file),
+            (u'^/(stage)$', self.serve_file),
+            (r'^/files/(.*)$', self.serve_file),
+            (r'^/api/poll$', self.poll),
+            (r'^/api/controller/(live|preview)/(.*)$', self.controller),
+            (r'^/api/service/(.*)$', self.service),
+            (r'^/api/display/(hide|show|blank|theme|desktop)$', self.display),
+            (r'^/api/alert$', self.alert),
+            (r'^/api/plugin/(search)$', self.pluginInfo),
+            (r'^/api/(.*)/search$', self.search),
+            (r'^/api/(.*)/live$', self.go_live),
+            (r'^/api/(.*)/add$', self.add_to_service)
+        ]
+        QtCore.QObject.connect(self.socket, QtCore.SIGNAL(u'readyRead()'),
+            self.ready_read)
+        QtCore.QObject.connect(self.socket, QtCore.SIGNAL(u'disconnected()'),
+            self.disconnected)
+        self.translate()
+
+    def _get_service_items(self):
+        service_items = []
+        service_manager = self.parent.plugin.serviceManager
+        if self.parent.current_item:
+            cur_uuid = self.parent.current_item._uuid
+        else:
+            cur_uuid = None
+        for item in service_manager.serviceItems:
+            service_item = item[u'service_item']
+            service_items.append({
+                u'id': unicode(service_item._uuid),
+                u'title': unicode(service_item.get_display_title()),
+                u'plugin': unicode(service_item.name),
+                u'notes': unicode(service_item.notes),
+                u'selected': (service_item._uuid == cur_uuid)
+            })
+        return service_items
+
+    def translate(self):
+        """
+        Translate various strings in the mobile app.
+        """
+        self.template_vars = {
+            'app_title': translate('RemotePlugin.Mobile', 'OpenLP 2.0 Remote'),
+            'stage_title': translate('RemotePlugin.Mobile',
+                'OpenLP 2.0 Stage View'),
+            'service_manager': translate('RemotePlugin.Mobile',
+                'Service Manager'),
+            'slide_controller': translate('RemotePlugin.Mobile',
+                'Slide Controller'),
+            'alerts': translate('RemotePlugin.Mobile', 'Alerts'),
+            'search': translate('RemotePlugin.Mobile', 'Search'),
+            'home': translate('RemotePlugin.Mobile', 'Home'),
+            'refresh': translate('RemotePlugin.Mobile', 'Refresh'),
+            'blank': translate('RemotePlugin.Mobile', 'Blank'),
+            'theme': translate('RemotePlugin.Mobile', 'Theme'),
+            'desktop': translate('RemotePlugin.Mobile', 'Desktop'),
+            'show': translate('RemotePlugin.Mobile', 'Show'),
+            'prev': translate('RemotePlugin.Mobile', 'Prev'),
+            'next': translate('RemotePlugin.Mobile', 'Next'),
+            'text': translate('RemotePlugin.Mobile', 'Text'),
+            'show_alert': translate('RemotePlugin.Mobile', 'Show Alert'),
+            'go_live': translate('RemotePlugin.Mobile', 'Go Live'),
+            'add_to_service': translate('RemotePlugin.Mobile',
+                'Add to Service'),
+            'add_and_go_to_service': translate('RemotePlugin.Mobile',
+                'Add &amp; Go to Service'),
+            'no_results': translate('RemotePlugin.Mobile', 'No Results'),
+            'options': translate('RemotePlugin.Mobile', 'Options'),
+            'service': translate('RemotePlugin.Mobile', 'Service'),
+            'slides': translate('RemotePlugin.Mobile', 'Slides')
+        }
+
+    def ready_read(self):
+        """
+        Data has been sent from the client. Respond to it
+        """
+        log.debug(u'ready to read socket')
+        if self.socket.canReadLine():
+            data = str(self.socket.readLine())
+            try:
+                log.debug(u'received: ' + data)
+            except UnicodeDecodeError:
+                # Malicious request containing non-ASCII characters.
+                self.close()
+                return
+            words = data.split(' ')
+            response = None
+            if words[0] == u'GET':
+                url = urlparse.urlparse(words[1])
+                self.url_params = urlparse.parse_qs(url.query)
+                # Loop through the routes we set up earlier and execute them
+                for route, func in self.routes:
+                    match = re.match(route, url.path)
+                    if match:
+                        log.debug('Route "%s" matched "%s"', route, url.path)
+                        args = []
+                        for param in match.groups():
+                            args.append(param)
+                        response = func(*args)
+                        break
+            if response:
+                self.send_response(response)
+            else:
+                self.send_response(HttpResponse(code='404 Not Found'))
+            self.close()
+
+    def serve_file(self, filename=None):
+        """
+        Send a file to the socket. For now, just a subset of file types
+        and must be top level inside the html folder.
+        If subfolders requested return 404, easier for security for the present.
+
+        Ultimately for i18n, this could first look for xx/file.html before
+        falling back to file.html... where xx is the language, e.g. 'en'
+        """
+        log.debug(u'serve file request %s' % filename)
+        if not filename:
+            filename = u'index.html'
+        elif filename == u'stage':
+            filename = u'stage.html'
+        path = os.path.normpath(os.path.join(self.parent.html_dir, filename))
+        if not path.startswith(self.parent.html_dir):
+            return HttpResponse(code=u'404 Not Found')
+        ext = os.path.splitext(filename)[1]
+        html = None
+        if ext == u'.html':
+            mimetype = u'text/html'
+            variables = self.template_vars
+            html = Template(filename=path, input_encoding=u'utf-8',
+                output_encoding=u'utf-8').render(**variables)
+        elif ext == u'.css':
+            mimetype = u'text/css'
+        elif ext == u'.js':
+            mimetype = u'application/x-javascript'
+        elif ext == u'.jpg':
+            mimetype = u'image/jpeg'
+        elif ext == u'.gif':
+            mimetype = u'image/gif'
+        elif ext == u'.png':
+            mimetype = u'image/png'
+        else:
+            mimetype = u'text/plain'
+        file_handle = None
+        try:
+            if html:
+                content = html
+            else:
+                file_handle = open(path, u'rb')
+                log.debug(u'Opened %s' % path)
+                content = file_handle.read()
+        except IOError:
+            log.exception(u'Failed to open %s' % path)
+            return HttpResponse(code=u'404 Not Found')
+        finally:
+            if file_handle:
+                file_handle.close()
+        return HttpResponse(content, {u'Content-Type': mimetype})
+
+    def poll(self):
+        """
+        Poll OpenLP to determine the current slide number and item name.
+        """
+        result = {
+            u'service': self.parent.plugin.serviceManager.serviceId,
+            u'slide': self.parent.current_slide or 0,
+            u'item': self.parent.current_item._uuid \
+                if self.parent.current_item else u'',
+            u'twelve':Settings().value(
+            u'remotes/twelve hour', QtCore.QVariant(True)).toBool(),
+            u'blank': self.parent.plugin.liveController.blankScreen.\
+                isChecked(),
+            u'theme': self.parent.plugin.liveController.themeScreen.\
+                isChecked(),
+            u'display': self.parent.plugin.liveController.desktopScreen.\
+                isChecked()
+        }
+        return HttpResponse(json.dumps({u'results': result}),
+            {u'Content-Type': u'application/json'})
+
+    def display(self, action):
+        """
+        Hide or show the display screen.
+
+        ``action``
+            This is the action, either ``hide`` or ``show``.
+        """
+        Receiver.send_message(u'slidecontroller_toggle_display', action)
+        return HttpResponse(json.dumps({u'results': {u'success': True}}),
+            {u'Content-Type': u'application/json'})
+
+    def alert(self):
+        """
+        Send an alert.
+        """
+        plugin = self.parent.plugin.pluginManager.get_plugin_by_name("alerts")
+        if plugin.status == PluginStatus.Active:
+            try:
+                text = json.loads(
+                    self.url_params[u'data'][0])[u'request'][u'text']
+            except KeyError, ValueError:
+                return HttpResponse(code=u'400 Bad Request')
+            text = urllib.unquote(text)
+            Receiver.send_message(u'alerts_text', [text])
+            success = True
+        else:
+            success = False
+        return HttpResponse(json.dumps({u'results': {u'success': success}}),
+            {u'Content-Type': u'application/json'})
+
+    def controller(self, type, action):
+        """
+        Perform an action on the slide controller.
+
+        ``type``
+            This is the type of slide controller, either ``preview`` or
+            ``live``.
+
+        ``action``
+            The action to perform.
+        """
+        event = u'slidecontroller_%s_%s' % (type, action)
+        if action == u'text':
+            current_item = self.parent.current_item
+            data = []
+            if current_item:
+                for index, frame in enumerate(current_item.get_frames()):
+                    item = {}
+                    if current_item.is_text():
+                        if frame[u'verseTag']:
+                            item[u'tag'] = unicode(frame[u'verseTag'])
+                        else:
+                            item[u'tag'] = unicode(index + 1)
+                        item[u'text'] = unicode(frame[u'text'])
+                        item[u'html'] = unicode(frame[u'html'])
+                    else:
+                        item[u'tag'] = unicode(index + 1)
+                        item[u'text'] = unicode(frame[u'title'])
+                        item[u'html'] = unicode(frame[u'title'])
+                    item[u'selected'] = (self.parent.current_slide == index)
+                    data.append(item)
+            json_data = {u'results': {u'slides': data}}
+            if current_item:
+                json_data[u'results'][u'item'] = self.parent.current_item._uuid
+        else:
+            if self.url_params and self.url_params.get(u'data'):
+                try:
+                    data = json.loads(self.url_params[u'data'][0])
+                except KeyError, ValueError:
+                    return HttpResponse(code=u'400 Bad Request')
+                log.info(data)
+                # This slot expects an int within a list.
+                id = data[u'request'][u'id']
+                Receiver.send_message(event, [id])
+            else:
+                Receiver.send_message(event)
+            json_data = {u'results': {u'success': True}}
+        return HttpResponse(json.dumps(json_data),
+            {u'Content-Type': u'application/json'})
+
+    def service(self, action):
+        event = u'servicemanager_%s' % action
+        if action == u'list':
+            return HttpResponse(
+                json.dumps({u'results': {u'items': self._get_service_items()}}),
+                {u'Content-Type': u'application/json'})
+        else:
+            event += u'_item'
+        if self.url_params and self.url_params.get(u'data'):
+            try:
+                data = json.loads(self.url_params[u'data'][0])
+            except KeyError, ValueError:
+                return HttpResponse(code=u'400 Bad Request')
+            Receiver.send_message(event, data[u'request'][u'id'])
+        else:
+            Receiver.send_message(event)
+        return HttpResponse(json.dumps({u'results': {u'success': True}}),
+            {u'Content-Type': u'application/json'})
+
+    def pluginInfo(self, action):
+        """
+        Return plugin related information, based on the action.
+
+        ``action``
+            The action to perform. If *search* return a list of plugin names
+            which support search.
+        """
+        if action == u'search':
+            searches = []
+            for plugin in self.parent.plugin.pluginManager.plugins:
+                if plugin.status == PluginStatus.Active and \
+                    plugin.mediaItem and plugin.mediaItem.hasSearch:
+                    searches.append([plugin.name, unicode(
+                        plugin.textStrings[StringContent.Name][u'plural'])])
+            return HttpResponse(
+                json.dumps({u'results': {u'items': searches}}),
+                {u'Content-Type': u'application/json'})
+
+    def search(self, type):
+        """
+        Return a list of items that match the search text.
+
+        ``type``
+            The plugin name to search in.
+        """
+        try:
+            text = json.loads(self.url_params[u'data'][0])[u'request'][u'text']
+        except KeyError, ValueError:
+            return HttpResponse(code=u'400 Bad Request')
+        text = urllib.unquote(text)
+        plugin = self.parent.plugin.pluginManager.get_plugin_by_name(type)
+        if plugin.status == PluginStatus.Active and \
+            plugin.mediaItem and plugin.mediaItem.hasSearch:
+            results = plugin.mediaItem.search(text, False)
+        else:
+            results = []
+        return HttpResponse(
+            json.dumps({u'results': {u'items': results}}),
+            {u'Content-Type': u'application/json'})
+
+    def go_live(self, type):
+        """
+        Go live on an item of type ``type``.
+        """
+        try:
+            id = json.loads(self.url_params[u'data'][0])[u'request'][u'id']
+        except KeyError, ValueError:
+            return HttpResponse(code=u'400 Bad Request')
+        plugin = self.parent.plugin.pluginManager.get_plugin_by_name(type)
+        if plugin.status == PluginStatus.Active and plugin.mediaItem:
+            plugin.mediaItem.goLive(id, remote=True)
+        return HttpResponse(code=u'200 OK')
+
+    def add_to_service(self, type):
+        """
+        Add item of type ``type`` to the end of the service.
+        """
+        try:
+            id = json.loads(self.url_params[u'data'][0])[u'request'][u'id']
+        except KeyError, ValueError:
+            return HttpResponse(code=u'400 Bad Request')
+        plugin = self.parent.plugin.pluginManager.get_plugin_by_name(type)
+        if plugin.status == PluginStatus.Active and plugin.mediaItem:
+            item_id = plugin.mediaItem.createItemFromId(id)
+            plugin.mediaItem.addToService(item_id, remote=True)
+        return HttpResponse(code=u'200 OK')
+
+    def send_response(self, response):
+        http = u'HTTP/1.1 %s\r\n' % response.code
+        for header, value in response.headers.iteritems():
+            http += '%s: %s\r\n' % (header, value)
+        http += '\r\n'
+        if self.socket:
+            # Write to the socket if it's open, else ignore it.
+            # See http://support.openlp.org/scp/tickets.php?id=2112
+            self.socket.write(http)
+            self.socket.write(response.content)
+
+    def disconnected(self):
+        """
+        The client has disconnected. Tidy up
+        """
+        log.debug(u'socket disconnected')
+        self.close()
+
+    def close(self):
+        """
+        The server has closed the connection. Tidy up
+        """
+        if not self.socket:
+            return
+        log.debug(u'close socket')
+        self.socket.close()
+        self.socket = None
+        self.parent.close_connection(self)
+>>>>>>> MERGE-SOURCE

=== modified file 'openlp/plugins/remotes/lib/remotetab.py'
--- openlp/plugins/remotes/lib/remotetab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/lib/remotetab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/remotes/remoteplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/__init__.py'
--- openlp/plugins/songs/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/__init__.py'
--- openlp/plugins/songs/forms/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/authorsdialog.py'
--- openlp/plugins/songs/forms/authorsdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/authorsdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/authorsform.py'
--- openlp/plugins/songs/forms/authorsform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/authorsform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -271,6 +276,7 @@
         self.audio_layout.addLayout(self.audio_buttons_layout)
         self.song_tab_widget.addTab(self.audio_tab, '')
         # Last few bits
+<<<<<<< TREE
         self.dialog_layout.addWidget(self.song_tab_widget)
         self.bottom_layout = QtGui.QHBoxLayout()
         self.bottom_layout.setObjectName('bottom_layout')
@@ -281,6 +287,19 @@
         self.bottom_layout.addWidget(self.button_box)
         self.dialog_layout.addLayout(self.bottom_layout)
         self.retranslateUi(edit_song_dialog)
+=======
+        self.dialogLayout.addWidget(self.songTabWidget)
+        self.bottomLayout = QtGui.QHBoxLayout()
+        self.bottomLayout.setObjectName(u'bottomLayout')
+        self.warningLabel = QtGui.QLabel(editSongDialog)
+        self.warningLabel.setObjectName(u'warningLabel')
+        self.bottomLayout.addWidget(self.warningLabel)
+        self.buttonBox = create_button_box(editSongDialog, u'buttonBox',
+            [u'cancel', u'save'])
+        self.bottomLayout.addWidget(self.buttonBox)
+        self.dialogLayout.addLayout(self.bottomLayout)
+        self.retranslateUi(editSongDialog)
+>>>>>>> MERGE-SOURCE
 
     def retranslateUi(self, edit_song_dialog):
         """
@@ -319,6 +338,7 @@
             translate('SongsPlugin.EditSongForm', 'Theme, Copyright Info && Comments'))
         self.song_tab_widget.setTabText(self.song_tab_widget.indexOf(self.audio_tab),
             translate('SongsPlugin.EditSongForm', 'Linked Audio'))
+<<<<<<< TREE
         self.from_file_button.setText(translate('SongsPlugin.EditSongForm', 'Add &File(s)'))
         self.from_media_button.setText(translate('SongsPlugin.EditSongForm', 'Add &Media'))
         self.audio_remove_button.setText(translate('SongsPlugin.EditSongForm', '&Remove'))
@@ -330,6 +350,22 @@
 
 
 def create_combo_box(parent, name):
+=======
+        self.audioAddFromFileButton.setText(
+            translate('SongsPlugin.EditSongForm', 'Add &File(s)'))
+        self.audioAddFromMediaButton.setText(
+            translate('SongsPlugin.EditSongForm', 'Add &Media'))
+        self.audioRemoveButton.setText(
+            translate('SongsPlugin.EditSongForm', '&Remove'))
+        self.audioRemoveAllButton.setText(
+            translate('SongsPlugin.EditSongForm', 'Remove &All'))
+        self.notAlllVersesUsed = translate('SongsPlugin.EditSongForm', '<strong>Warning:</strong>'
+                ' Not all of the verses are in use.')
+        self.noVerseOrder = translate('SongsPlugin.EditSongForm', '<strong>Warning:</strong>'
+                ' You have not entered a verse order.')
+
+def editSongDialogComboBox(parent, name):
+>>>>>>> MERGE-SOURCE
     """
     Utility method to generate a standard combo box for this dialog.
 

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -38,10 +43,20 @@
 
 from PyQt4 import QtCore, QtGui
 
+<<<<<<< TREE
 from openlp.core.common import Registry, AppLocation, UiStrings, check_directory_exists, translate
 from openlp.core.lib import FileDialog, PluginStatus, MediaType, create_separated_list
 from openlp.core.lib.ui import set_case_insensitive_completer, critical_error_message_box, find_and_set_in_combo_box
 from openlp.plugins.songs.lib import VerseType, clean_song
+=======
+from openlp.core.lib import FileDialog, PluginStatus, Receiver, MediaType, translate, \
+    create_separated_list, check_directory_exists
+from openlp.core.lib.ui import UiStrings, set_case_insensitive_completer, \
+    critical_error_message_box, find_and_set_in_combo_box
+from openlp.core.utils import AppLocation
+from openlp.plugins.songs.forms import EditVerseForm, MediaFilesForm
+from openlp.plugins.songs.lib import SongXML, VerseType, clean_song
+>>>>>>> MERGE-SOURCE
 from openlp.plugins.songs.lib.db import Book, Song, Author, Topic, MediaFile
 from openlp.plugins.songs.lib.ui import SongStrings
 from openlp.plugins.songs.lib.xml import SongXML
@@ -107,6 +122,27 @@
         self.audio_list_widget.setAlternatingRowColors(True)
         self.find_verse_split = re.compile('---\[\]---\n', re.UNICODE)
         self.whitespace = re.compile(r'\W+', re.UNICODE)
+        self.find_tags = re.compile(u'\{/?\w+\}', re.UNICODE)
+
+    def keyPressEvent(self, event):
+        """
+        Reimplement the keyPressEvent to react on Return/Enter keys. When some
+        combo boxes have focus we do not want dialog's default action be
+        triggered but instead our own.
+
+        ``event``
+            A QtGui.QKeyEvent event.
+        """
+        if event.key() in (QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return):
+            if self.authorsComboBox.hasFocus() and \
+                    self.authorsComboBox.currentText():
+                self.onAuthorAddButtonClicked()
+                return
+            if self.topicsComboBox.hasFocus() and \
+                    self.topicsComboBox.currentText():
+                self.onTopicAddButtonClicked()
+                return
+        QtGui.QDialog.keyPressEvent(self, event)
 
     def _load_objects(self, cls, combo, cache):
         """
@@ -331,6 +367,7 @@
         log.debug('New Song')
         self.song = None
         self.initialise()
+<<<<<<< TREE
         self.song_tab_widget.setCurrentIndex(0)
         self.title_edit.clear()
         self.alternative_edit.clear()
@@ -351,6 +388,28 @@
         self.load_media_files()
         self.theme_combo_box.setEditText('')
         self.theme_combo_box.setCurrentIndex(0)
+=======
+        self.songTabWidget.setCurrentIndex(0)
+        self.titleEdit.clear()
+        self.alternativeEdit.clear()
+        self.copyrightEdit.clear()
+        self.verseOrderEdit.clear()
+        self.commentsEdit.clear()
+        self.CCLNumberEdit.clear()
+        self.verseListWidget.clear()
+        self.verseListWidget.setRowCount(0)
+        self.authorsListView.clear()
+        self.topicsListView.clear()
+        self.audioListWidget.clear()
+        self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
+        self.songBookNumberEdit.clear()
+        self.loadAuthors()
+        self.loadTopics()
+        self.loadBooks()
+        self.loadMediaFiles()
+        self.themeComboBox.setEditText(u'')
+        self.themeComboBox.setCurrentIndex(0)
+>>>>>>> MERGE-SOURCE
         # it's a new song to preview is not possible
         self.preview_button.setVisible(False)
 
@@ -382,6 +441,7 @@
             self.song_book_combo_box.setEditText('')
             self.song_book_combo_box.setCurrentIndex(0)
         if self.song.theme_name:
+<<<<<<< TREE
             find_and_set_in_combo_box(self.theme_combo_box, str(self.song.theme_name))
         else:
             # Clear the theme combo box in case it was previously set (bug #1212801)
@@ -391,6 +451,21 @@
         self.comments_edit.setPlainText(self.song.comments if self.song.comments else '')
         self.ccli_number_edit.setText(self.song.ccli_number if self.song.ccli_number else '')
         self.song_book_number_edit.setText(self.song.song_number if self.song.song_number else '')
+=======
+            find_and_set_in_combo_box(
+                self.themeComboBox, unicode(self.song.theme_name))
+        else:
+            self.themeComboBox.setEditText(u'')
+            self.themeComboBox.setCurrentIndex(0)
+        self.copyrightEdit.setText(
+            self.song.copyright if self.song.copyright else u'')
+        self.commentsEdit.setPlainText(
+            self.song.comments if self.song.comments else u'')
+        self.CCLNumberEdit.setText(
+            self.song.ccli_number if self.song.ccli_number else u'')
+        self.songBookNumberEdit.setText(
+            self.song.song_number if self.song.song_number else u'')
+>>>>>>> MERGE-SOURCE
         # lazy xml migration for now
         self.verse_list_widget.clear()
         self.verse_list_widget.setRowCount(0)
@@ -461,9 +536,15 @@
             self.audio_list_widget.addItem(media_file)
         self.title_edit.setFocus()
         # Hide or show the preview button.
+<<<<<<< TREE
         self.preview_button.setVisible(preview)
         # Check if all verse tags are used.
         self.on_verse_order_text_changed(self.verse_order_edit.text())
+=======
+        self.previewButton.setVisible(preview)
+        # Check if all verse tags are used.
+        self.onVerseOrderTextChanged(self.verseOrderEdit.text())
+>>>>>>> MERGE-SOURCE
 
     def tag_rows(self):
         """
@@ -708,6 +789,7 @@
             verse = verse.data(QtCore.Qt.UserRole)
             if verse not in verses_in_order:
                 verses_not_used.append(verse)
+<<<<<<< TREE
         # Set the label text.
         label_text = ''
         # No verse order was entered.
@@ -721,6 +803,163 @@
     def on_copyright_insert_button_triggered(self):
         text = self.copyright_edit.text()
         pos = self.copyright_edit.cursorPosition()
+=======
+        label_text = u''
+        if not self.verseOrderEdit.text():
+            label_text = self.noVerseOrder
+        elif verses_not_used:
+            label_text = self.notAlllVersesUsed
+        self.warningLabel.setText(label_text)
+
+    def __extractVerseOrder(self, verse_order):
+        order = []
+        order_names = unicode(verse_order).split()
+        for item in order_names:
+            if len(item) == 1:
+                verse_index = VerseType.from_translated_tag(item, None)
+                if verse_index is not None:
+                    order.append(VerseType.Tags[verse_index] + u'1')
+                else:
+                    # it matches no verses anyway
+                    order.append(u'')
+            else:
+                verse_index = VerseType.from_translated_tag(item[0], None)
+                if verse_index is None:
+                    # it matches no verses anyway
+                    order.append(u'')
+                else:
+                    verse_tag = VerseType.Tags[verse_index]
+                    verse_num = item[1:].lower()
+                    order.append(verse_tag + verse_num)
+        return order
+
+    def __validateVerseList(self, verse_order, verse_count):
+        verses = []
+        invalid_verses = []
+        verse_names = []
+        order_names = unicode(verse_order).split()
+        order = self.__extractVerseOrder(verse_order)
+        for index in range(verse_count):
+            verse = self.verseListWidget.item(index, 0)
+            verse = unicode(verse.data(QtCore.Qt.UserRole).toString())
+            if verse not in verse_names:
+                verses.append(verse)
+                verse_names.append(u'%s%s' % (
+                    VerseType.translated_tag(verse[0]), verse[1:]))
+        for count, item in enumerate(order):
+            if item not in verses:
+                invalid_verses.append(order_names[count])
+        if invalid_verses:
+            valid = create_separated_list(verse_names)
+            if len(invalid_verses) > 1:
+                critical_error_message_box(message=unicode(translate(
+                    'SongsPlugin.EditSongForm', 'The verse order is invalid. '
+                    'There are no verses corresponding to %s. Valid entries '
+                    'are %s.')) % (u', '.join(invalid_verses), valid))
+            else:
+                critical_error_message_box(message=unicode(translate(
+                    'SongsPlugin.EditSongForm', 'The verse order is invalid. '
+                    'There is no verse corresponding to %s. Valid entries '
+                    'are %s.')) % (invalid_verses[0], valid))
+        return len(invalid_verses) == 0
+
+    def __validateSong(self):
+        """
+        Check the validity of the song.
+        """
+        # This checks data in the form *not* self.song. self.song is still
+        # None at this point.
+        log.debug(u'Validate Song')
+        # Lets be nice and assume the data is correct.
+        if not self.titleEdit.text():
+            self.songTabWidget.setCurrentIndex(0)
+            self.titleEdit.setFocus()
+            critical_error_message_box(
+                message=translate('SongsPlugin.EditSongForm',
+                'You need to type in a song title.'))
+            return False
+        if self.verseListWidget.rowCount() == 0:
+            self.songTabWidget.setCurrentIndex(0)
+            self.verseListWidget.setFocus()
+            critical_error_message_box(
+                message=translate('SongsPlugin.EditSongForm',
+                'You need to type in at least one verse.'))
+            return False
+        if self.authorsListView.count() == 0:
+            self.songTabWidget.setCurrentIndex(1)
+            self.authorsListView.setFocus()
+            critical_error_message_box(
+                message=translate('SongsPlugin.EditSongForm',
+                'You need to have an author for this song.'))
+            return False
+        if self.verseOrderEdit.text():
+            result = self.__validateVerseList(self.verseOrderEdit.text(),
+                self.verseListWidget.rowCount())
+            if not result:
+                return False
+        text = unicode(self.songBookComboBox.currentText())
+        if self.songBookComboBox.findText(text, QtCore.Qt.MatchExactly) < 0:
+            if QtGui.QMessageBox.question(self,
+                translate('SongsPlugin.EditSongForm', 'Add Book'),
+                translate('SongsPlugin.EditSongForm', 'This song book does '
+                'not exist, do you want to add it?'),
+                QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
+                QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
+                book = Book.populate(name=text, publisher=u'')
+                self.manager.save_object(book)
+            else:
+                return False
+        cnt_errors = 0
+        error_list = ''
+        verse_tag = []
+        verse_num = []
+        for i in range(self.verseListWidget.rowCount()):
+            item = self.verseListWidget.item(i, 0)
+            tags = self.find_tags.findall(item.text())
+            if self._validate_tags(tags) == False:
+                field = unicode(item.data(QtCore.Qt.UserRole).toString())
+                verse_tag.append(VerseType.translated_name(field[0]))
+                verse_num.append(field[1:])
+                cnt_errors += 1;
+        if cnt_errors > 0:
+            for i in range(cnt_errors):
+                error_list += '%s %s' % (verse_tag[i], verse_num[i])
+                if i < cnt_errors-1:
+                    error_list += ', '
+            critical_error_message_box(
+                message=translate('SongsPlugin.EditSongForm',
+                'There are misplaced formatting tags in the following verses:\n\n%s\n\n'
+                'Please correct these tags before continuing.' % error_list))
+            return False
+        return True
+
+    def _validate_tags(self, _tags):
+        """ 
+        Validates a list of tags
+        Deletes the first affiliated tag pair which is located side by side in the list
+        and call itself recursively with the shortened tag list. 
+        If there is any misplaced tag in the list, either the lenght of the tag list is not even, 
+        or the function won't find any tag pairs side by side.
+        If there is no misplaced tag, the length of the list will be zero on any recursive run.
+
+        Return:
+            True if the function can't find any mismatched tags
+            False if there are mismatched tags.
+        """
+        if len(_tags) == 0:
+            return True
+        if len(_tags) % 2 != 0:
+            return False
+        for i in range(len(_tags)-1):
+            if _tags[i+1] == "{/" + _tags[i][1:]:
+                del _tags[i:i+2]
+                return self._validate_tags(_tags)
+        return False
+
+    def onCopyrightInsertButtonTriggered(self):
+        text = self.copyrightEdit.text()
+        pos = self.copyrightEdit.cursorPosition()
+>>>>>>> MERGE-SOURCE
         sign = SongStrings.CopyrightSymbol
         text = text[:pos] + sign + text[pos:]
         self.copyright_edit.setText(text)
@@ -757,9 +996,16 @@
         """
         Loads file(s) from the filesystem.
         """
+<<<<<<< TREE
         filters = '%s (*)' % UiStrings().AllFiles
         filenames = FileDialog.getOpenFileNames(self,
             translate('SongsPlugin.EditSongForm', 'Open File(s)'), '', filters)
+=======
+        filters = u'%s (*)' % UiStrings().AllFiles
+        filenames = FileDialog.getOpenFileNames(self,
+            translate('SongsPlugin.EditSongForm', 'Open File(s)'),
+            QtCore.QString(), filters)
+>>>>>>> MERGE-SOURCE
         for filename in filenames:
             item = QtGui.QListWidgetItem(os.path.split(str(filename))[1])
             item.setData(QtCore.Qt.UserRole, filename)
@@ -933,6 +1179,7 @@
                 log.exception('Could not remove directory: %s', save_path)
         clean_song(self.manager, self.song)
         self.manager.save_object(self.song)
+<<<<<<< TREE
         self.media_item.auto_select_id = self.song.id
 
     def _get_plugin_manager(self):
@@ -954,3 +1201,35 @@
         return self._theme_manager
 
     theme_manager = property(_get_theme_manager)
+=======
+        self.mediaitem.autoSelectId = self.song.id
+
+    def _processLyrics(self):
+        """
+        Process the lyric data entered by the user into the OpenLP XML format.
+        """
+        # This method must only be run after the self.song = Song() assignment.
+        log.debug(u'_processLyrics')
+        try:
+            sxml = SongXML()
+            multiple = []
+            for i in range(self.verseListWidget.rowCount()):
+                item = self.verseListWidget.item(i, 0)
+                verse_id = unicode(item.data(QtCore.Qt.UserRole).toString())
+                verse_tag = verse_id[0]
+                verse_num = verse_id[1:]
+                sxml.add_verse_to_lyrics(verse_tag, verse_num,
+                    unicode(item.text()))
+                if verse_num > u'1' and verse_tag not in multiple:
+                    multiple.append(verse_tag)
+            self.song.lyrics = unicode(sxml.extract_xml(), u'utf-8')
+            for verse in multiple:
+                self.song.verse_order = re.sub(u'([' + verse.upper() +
+                    verse.lower() + u'])(\W|$)', r'\g<1>1\2',
+                    self.song.verse_order)
+        except:
+            log.exception(u'Problem processing song Lyrics \n%s',
+                sxml.dump_xml())
+            raise
+
+>>>>>>> MERGE-SOURCE

=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
--- openlp/plugins/songs/forms/editversedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editversedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/editverseform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/mediafilesdialog.py'
--- openlp/plugins/songs/forms/mediafilesdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/mediafilesdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/mediafilesform.py'
--- openlp/plugins/songs/forms/mediafilesform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/mediafilesform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/songbookdialog.py'
--- openlp/plugins/songs/forms/songbookdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songbookdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/songbookform.py'
--- openlp/plugins/songs/forms/songbookform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songbookform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/songexportform.py'
--- openlp/plugins/songs/forms/songexportform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songexportform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songimportform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -35,9 +40,15 @@
 
 from PyQt4 import QtCore, QtGui
 
+<<<<<<< TREE
 from openlp.core.common import Registry, Settings, UiStrings, translate
 from openlp.core.lib import FileDialog
 from openlp.core.lib.ui import critical_error_message_box
+=======
+from openlp.core.lib import FileDialog, Receiver, SettingsManager, translate
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
+from openlp.core.lib.settings import Settings
+>>>>>>> MERGE-SOURCE
 from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
 from openlp.plugins.songs.lib.importer import SongFormat, SongFormatSelect
 
@@ -243,10 +254,18 @@
                 u'SongBeamer Files (*.sng)'
         """
         if filters:
+<<<<<<< TREE
             filters += ';;'
         filters += '%s (*)' % UiStrings().AllFiles
         filenames = FileDialog.getOpenFileNames(self, title,
             Settings().value(self.plugin.settings_section + '/last directory import'), filters)
+=======
+            filters += u';;'
+        filters += u'%s (*)' % UiStrings().AllFiles
+        filenames = FileDialog.getOpenFileNames(self, title,
+            SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
+            filters)
+>>>>>>> MERGE-SOURCE
         if filenames:
             listbox.addItems(filenames)
             Settings().setValue(self.plugin.settings_section + '/last directory import',

=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/topicsdialog.py'
--- openlp/plugins/songs/forms/topicsdialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/topicsdialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/forms/topicsform.py'
--- openlp/plugins/songs/forms/topicsform.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/forms/topicsform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/__init__.py'
--- openlp/plugins/songs/lib/__init__.py	2013-12-24 09:24:32 +0000
+++ openlp/plugins/songs/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -608,7 +613,23 @@
             if curskip > 0:
                 curskip -= 1
             elif not ignorable:
+<<<<<<< TREE
                 ebytes.append(int(hex, 16))
+=======
+                charcode = int(hex, 16)
+                failed = False
+                while True:
+                    try:
+                        encoding, default_encoding = get_encoding(font, 
+                            font_table, default_encoding, failed=failed)
+                        if not encoding:
+                            return None
+                        out.append(chr(charcode).decode(encoding))
+                    except UnicodeDecodeError:
+                        failed = True
+                    else:
+                        break
+>>>>>>> MERGE-SOURCE
         elif tchar:
             if curskip > 0:
                 curskip -= 1

=== modified file 'openlp/plugins/songs/lib/cclifileimport.py'
--- openlp/plugins/songs/lib/cclifileimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/cclifileimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/db.py'
--- openlp/plugins/songs/lib/db.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/dreambeamimport.py'
--- openlp/plugins/songs/lib/dreambeamimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/dreambeamimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/easyslidesimport.py'
--- openlp/plugins/songs/lib/easyslidesimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/easyslidesimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/ewimport.py'
--- openlp/plugins/songs/lib/ewimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/ewimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -141,8 +146,15 @@
         except IndexError:
             # This is the wrong table
             success = False
+<<<<<<< TREE
         # There does not appear to be a _reliable_ way of getting the number of songs/records, so loop through the file
         # blocks and total the number of records. Store the information in a list so we dont have to do all this again.
+=======
+        # There does not appear to be a _reliable_ way of getting the number
+        # of songs/records, so loop through the file blocks and total the
+        # number of records. Store the information in a list so we dont have
+        # to do all this again.
+>>>>>>> MERGE-SOURCE
         cur_block = first_block
         total_count = 0
         block_list = []
@@ -150,6 +162,7 @@
             cur_block_pos = header_size + ((cur_block - 1) * 1024 * block_size)
             db_file.seek(cur_block_pos)
             cur_block, rec_count = struct.unpack('<h2xh', db_file.read(6))
+<<<<<<< TREE
             rec_count = (rec_count + record_size) // record_size
             block_list.append((cur_block_pos, rec_count))
             total_count += rec_count
@@ -157,6 +170,15 @@
         for block in block_list:
             cur_block_pos, rec_count = block
             db_file.seek(cur_block_pos + 6)
+=======
+            rec_count = (rec_count + record_size) / record_size
+            block_list.append((cur_block_pos, rec_count))
+            total_count += rec_count
+        self.importWizard.progressBar.setMaximum(total_count)
+        for block in block_list:
+            cur_block_pos, rec_count = block
+            db_file.seek(cur_block_pos + 6)
+>>>>>>> MERGE-SOURCE
             # Loop through each record within the current block
             for i in range(rec_count):
                 if self.stop_import_flag:
@@ -192,11 +214,19 @@
                         self.addAuthor(author_name.decode().strip())
                 if words:
                     # Format the lyrics
+<<<<<<< TREE
                     result = strip_rtf(words.decode(), self.encoding)
                     if result is None:
                         return
                     words, self.encoding = result
                     verse_type = VerseType.tags[VerseType.Verse]
+=======
+                    result = strip_rtf(words, self.encoding)
+                    if result is None:
+                        return
+                    words, self.encoding = result
+                    verse_type = VerseType.Tags[VerseType.Verse]
+>>>>>>> MERGE-SOURCE
                     for verse in SLIDE_BREAK_REGEX.split(words):
                         verse = verse.strip()
                         if not verse:

=== modified file 'openlp/plugins/songs/lib/foilpresenterimport.py'
--- openlp/plugins/songs/lib/foilpresenterimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/foilpresenterimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -220,6 +225,7 @@
             xml = xml[38:]
         song = Song()
         # Values will be set when cleaning the song.
+<<<<<<< TREE
         song.search_lyrics = ''
         song.verse_order = ''
         song.search_title = ''
@@ -227,11 +233,21 @@
         # Because "text" seems to be an reserved word, we have to recompile it.
         xml = re.compile('<text>').sub('<text_>', xml)
         xml = re.compile('</text>').sub('</text_>', xml)
+=======
+        song.search_lyrics = u''
+        song.verse_order = u''
+        song.search_title = u''
+        self.save_song = True
+        # Because "text" seems to be an reserverd word, we have to recompile it.
+        xml = re.compile(u'<text>').sub(u'<text_>', xml)
+        xml = re.compile(u'</text>').sub(u'</text_>', xml)
+>>>>>>> MERGE-SOURCE
         song_xml = objectify.fromstring(xml)
         self._process_copyright(song_xml, song)
         self._process_cclinumber(song_xml, song)
         self._process_titles(song_xml, song)
         # The verse order is processed with the lyrics!
+<<<<<<< TREE
         self._process_lyrics(song_xml, song)
         self._process_comments(song_xml, song)
         self._process_authors(song_xml, song)
@@ -240,6 +256,16 @@
         if self.save_song:
             clean_song(self.manager, song)
             self.manager.save_object(song)
+=======
+        self._process_lyrics(foilpresenterfolie, song)
+        self._process_comments(foilpresenterfolie, song)
+        self._process_authors(foilpresenterfolie, song)
+        self._process_songbooks(foilpresenterfolie, song)
+        self._process_topics(foilpresenterfolie, song)
+        if self.save_song:
+            clean_song(self.manager, song)
+            self.manager.save_object(song)
+>>>>>>> MERGE-SOURCE
 
     def _child(self, element):
         """
@@ -422,12 +448,21 @@
             VerseType.tags[VerseType.Intro]: 1,
             VerseType.tags[VerseType.PreChorus]: 1
         }
+<<<<<<< TREE
         if not hasattr(foilpresenterfolie.strophen, 'strophe'):
             self.importer.logError(self._child(foilpresenterfolie.titel),
                 str(translate('SongsPlugin.FoilPresenterSongImport',
                 'Invalid Foilpresenter song file. No verses found.')))
             self.save_song = False
             return
+=======
+        if not hasattr(foilpresenterfolie.strophen, u'strophe'):
+            self.importer.logError(self._child(foilpresenterfolie.titel),
+                unicode(translate('SongsPlugin.FoilPresenterSongImport',
+                    'Invalid Foilpresenter song file. No verses found.')))
+            self.save_song = False
+            return
+>>>>>>> MERGE-SOURCE
         for strophe in foilpresenterfolie.strophen.strophe:
             text = self._child(strophe.text_) if hasattr(strophe, 'text_') else ''
             verse_name = self._child(strophe.key)

=== modified file 'openlp/plugins/songs/lib/importer.py'
--- openlp/plugins/songs/lib/importer.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/importer.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/mediashoutimport.py'
--- openlp/plugins/songs/lib/mediashoutimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/mediashoutimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== added file 'openlp/plugins/songs/lib/olp1import.py.OTHER'
--- openlp/plugins/songs/lib/olp1import.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/plugins/songs/lib/olp1import.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,223 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+"""
+The :mod:`olp1import` module provides the functionality for importing
+openlp.org 1.x song databases into the current installation database.
+"""
+
+import logging
+from chardet.universaldetector import UniversalDetector
+import sqlite
+import sys
+import os
+
+from openlp.core.lib import translate
+from openlp.plugins.songs.lib import retrieve_windows_encoding
+from songimport import SongImport
+
+log = logging.getLogger(__name__)
+
+class OpenLP1SongImport(SongImport):
+    """
+    The :class:`OpenLP1SongImport` class provides OpenLP with the ability to
+    import song databases from installations of openlp.org 1.x.
+    """
+    lastEncoding = u'windows-1252'
+
+    def __init__(self, manager, **kwargs):
+        """
+        Initialise the import.
+
+        ``manager``
+            The song manager for the running OpenLP installation.
+
+        ``filename``
+            The database providing the data to import.
+        """
+        SongImport.__init__(self, manager, **kwargs)
+        self.availableThemes = \
+            kwargs[u'plugin'].formParent.themeManagerContents.getThemes()
+
+    def doImport(self):
+        """
+        Run the import for an openlp.org 1.x song database.
+        """
+        if not self.importSource.endswith(u'.olp'):
+            self.logError(self.importSource,
+                translate('SongsPlugin.OpenLP1SongImport',
+                'Not a valid openlp.org 1.x song database.'))
+            return
+        encoding = self.getEncoding()
+        if not encoding:
+            return
+        # Connect to the database.
+        connection = sqlite.connect(self.importSource, mode=0444,
+            encoding=(encoding, 'replace'))
+        cursor = connection.cursor()
+        # Determine if the db supports linking audio to songs.
+        cursor.execute(u'SELECT name FROM sqlite_master '
+            u'WHERE type = \'table\' AND name = \'tracks\'')
+        db_has_tracks = len(cursor.fetchall()) > 0
+        # Determine if the db contains theme information.
+        cursor.execute(u'SELECT name FROM sqlite_master '
+            u'WHERE type = \'table\' AND name = \'settings\'')
+        db_has_themes = len(cursor.fetchall()) > 0
+        # "cache" our list of authors.
+        cursor.execute(u'-- types int, unicode')
+        cursor.execute(u'SELECT authorid, authorname FROM authors')
+        authors = cursor.fetchall()
+        if db_has_tracks:
+            # "cache" our list of tracks.
+            cursor.execute(u'-- types int, unicode')
+            cursor.execute(u'SELECT trackid, fulltrackname FROM tracks')
+            tracks = cursor.fetchall()
+        if db_has_themes:
+            # "cache" our list of themes.
+            themes = {}
+            cursor.execute(u'-- types int, unicode')
+            cursor.execute(u'SELECT settingsid, settingsname FROM settings')
+            for theme_id, theme_name in cursor.fetchall():
+                if theme_name in self.availableThemes:
+                    themes[theme_id] = theme_name
+        # Import the songs.
+        cursor.execute(u'-- types int, unicode, unicode, unicode')
+        cursor.execute(u'SELECT songid, songtitle, lyrics || \'\' AS ' \
+                u'lyrics, copyrightinfo FROM songs')
+        songs = cursor.fetchall()
+        self.importWizard.progressBar.setMaximum(len(songs))
+        for song in songs:
+            self.setDefaults()
+            if self.stopImportFlag:
+                break
+            song_id = song[0]
+            self.title = song[1]
+            lyrics = song[2].replace(u'\r\n', u'\n')
+            self.addCopyright(song[3])
+            if db_has_themes:
+                cursor.execute(u'-- types int')
+                cursor.execute(
+                    u'SELECT settingsid FROM songs WHERE songid = %s' % song_id)
+                theme_id = cursor.fetchone()[0]
+                self.themeName = themes.get(theme_id, u'')
+            verses = lyrics.split(u'\n\n')
+            for verse in verses:
+                if verse.strip():
+                    self.addVerse(verse.strip())
+            cursor.execute(u'-- types int')
+            cursor.execute(u'SELECT authorid FROM songauthors '
+                u'WHERE songid = %s' % song_id)
+            author_ids = cursor.fetchall()
+            for author_id in author_ids:
+                if self.stopImportFlag:
+                    break
+                for author in authors:
+                    if author[0] == author_id[0]:
+                        self.parseAuthor(author[1])
+                        break
+            if self.stopImportFlag:
+                break
+            if db_has_tracks:
+                cursor.execute(u'-- types int, int')
+                cursor.execute(u'SELECT trackid, listindex '
+                    u'FROM songtracks '
+                    u'WHERE songid = %s ORDER BY listindex' % song_id)
+                track_ids = cursor.fetchall()
+                for track_id, listindex in track_ids:
+                    if self.stopImportFlag:
+                        break
+                    for track in tracks:
+                        if track[0] == track_id:
+                            media_file = self.expandMediaFile(track[1])
+                            self.addMediaFile(media_file, listindex)
+                            break
+            if self.stopImportFlag:
+                break
+            if not self.finish():
+                self.logError(self.importSource)
+
+    def getEncoding(self):
+        """
+        Detect character encoding of an openlp.org 1.x song database.
+        """
+        # Connect to the database.
+        connection = sqlite.connect(self.importSource.encode(
+            sys.getfilesystemencoding()), mode=0444)
+        cursor = connection.cursor()
+
+        detector = UniversalDetector()
+        # Detect charset by authors.
+        cursor.execute(u'SELECT authorname FROM authors')
+        authors = cursor.fetchall()
+        for author in authors:
+            detector.feed(author[0])
+            if detector.done:
+                detector.close()
+                return detector.result[u'encoding']
+        # Detect charset by songs.
+        cursor.execute(u'SELECT songtitle, copyrightinfo, '
+            u'lyrics || \'\' AS lyrics FROM songs')
+        songs = cursor.fetchall()
+        for index in [0, 1, 2]:
+            for song in songs:
+                detector.feed(song[index])
+                if detector.done:
+                    detector.close()
+                    return detector.result[u'encoding']
+        # Detect charset by songs.
+        cursor.execute(u'SELECT name FROM sqlite_master '
+            u'WHERE type = \'table\' AND name = \'tracks\'')
+        if cursor.fetchall():
+            cursor.execute(u'SELECT fulltrackname FROM tracks')
+            tracks = cursor.fetchall()
+            for track in tracks:
+                detector.feed(track[0])
+                if detector.done:
+                    detector.close()
+                    return detector.result[u'encoding']
+        detector.close()
+        return retrieve_windows_encoding(detector.result[u'encoding'])
+
+    def expandMediaFile(self, filename):
+        """
+        When you're on Windows, this function expands the file name to include
+        the path to OpenLP's application data directory. If you are not on
+        Windows, it returns the original file name.
+
+        ``filename``
+            The filename to expand.
+        """
+        if sys.platform != u'win32' and \
+            not os.environ.get(u'ALLUSERSPROFILE') and \
+            not os.environ.get(u'APPDATA'):
+            return filename
+        common_app_data = os.path.join(os.environ[u'ALLUSERSPROFILE'],
+            os.path.split(os.environ[u'APPDATA'])[1])
+        if not common_app_data:
+            return filename
+        return os.path.join(common_app_data, u'openlp.org', 'Audio', filename)

=== modified file 'openlp/plugins/songs/lib/olpimport.py'
--- openlp/plugins/songs/lib/olpimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/olpimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/oooimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/openlyricsexport.py'
--- openlp/plugins/songs/lib/openlyricsexport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/openlyricsexport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/openlyricsimport.py'
--- openlp/plugins/songs/lib/openlyricsimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/openlyricsimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/opensongimport.py'
--- openlp/plugins/songs/lib/opensongimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/opensongimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -46,6 +51,7 @@
     Import songs exported from OpenSong
 
     The format is described loosly on the `OpenSong File Format Specification
+<<<<<<< TREE
     <http://www.opensong.org/d/manual/song_file_format_specification>`_ page on the OpenSong web site. However, it
     doesn't describe the <lyrics> section, so here's an attempt:
 
@@ -54,6 +60,18 @@
 
     Verses can be expressed in one of 2 ways, either in complete verses, or by line grouping, i.e. grouping all line 1's
     of a verse together, all line 2's of a verse together, and so on.
+=======
+    <http://www.opensong.org/d/manual/song_file_format_specification>`_ page on
+    the OpenSong web site. However, it doesn't describe the <lyrics> section,
+    so here's an attempt:
+
+    If the first charachter of a line is a space, then the rest of that line
+    is lyrics. If it is not a space the following applies.
+
+    Verses can be expressed in one of 2 ways, either in complete verses, or by
+    line grouping, i.e. grouping all line 1's of a verse together, all line 2's
+    of a verse together, and so on.
+>>>>>>> MERGE-SOURCE
 
     An example of complete verses::
 
@@ -166,13 +184,24 @@
         if 'lyrics' in fields:
             lyrics = str(root.lyrics)
         else:
+<<<<<<< TREE
             lyrics = ''
         for this_line in lyrics.split('\n'):
+=======
+            lyrics = u''
+        for this_line in lyrics.split(u'\n'):
+>>>>>>> MERGE-SOURCE
             if not this_line:
                 continue
+<<<<<<< TREE
             # skip this line if it is a comment
             if this_line.startswith(';'):
                 continue
+=======
+            # skip this line if it is a comment
+            if this_line.startswith(u';'):
+                continue
+>>>>>>> MERGE-SOURCE
             # skip guitar chords and page and column breaks
             if this_line.startswith('.') or this_line.startswith('---') or this_line.startswith('-!!'):
                 continue
@@ -208,9 +237,15 @@
                 our_verse_order.append([verse_tag, verse_num, inst])
             # Tidy text and remove the ____s from extended words
             this_line = self.tidyText(this_line)
+<<<<<<< TREE
             this_line = this_line.replace('_', '')
             this_line = this_line.replace('|', '\n')
             this_line = this_line.strip()
+=======
+            this_line = this_line.replace(u'_', u'')
+            this_line = this_line.replace(u'|', u'\n')
+            this_line = this_line.strip()
+>>>>>>> MERGE-SOURCE
             verses[verse_tag][verse_num][inst].append(this_line)
         # done parsing
         # add verses in original order

=== modified file 'openlp/plugins/songs/lib/powersongimport.py'
--- openlp/plugins/songs/lib/powersongimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/powersongimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/sofimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/songbeamerimport.py'
--- openlp/plugins/songs/lib/songbeamerimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songbeamerimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/songimport.py'
--- openlp/plugins/songs/lib/songimport.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songs/lib/songimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -260,10 +265,15 @@
         elif int(verse_def[1:]) > self.verseCounts[verse_def[0]]:
             self.verseCounts[verse_def[0]] = int(verse_def[1:])
         self.verses.append([verse_def, verse_text.rstrip(), lang])
+<<<<<<< TREE
         # A verse_def refers to all verses with that name, adding it once adds every instance, so do not add if already
         # used.
         if verse_def not in self.verseOrderListGenerated:
             self.verseOrderListGenerated.append(verse_def)
+=======
+        if verse_def not in self.verseOrderListGenerated:
+            self.verseOrderListGenerated.append(verse_def)
+>>>>>>> MERGE-SOURCE
 
     def repeatVerse(self):
         """

=== modified file 'openlp/plugins/songs/lib/songproimport.py'
--- openlp/plugins/songs/lib/songproimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songproimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -107,11 +112,19 @@
         elif tag == 'E':
             self.finish()
             return
+<<<<<<< TREE
         if 'rtf1' in text:
             result = strip_rtf(text, self.encoding)
             if result is None:
                 return
             text, self.encoding = result
+=======
+        if u'rtf1' in text:
+            result = strip_rtf(text, self.encoding)
+            if result is None:
+                return
+            text, self.encoding = result
+>>>>>>> MERGE-SOURCE
             text = text.rstrip()
         if not text:
             return

=== modified file 'openlp/plugins/songs/lib/songshowplusimport.py'
--- openlp/plugins/songs/lib/songshowplusimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songshowplusimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -143,17 +148,36 @@
                         if author.find(",") !=-1:
                             authorParts = author.split(", ")
                             author = authorParts[1] + " " + authorParts[0]
+<<<<<<< TREE
                         self.parse_author(author)
+=======
+                        self.parseAuthor(self.decode(author))
+>>>>>>> MERGE-SOURCE
                 elif block_key == COPYRIGHT:
                     self.addCopyright(self.decode(data))
                 elif block_key == CCLI_NO:
                     self.ccliNumber = int(data)
                 elif block_key == VERSE:
+<<<<<<< TREE
                     self.addVerse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
+=======
+                    self.addVerse(self.decode(data),
+                        "%s%s" % (VerseType.Tags[VerseType.Verse], verse_no))
+>>>>>>> MERGE-SOURCE
                 elif block_key == CHORUS:
+<<<<<<< TREE
                     self.addVerse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Chorus], verse_no))
+=======
+                    self.addVerse(self.decode(data),
+                        "%s%s" % (VerseType.Tags[VerseType.Chorus], verse_no))
+>>>>>>> MERGE-SOURCE
                 elif block_key == BRIDGE:
+<<<<<<< TREE
                     self.addVerse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Bridge], verse_no))
+=======
+                    self.addVerse(self.decode(data),
+                        "%s%s" % (VerseType.Tags[VerseType.Bridge], verse_no))
+>>>>>>> MERGE-SOURCE
                 elif block_key == TOPIC:
                     self.topics.append(self.decode(data))
                 elif block_key == COMMENTS:
@@ -161,16 +185,27 @@
                 elif block_key == VERSE_ORDER:
                     verse_tag = self.to_openlp_verse_tag(self.decode(data), True)
                     if verse_tag:
+<<<<<<< TREE
                         if not isinstance(verse_tag, str):
                             verse_tag = self.decode(verse_tag)
                         self.ssp_verse_order_list.append(verse_tag)
+=======
+                        if not isinstance(verse_tag, unicode):
+                            verse_tag = self.decode(verse_tag)
+                        self.sspVerseOrderList.append(verse_tag)
+>>>>>>> MERGE-SOURCE
                 elif block_key == SONG_BOOK:
                     self.songBookName = self.decode(data)
                 elif block_key == SONG_NUMBER:
                     self.songNumber = ord(data)
                 elif block_key == CUSTOM_VERSE:
+<<<<<<< TREE
                     verse_tag = self.to_openlp_verse_tag(verse_name)
                     self.addVerse(self.decode(data), verse_tag)
+=======
+                    verse_tag = self.toOpenLPVerseTag(verse_name)
+                    self.addVerse(self.decode(data), verse_tag)
+>>>>>>> MERGE-SOURCE
                 else:
                     log.debug("Unrecognised blockKey: %s, data: %s" % (block_key, data))
                     song_data.seek(next_block_starts)
@@ -179,6 +214,7 @@
             if not self.finish():
                 self.logError(file)
 
+<<<<<<< TREE
     def to_openlp_verse_tag(self, verse_name, ignore_unique=False):
         # Have we got any digits? If so, verse number is everything from the digits to the end (OpenLP does not have
         # concept of part verses, so just ignore any non integers on the end (including floats))
@@ -186,10 +222,30 @@
         if match:
             verse_type = match.group(1).strip()
             verse_number = match.group(2)
+=======
+    def toOpenLPVerseTag(self, verse_name, ignore_unique=False):
+        # have we got any digits?
+        # If so, verse number is everything from the digits
+        # to the end (openlp does not have concept of part verses, so
+        # just ignore any non integers on the end (including floats))
+        match = re.match(u'(\D*)(\d+)', verse_name)
+        if match:
+            verse_type = match.group(1).strip()
+            verse_number = match.group(2)
+>>>>>>> MERGE-SOURCE
         else:
+<<<<<<< TREE
             # otherwise we assume number 1 and take the whole prefix as the verse tag
+=======
+            # otherwise we assume number 1 and take the whole prefix as
+            # the verse tag
+>>>>>>> MERGE-SOURCE
             verse_type = verse_name
+<<<<<<< TREE
             verse_number = '1'
+=======
+            verse_number = u'1'
+>>>>>>> MERGE-SOURCE
         verse_type = verse_type.lower()
         if verse_type == "verse":
             verse_tag = VerseType.tags[VerseType.Verse]
@@ -208,9 +264,17 @@
             verse_tag = VerseType.tags[VerseType.Other]
             verse_number = self.other_list[verse_name]
         return verse_tag + verse_number
+<<<<<<< TREE
 
     def decode(self, data):
         try:
             return str(data, chardet.detect(data)['encoding'])
         except:
-            return str(data, retrieve_windows_encoding())
\ No newline at end of file
+            return str(data, retrieve_windows_encoding())=======
+
+    def decode(self, data):
+        try:
+            return unicode(data, chardet.detect(data)['encoding'])
+        except:
+            return unicode(data, retrieve_windows_encoding())
+>>>>>>> MERGE-SOURCE

=== modified file 'openlp/plugins/songs/lib/songstab.py'
--- openlp/plugins/songs/lib/songstab.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/songstab.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/sundayplusimport.py'
--- openlp/plugins/songs/lib/sundayplusimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/sundayplusimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -67,7 +72,7 @@
         for filename in self.import_source:
             if self.stop_import_flag:
                 return
-            song_file = open(filename)
+            song_file = open(filename, 'rb')
             self.doImportFile(song_file)
             song_file.close()
 
@@ -95,7 +100,7 @@
             # Now we are looking for the name.
             if data[i:i + 1] == '#':
                 name_end = data.find(':', i + 1)
-                name = data[i + 1:name_end]
+                name = data[i + 1:name_end].upper()
                 i = name_end + 1
                 while data[i:i + 1] == ' ':
                     i += 1
@@ -120,14 +125,19 @@
                         end = data.find(')', i) + 1
                     value = data[i:end]
                 # If we are in the main group.
+<<<<<<< TREE
                 if not cell:
                     if name == 'title':
+=======
+                if cell == False:
+                    if name == 'TITLE':
+>>>>>>> MERGE-SOURCE
                         self.title = self.decode(self.unescape(value))
-                    elif name == 'Author':
+                    elif name == 'AUTHOR':
                         author = self.decode(self.unescape(value))
                         if len(author):
                             self.addAuthor(author)
-                    elif name == 'Copyright':
+                    elif name == 'COPYRIGHT':
                         self.copyright = self.decode(self.unescape(value))
                     elif name[0:4] == 'CELL':
                         self.parse(value, cell = name[4:])
@@ -139,12 +149,12 @@
                             verse_type = VerseType.tags[VerseType.from_loose_input(value[0])]
                             if len(value) >= 2 and value[-1] in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']:
                                 verse_type = "%s%s" % (verse_type, value[-1])
-                    elif name == 'Hotkey':
+                    elif name == 'HOTKEY':
                         # Hotkey always appears after MARKER_NAME, so it
                         # effectively overrides MARKER_NAME, if present.
                         if len(value) and value in list(HOTKEY_TO_VERSE_TYPE.keys()):
                             verse_type = HOTKEY_TO_VERSE_TYPE[value]
-                    if name == 'rtf':
+                    if name == 'RTF':
                         value = self.unescape(value)
                         result = strip_rtf(value, self.encoding)
                         if result is None:

=== modified file 'openlp/plugins/songs/lib/test/test_import_file.py'
--- openlp/plugins/songs/lib/test/test_import_file.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/test/test_import_file.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/test/test_importing_lots.py'
--- openlp/plugins/songs/lib/test/test_importing_lots.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/test/test_importing_lots.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== added file 'openlp/plugins/songs/lib/test/test_opensongimport.py.OTHER'
--- openlp/plugins/songs/lib/test/test_opensongimport.py.OTHER	1970-01-01 00:00:00 +0000
+++ openlp/plugins/songs/lib/test/test_opensongimport.py.OTHER	2014-01-18 07:58:26 +0000
@@ -0,0 +1,131 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection                                      #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
+# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
+# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
+# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith,             #
+# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock,              #
+# Frode Woldsund, Martin Zibricky                                             #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; version 2 of the License.                              #
+#                                                                             #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    #
+# more details.                                                               #
+#                                                                             #
+# You should have received a copy of the GNU General Public License along     #
+# with this program; if not, write to the Free Software Foundation, Inc., 59  #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
+###############################################################################
+
+from openlp.plugins.songs.lib.opensongimport import OpenSongImport
+from openlp.core.lib.db import Manager
+from openlp.plugins.songs.lib.db import init_schema
+
+import logging
+LOG_FILENAME = 'test.log'
+logging.basicConfig(filename=LOG_FILENAME,level=logging.INFO)
+
+# Stubs to replace the UI functions for raw testing
+class wizard_stub:
+    def __init__(self):
+        self.progressBar=progbar_stub()
+    def incrementProgressBar(self, str):
+        pass
+class progbar_stub:
+    def __init__(self):
+        pass
+    def setMaximum(self, arg):
+        pass
+
+def test():
+    manager = Manager(u'songs', init_schema)
+    o = OpenSongImport(manager, filenames=[u'test.opensong'])
+    o.import_wizard = wizard_stub()
+    o.commit = False
+    o.do_import()
+    o.print_song()
+    assert o.copyright == u'2010 Martin Thompson'
+    assert o.authors == [u'MartiÑ Thómpson', u'Martin2 Thómpson']
+    assert o.title == u'Martins Test'
+    assert o.alternate_title == u''
+    assert o.song_number == u'1'
+    assert [u'C1', u'Chorus 1'] in o.verses
+    assert [u'C2', u'Chorus 2'] in o.verses
+    assert not [u'C3', u'Chorus 3'] in o.verses
+    assert [u'B1', u'Bridge 1\nBridge 1 line 2'] in o.verses
+    assert [u'V1', u'v1 Line 1\nV1 Line 2'] in o.verses
+    assert [u'V2', u'v2 Line 1\nV2 Line 2'] in o.verses
+    assert [u'V3A', u'V3 Line 1\nV3 Line 2'] in o.verses
+    assert [u'RAP1', u'Rap 1 Line 1\nRap 1 Line 2'] in o.verses
+    assert [u'RAP2', u'Rap 2 Line 1\nRap 2 Line 2'] in o.verses
+    assert [u'RAP3', u'Rap 3 Line 1\nRap 3 Line 2'] in o.verses
+    assert [u'X1', u'Unreferenced verse line 1'] in o.verses
+    assert o.verse_order_list == [u'V1', u'C1', u'V2', u'C2', u'V3A', u'B1', u'V1', u'T1', u'RAP1', u'RAP2', u'RAP3']
+    assert o.ccli_number == u'Blah'
+    assert o.topics == [u'TestTheme', u'TestAltTheme']
+
+    o.filenames = [u'test.opensong.zip']
+    o.set_defaults()
+    o.do_import()
+    o.print_song()
+    assert o.copyright == u'2010 Martin Thompson'
+    assert o.authors == [u'MartiÑ Thómpson']
+    assert o.title == u'Martins Test'
+    assert o.alternate_title == u''
+    assert o.song_number == u'1'
+    assert [u'B1', u'Bridge 1\nBridge 1 line 2'] in o.verses
+    assert [u'C1', u'Chorus 1'] in o.verses
+    assert [u'C2', u'Chorus 2'] in o.verses
+    assert not [u'C3', u'Chorus 3'] in o.verses
+    assert [u'V1', u'v1 Line 1\nV1 Line 2'] in o.verses
+    assert [u'V2', u'v2 Line 1\nV2 Line 2'] in o.verses
+    print o.verse_order_list
+    assert o.verse_order_list == [u'V1', u'C1', u'V2', u'C2', u'V3', u'B1', u'V1']
+
+    o.filenames = [u'test2.opensong']
+    o.set_defaults()
+    o.do_import()
+    o.print_song()
+    assert o.copyright == u'2010 Martin Thompson'
+    assert o.authors == [u'Martin Thompson']
+    assert o.title == u'Martins 2nd Test'
+    assert o.alternate_title == u''
+    assert o.song_number == u'2'
+    print o.verses
+    assert [u'B1', u'Bridge 1\nBridge 1 line 2'] in o.verses
+    assert [u'C1', u'Chorus 1'] in o.verses
+    assert [u'C2', u'Chorus 2'] in o.verses
+    assert not [u'C3', u'Chorus 3'] in o.verses
+    assert [u'V1', u'v1 Line 1\nV1 Line 2'] in o.verses
+    assert [u'V2', u'v2 Line 1\nV2 Line 2'] in o.verses
+    print o.verse_order_list
+    assert o.verse_order_list == [u'V1', u'V2', u'B1', u'C1', u'C2']
+
+    o.filenames = [u'test3.opensong']
+    o.set_defaults()
+    o.do_import()
+    o.print_song()
+    assert o.copyright == u'2010'
+    assert o.authors == [u'Martin Thompson']
+    assert o.title == u'Test single verse'
+    assert o.alternate_title == u''
+    assert o.ccli_number == u'123456'
+    assert o.verse_order_list == [u'V1']
+    assert o.topics == [u'Worship: Declaration']
+    print o.verses[0]
+    assert [u'V1', u'Line 1\nLine 2'] in o.verses
+
+    print "Tests passed"
+
+if __name__ == "__main__":
+    test()

=== modified file 'openlp/plugins/songs/lib/ui.py'
--- openlp/plugins/songs/lib/ui.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/ui.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/upgrade.py'
--- openlp/plugins/songs/lib/upgrade.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/upgrade.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/wowimport.py'
--- openlp/plugins/songs/lib/wowimport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/wowimport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/xml.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #
@@ -80,6 +85,33 @@
 NSMAP = '{' + NAMESPACE + '}' + '%s'
 
 
+def valid_XML_char_ordinal(char):
+    """
+    Undertake the filter test.
+
+    ``char``
+        The individual character to be checked.
+    """
+    return (
+        0x20 <= char <= 0xD7FF
+        or char in (0x9, 0xA, 0xD)
+        or 0xE000 <= char <= 0xFFFD
+        or 0x10000 <= char <= 0x10FFFF
+    )
+
+
+def clean_xml_string(xml):
+    """
+    Filter out invalid characters in xml
+    Source <http://stackoverflow.com/questions/8733233/filtering-out-certain-bytes-in-python>
+
+    ``xml``
+        The actual text to be checked.
+
+    """
+    return ''.join(char for char in xml if valid_XML_char_ordinal(ord(char)))
+
+
 class SongXML(object):
     """
     This class builds and parses the XML used to describe songs.
@@ -110,8 +142,14 @@
         ``lang``
             The verse's language code (ISO-639). This is not required, but should be added if available.
         """
+<<<<<<< TREE
         verse = etree.Element('verse', type=str(type),
             label=str(number))
+=======
+        content = clean_xml_string(content)
+        verse = etree.Element(u'verse', type=unicode(type),
+            label=unicode(number))
+>>>>>>> MERGE-SOURCE
         if lang:
             verse.set('lang', lang)
         verse.text = etree.CDATA(content)

=== modified file 'openlp/plugins/songs/lib/zionworximport.py'
--- openlp/plugins/songs/lib/zionworximport.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/lib/zionworximport.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songs/songsplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/__init__.py'
--- openlp/plugins/songusage/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/forms/__init__.py'
--- openlp/plugins/songusage/forms/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/forms/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/forms/songusagedeletedialog.py'
--- openlp/plugins/songusage/forms/songusagedeletedialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/forms/songusagedeletedialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py'
--- openlp/plugins/songusage/forms/songusagedeleteform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songusage/forms/songusagedeleteform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/forms/songusagedetaildialog.py'
--- openlp/plugins/songusage/forms/songusagedetaildialog.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/forms/songusagedetaildialog.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/lib/__init__.py'
--- openlp/plugins/songusage/lib/__init__.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/lib/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/lib/db.py'
--- openlp/plugins/songusage/lib/db.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/lib/db.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/lib/upgrade.py'
--- openlp/plugins/songusage/lib/upgrade.py	2013-12-24 08:56:50 +0000
+++ openlp/plugins/songusage/lib/upgrade.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py	2013-12-28 21:33:38 +0000
+++ openlp/plugins/songusage/songusageplugin.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'resources/__init__.py'
--- resources/__init__.py	2013-12-24 08:56:50 +0000
+++ resources/__init__.py	2014-01-18 07:58:26 +0000
@@ -4,8 +4,13 @@
 ###############################################################################
 # OpenLP - Open Source Lyrics Projection                                      #
 # --------------------------------------------------------------------------- #
+<<<<<<< TREE
 # Copyright (c) 2008-2014 Raoul Snyman                                        #
 # Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan      #
+=======
+# Copyright (c) 2008-2013 Raoul Snyman                                        #
+# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan      #
+>>>>>>> MERGE-SOURCE
 # Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub,      #
 # Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer.   #
 # Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru,          #

=== modified file 'resources/i18n/af.ts'
--- resources/i18n/af.ts	2012-11-24 21:19:46 +0000
+++ resources/i18n/af.ts	2014-01-18 07:58:26 +0000
@@ -175,12 +175,12 @@
         <translation>Bybels</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="600"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="604"/>
         <source>No Book Found</source>
         <translation>Geen Boek Gevind nie</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="600"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="604"/>
         <source>No matching book could be found in this Bible. Check that you have spelled the name of the book correctly.</source>
         <translation>Geen passende boek kon in hierdie Bybel gevind word nie. Gaan na dat die naam van die boek korrek gespel is.</translation>
     </message>
@@ -1045,38 +1045,38 @@
 <context>
     <name>BiblesPlugin.HTTPBible</name>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="514"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="518"/>
         <source>Registering Bible and loading books...</source>
         <translation>Registreer Bybel en laai boeke...</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="539"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="543"/>
         <source>Registering Language...</source>
         <translation>Taal registrasie...</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="555"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="559"/>
         <source>Importing %s...</source>
         <comment>Importing &lt;book name&gt;...</comment>
         <translation>Voer %s in...</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="722"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="726"/>
         <source>Download Error</source>
         <translation>Aflaai Fout</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="722"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="726"/>
         <source>There was a problem downloading your verse selection. Please check your Internet connection, and if this error continues to occur please consider reporting a bug.</source>
         <translation>Daar was &apos;n probleem om die vers seleksie af te laai. Gaan die Internet konneksie na en as hierdie probleem voortduur, oorweeg dit asseblief om &apos;n gogga te rapporteer.</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="729"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="733"/>
         <source>Parse Error</source>
         <translation>Ontleed Fout</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/http.py" line="729"/>
+        <location filename="openlp/plugins/bibles/lib/http.py" line="733"/>
         <source>There was a problem extracting your verse selection. If this error continues to occur please consider reporting a bug.</source>
         <translation>Daar was &apos;n probleem om die vers seleksie te onttrek. As hierdie probleem voortduur, oorweeg dit asseblief om &apos;n gogga te rapporteer.</translation>
     </message>
@@ -1399,7 +1399,7 @@
         <translation>Bepaal enkodering (dit mag &apos;n paar minuute neem)...</translation>
     </message>
     <message>
-        <location filename="openlp/plugins/bibles/lib/osis.py" line="162"/>
+        <location filename="openlp/plugins/bibles/lib/osis.py" line="174"/>
         <source>Importing %s %s...</source>
         <comment>Importing &lt;book name&gt; &lt;chapter&gt;...</comment>
         <translation>Invoer %s %s...</translation>
@@ -1994,7 +1994,7 @@
 <context>
     <name>OpenLP</name>
     <message>
-        <location filename="openlp/core/utils/__init__.py" line="362"/>
+        <location filename="openlp/core/utils/__init__.py" line="363"/>
         <source>Image Files</source>
         <translation>Beeld Lêers</translation>
     </message>
@@ -2039,13 +2039,6 @@
         <translation>Hierdie program word versprei in die hoop dat dit nuttig sal wees, maar SONDER ENIGE WAARBORG; sonder die geïmpliseerde waarborg van VERHANDELBAARHEID of GESKIKTHEID VIR &apos;N SPESIFIEKE DOEL. Sien hieronder vir meer inligting.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/aboutdialog.py" line="250"/>
-        <source>Copyright &#xa9; 2004-2012 %s
-Portions copyright &#xa9; 2004-2012 %s</source>
-        <translation>Kopiereg © 2004-2012 %s
-Gedeeltelike kopiereg © 2004-2012 %s</translation>
-    </message>
-    <message>
         <location filename="openlp/core/ui/aboutdialog.py" line="86"/>
         <source>OpenLP &lt;version&gt;&lt;revision&gt; - Open Source Lyrics Projection
 
@@ -2213,6 +2206,13 @@
 Ons bring hierdie sagteware gratis voort
 omdat Hy ons vry gemaak het.</translation>
     </message>
+    <message>
+        <location filename="openlp/core/ui/aboutdialog.py" line="250"/>
+        <source>Copyright &#xa9; 2004-2013 %s
+Portions copyright &#xa9; 2004-2013 %s</source>
+        <translation>Kopiereg © 2004-2013 %s
+Gedeeltelike kopiereg © 2004-2013 %s</translation>
+    </message>
 </context>
 <context>
     <name>OpenLP.AdvancedTab</name>
@@ -2272,7 +2272,7 @@
         <translation>Beeld lêer:</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="664"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="667"/>
         <source>Open File</source>
         <translation>Maak Lêer oop</translation>
     </message>
@@ -2302,7 +2302,7 @@
         <translation>Verander terug na die verstek OpenLP logo.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/servicemanager.py" line="622"/>
+        <location filename="openlp/core/ui/servicemanager.py" line="623"/>
         <source>Service %Y-%m-%d %H-%M</source>
         <comment>This may not contain any of the following characters: /\?*|&lt;&gt;[]&quot;:+
 See http://docs.python.org/library/datetime.html#strftime-strptime-behavior for more information.</comment>
@@ -2399,7 +2399,7 @@
         <translation>Werk om X11 Venster Bestuurder</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="635"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="638"/>
         <source>Syntax error.</source>
         <translation>Sintaks fout.</translation>
     </message>
@@ -2454,27 +2454,27 @@
         <translation>&lt;strong&gt;WAARSKUWING:&lt;/strong&gt; Nuwe data lêer ligging bevat OpenLP data lêers.  Hierdie lêers SAL vervang word gedurende kopiëring.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="525"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="528"/>
         <source>Data Directory Error</source>
         <translation>Data Lêer Fout</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="677"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="680"/>
         <source>Select Data Directory Location</source>
         <translation>Selekteer Data Lêer Ligging</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="690"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="693"/>
         <source>Confirm Data Directory Change</source>
         <translation>Bevestig Data Lêer Verandering</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="717"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="720"/>
         <source>Reset Data Directory</source>
         <translation>Herstel Data Lêer</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="717"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="720"/>
         <source>Are you sure you want to change the location of the OpenLP data directory to the default location?
 
 This location will be used after OpenLP is closed.</source>
@@ -2483,12 +2483,12 @@
 Hierdie ligging sal gebruik word nadat OpenLP toegemaak is.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="753"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="756"/>
         <source>Overwrite Existing Data</source>
         <translation>Oorskryf Bestaande Data</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="525"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="528"/>
         <source>OpenLP data directory was not found
 
 %s
@@ -2507,7 +2507,7 @@
 Kliek &quot;Nee&quot; om die laai van OpenLP te staak, en jou toe te laat om die probleem op te los.  Kliek &quot;Ja&quot; om die data gids na die verstek ligging te herstel.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="690"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="693"/>
         <source>Are you sure you want to change the location of the OpenLP data directory to:
 
 %s
@@ -2520,7 +2520,7 @@
 Die data gids sal verander word wanneer OpenLP toe gemaak word.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/advancedtab.py" line="753"/>
+        <location filename="openlp/core/ui/advancedtab.py" line="756"/>
         <source>WARNING: 
 
 The location you have selected 
@@ -2699,192 +2699,192 @@
 <context>
     <name>OpenLP.FirstTimeWizard</name>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="212"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="216"/>
         <source>Songs</source>
         <translation>Liedere</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="199"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="203"/>
         <source>First Time Wizard</source>
         <translation>Eerste Keer Gids</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="201"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="205"/>
         <source>Welcome to the First Time Wizard</source>
         <translation>Welkom by die Eerste Keer Gids</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="208"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="212"/>
         <source>Activate required Plugins</source>
         <translation>Aktiveer nodige Miniprogramme</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="210"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="214"/>
         <source>Select the Plugins you wish to use. </source>
         <translation>Kies die Miniprogramme wat gebruik moet word.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="215"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="219"/>
         <source>Bible</source>
         <translation>Bybel</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="216"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="220"/>
         <source>Images</source>
         <translation>Beelde</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="221"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="225"/>
         <source>Presentations</source>
         <translation>Aanbiedinge</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="223"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="227"/>
         <source>Media (Audio and Video)</source>
         <translation>Media (Klank en Video)</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="225"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="229"/>
         <source>Allow remote access</source>
         <translation>Laat afgeleë toegang toe</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="227"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="231"/>
         <source>Monitor Song Usage</source>
         <translation>Monitor Lied-Gebruik</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="229"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="233"/>
         <source>Allow Alerts</source>
         <translation>Laat Waarskuwings Toe</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="259"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="263"/>
         <source>Default Settings</source>
         <translation>Verstek Instellings</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="97"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="116"/>
         <source>Downloading %s...</source>
         <translation>Aflaai %s...</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="409"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="447"/>
         <source>Download complete. Click the finish button to start OpenLP.</source>
         <translation>Aflaai voltooi. Klik op die klaar knoppie om OpenLP te begin.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="430"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="468"/>
         <source>Enabling selected plugins...</source>
         <translation>Skakel geselekteerde miniprogramme aan...</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="231"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="235"/>
         <source>No Internet Connection</source>
         <translation>Geen Internet Verbinding</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="233"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="237"/>
         <source>Unable to detect an Internet connection.</source>
         <translation>Nie in staat om &apos;n Internet verbinding op te spoor nie.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="247"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="251"/>
         <source>Sample Songs</source>
         <translation>Voorbeeld Liedere</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="249"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="253"/>
         <source>Select and download public domain songs.</source>
         <translation>Kies en laai liedere vanaf die publieke domein.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="251"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="255"/>
         <source>Sample Bibles</source>
         <translation>Voorbeeld Bybels</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="253"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="257"/>
         <source>Select and download free Bibles.</source>
         <translation>Kies en laai gratis Bybels af.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="255"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="259"/>
         <source>Sample Themes</source>
         <translation>Voorbeeld Temas</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="257"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="261"/>
         <source>Select and download sample themes.</source>
         <translation>Kies en laai voorbeeld temas af.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="261"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="265"/>
         <source>Set up default settings to be used by OpenLP.</source>
         <translation>Stel verstek instellings wat deur OpenLP gebruik moet word.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="263"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="267"/>
         <source>Default output display:</source>
         <translation>Verstek uitgaande vertoning:</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="265"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="269"/>
         <source>Select default theme:</source>
         <translation>Kies verstek tema:</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="267"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="271"/>
         <source>Starting configuration process...</source>
         <translation>Konfigurasie proses begin...</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="205"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="209"/>
         <source>This wizard will help you to configure OpenLP for initial use. Click the next button below to start.</source>
         <translation>Hierdie gids sal bystand verleen in die proses om OpenLP op te stel vir eerste gebruik. Klik die volgende knoppie hieronder om die seleksie proses te begin.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="383"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="421"/>
         <source>Setting Up And Downloading</source>
         <translation>Opstel en Afliaai</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="385"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="423"/>
         <source>Please wait while OpenLP is set up and your data is downloaded.</source>
         <translation>Wag asseblief terwyl OpenLP opgestel en die data afgelaai word.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="390"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="428"/>
         <source>Setting Up</source>
         <translation>Opstel</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="417"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="455"/>
         <source>Click the finish button to start OpenLP.</source>
         <translation>Kliek die voltooi knoppie om OpenLP te begin.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="405"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="443"/>
         <source>Download complete. Click the finish button to return to OpenLP.</source>
         <translation>Aflaai voltooi. Klik op die klaar knoppie om na OpenLP terug te keer.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimeform.py" line="414"/>
+        <location filename="openlp/core/ui/firsttimeform.py" line="452"/>
         <source>Click the finish button to return to OpenLP.</source>
         <translation>Kliek die voltooi knoppie om na OpenLP terug te keer.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="213"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="217"/>
         <source>Custom Slides</source>
         <translation>Aangepasde Skyfies</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="269"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="273"/>
         <source>Finish</source>
         <translation>Eindig</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="236"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="240"/>
         <source>No Internet connection was found. The First Time Wizard needs an Internet connection in order to be able to download sample songs, Bibles and themes.  Click the Finish button now to start OpenLP with initial settings and no sample data.
 
 To re-run the First Time Wizard and import this sample data at a later time, check your Internet connection and re-run this wizard by selecting &quot;Tools/Re-run First Time Wizard&quot; from OpenLP.</source>
@@ -2893,7 +2893,7 @@
 Om weer die Eerste Keer Gids te gebruik en hierdie voorbeeld data om &apos;n latere stadium in te voer, gaan jou Internet konneksie na en begin weer hierdie gids deur &quot;Gereedskap/Eerste Keer Gids&quot; vanaf OpenLP te begin.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/firsttimewizard.py" line="244"/>
+        <location filename="openlp/core/ui/firsttimewizard.py" line="248"/>
         <source>
 
 To cancel the First Time Wizard completely (and not start OpenLP), click the Cancel button now.</source>
@@ -2943,32 +2943,32 @@
 <context>
     <name>OpenLP.FormattingTagForm</name>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="167"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="168"/>
         <source>Update Error</source>
         <translation>Opdateer Fout</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="119"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="120"/>
         <source>Tag &quot;n&quot; already defined.</source>
         <translation>Etiket &quot;n&quot; alreeds gedefinieër.</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="126"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="127"/>
         <source>New Tag</source>
         <translation>Nuwe Etiket</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="128"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="129"/>
         <source>&lt;HTML here&gt;</source>
         <translation>&lt;HTML hier&gt;</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="130"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="131"/>
         <source>&lt;/and here&gt;</source>
         <translation>&lt;/en hier&gt;</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/formattingtagform.py" line="167"/>
+        <location filename="openlp/core/ui/formattingtagform.py" line="168"/>
         <source>Tag %s already defined.</source>
         <translation>Etiket %s alreeds gedefinieër.</translation>
     </message>
@@ -2976,82 +2976,82 @@
 <context>
     <name>OpenLP.FormattingTags</name>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="89"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="90"/>
         <source>Red</source>
         <translation>Rooi</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="94"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="95"/>
         <source>Black</source>
         <translation>Swart</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="99"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="100"/>
         <source>Blue</source>
         <translation>Blou</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="104"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="105"/>
         <source>Yellow</source>
         <translation>Geel</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="109"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="110"/>
         <source>Green</source>
         <translation>Groen</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="114"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="115"/>
         <source>Pink</source>
         <translation>Pienk</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="119"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="120"/>
         <source>Orange</source>
         <translation>Oranje</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="124"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="125"/>
         <source>Purple</source>
         <translation>Pers</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="129"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="130"/>
         <source>White</source>
         <translation>Wit</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="134"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="135"/>
         <source>Superscript</source>
         <translation>Bo-skrif</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="139"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="140"/>
         <source>Subscript</source>
         <translation>Onder-skrif</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="144"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="145"/>
         <source>Paragraph</source>
         <translation>Paragraaf</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="149"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="150"/>
         <source>Bold</source>
         <translation>Vetdruk</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="153"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="154"/>
         <source>Italics</source>
         <translation>Italiaans</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="157"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="158"/>
         <source>Underline</source>
         <translation>Onderlyn</translation>
     </message>
     <message>
-        <location filename="openlp/core/lib/formattingtags.py" line="163"/>
+        <location filename="openlp/core/lib/formattingtags.py" line="164"/>
         <source>Break</source>
         <translation>Breek</translation>
     </message>
@@ -3230,7 +3230,7 @@
 <context>
     <name>OpenLP.MainDisplay</name>
     <message>
-        <location filename="openlp/core/ui/maindisplay.py" line="200"/>
+        <location filename="openlp/core/ui/maindisplay.py" line="205"/>
         <source>OpenLP Display</source>
         <translation>OpenLP Vertooning</translation>
     </message>
@@ -3542,7 +3542,7 @@
         <translation>Die Hoof Skerm is afgeskakel</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/mainwindow.py" line="1277"/>
+        <location filename="openlp/core/ui/mainwindow.py" line="1283"/>
         <source>Default Theme: %s</source>
         <translation>Verstek Tema: %s</translation>
     </message>
@@ -3558,12 +3558,12 @@
         <translation>Konfigureer Kor&amp;tpaaie...</translation>
     </message>
     <message>
-        <location filename="openlp/core/ui/mainwindow.py" line="1185"/>
+        <location filename="openlp/core/ui/mainwindow.py" line="1191"/>
         <source>Close OpenLP</source>
         <translation>M