diff --git a/demo_theme.xml b/demo_theme.xml deleted file mode 100644 index 118a1d7d4..000000000 --- a/demo_theme.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - openlp.org 2.0 Demo Theme - 2 - ./openlp/core/test/data_for_tests/treesbig.jpg - clBlack - - Tahoma - clWhite - 16 - -1 - $00000001 - -1 - clRed - 2 - 2 - diff --git a/documentation/api/source/plugins/songs.rst b/documentation/api/source/plugins/songs.rst index fed9907a2..1e86ce020 100644 --- a/documentation/api/source/plugins/songs.rst +++ b/documentation/api/source/plugins/songs.rst @@ -72,9 +72,6 @@ Song Importers .. automodule:: openlp.plugins.songs.lib.cclifileimport :members: -.. autoclass:: openlp.plugins.songs.lib.cclifileimport.CCLIFileImportError - :members: - .. automodule:: openlp.plugins.songs.lib.ewimport :members: diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 7ad377817..76d7c0617 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -293,6 +293,7 @@ def clean_tags(text): Remove Tags from text for display """ text = text.replace(u'
', u'\n') + text = text.replace(u' ', u' ') for tag in DisplayTags.get_html_tags(): text = text.replace(tag[u'start tag'], u'') text = text.replace(tag[u'end tag'], u'') diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index c2e1243ce..3171730ea 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -34,7 +34,7 @@ from sqlalchemy import create_engine, MetaData from sqlalchemy.exceptions import InvalidRequestError from sqlalchemy.orm import scoped_session, sessionmaker -from openlp.core.utils import AppLocation +from openlp.core.utils import AppLocation, delete_file log = logging.getLogger(__name__) @@ -75,11 +75,7 @@ def delete_database(plugin_name, db_file_name=None): else: db_file_path = os.path.join( AppLocation.get_section_data_path(plugin_name), plugin_name) - try: - os.remove(db_file_path) - return True - except OSError: - return False + return delete_file(db_file_path) class BaseModel(object): """ @@ -295,4 +291,4 @@ class Manager(object): if self.is_dirty: engine = create_engine(self.db_url) if self.db_url.startswith(u'sqlite'): - engine.execute("vacuum") \ No newline at end of file + engine.execute("vacuum") diff --git a/openlp/core/lib/eventreceiver.py b/openlp/core/lib/eventreceiver.py index 63ad5b796..6fa8e624a 100644 --- a/openlp/core/lib/eventreceiver.py +++ b/openlp/core/lib/eventreceiver.py @@ -207,14 +207,8 @@ class EventReceiver(QtCore.QObject): ``bibles_nobook`` Attempt to find book resulted in no match - ``bibles_showprogress`` - Show progress of bible verse import - - ``bibles_hideprogress`` - Hide progress of bible verse import - - ``bibles_stop_import`` - Stops the Bible Import + ``openlp_stop_wizard`` + Stops a wizard before completion ``remotes_poll_request`` Waits for openlp to do something "interesting" and sends a diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 0a26382f8..86056f4b5 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -641,4 +641,4 @@ def build_alert_css(alertTab, width): align = u'top' alert = style % (width, align, alertTab.font_face, alertTab.font_size, alertTab.font_color, alertTab.bg_color) - return alert \ No newline at end of file + return alert diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py index 0be1a01c8..02d7010be 100644 --- a/openlp/core/lib/imagemanager.py +++ b/openlp/core/lib/imagemanager.py @@ -30,7 +30,6 @@ A Thread is used to convert the image to a byte array so the user does not need to wait for the conversion to happen. """ import logging -import os import time from PyQt4 import QtCore @@ -86,8 +85,7 @@ class ImageManager(QtCore.QObject): for key in self._cache.keys(): image = self._cache[key] image.dirty = True - fullpath = os.path.join(image.path, image.name) - image.image = resize_image(fullpath, + image.image = resize_image(image.path, self.width, self.height) self._cache_dirty = True # only one thread please @@ -165,4 +163,4 @@ class ImageManager(QtCore.QObject): image = self._cache[key] if image.dirty: image.image_bytes = image_to_byte(image.image) - image.dirty = False \ No newline at end of file + image.dirty = False diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 6fb834e05..5799a3f41 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -169,8 +169,9 @@ class MediaManagerItem(QtGui.QWidget): ``slot`` The method to call when the button is clicked. - ``objectname`` - The name of the button. + ``checkable`` + If *True* the button has two, *off* and *on*, states. Default is + *False*, which means the buttons has only one state. """ # NB different order (when I broke this out, I didn't want to # break compatability), but it makes sense for the icon to @@ -193,13 +194,13 @@ class MediaManagerItem(QtGui.QWidget): """ # Add a toolbar self.addToolbar() - #Allow the plugin to define buttons at start of bar + # Allow the plugin to define buttons at start of bar self.addStartHeaderBar() - #Add the middle of the tool bar (pre defined) + # Add the middle of the tool bar (pre defined) self.addMiddleHeaderBar() - #Allow the plugin to define buttons at end of bar + # Allow the plugin to define buttons at end of bar self.addEndHeaderBar() - #Add the list view + # Add the list view self.addListViewToToolBar() def addMiddleHeaderBar(self): diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index ce0907fbb..276563eba 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -243,7 +243,7 @@ class ServiceItem(object): file to represent this item. """ service_header = { - u'name': self.name.lower(), + u'name': self.name, u'plugin': self.name, u'theme': self.theme, u'title': self.title, @@ -392,10 +392,16 @@ class ServiceItem(object): """ Returns the title of the raw frame """ - return self._raw_frames[row][u'title'] + try: + return self._raw_frames[row][u'title'] + except IndexError: + return u'' def get_frame_path(self, row=0): """ Returns the path of the raw frame """ - return self._raw_frames[row][u'path'] + try: + return self._raw_frames[row][u'path'] + except IndexError: + return u'' diff --git a/openlp/core/lib/spelltextedit.py b/openlp/core/lib/spelltextedit.py index 30811e08b..82391a0b3 100644 --- a/openlp/core/lib/spelltextedit.py +++ b/openlp/core/lib/spelltextedit.py @@ -28,9 +28,9 @@ import re try: import enchant from enchant import DictNotFoundError - enchant_available = True + ENCHANT_AVAILABLE = True except ImportError: - enchant_available = False + ENCHANT_AVAILABLE = False # based on code from # http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check @@ -45,7 +45,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit): def __init__(self, *args): QtGui.QPlainTextEdit.__init__(self, *args) # Default dictionary based on the current locale. - if enchant_available: + if ENCHANT_AVAILABLE: try: self.dict = enchant.Dict() except DictNotFoundError: @@ -72,7 +72,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit): self.setTextCursor(cursor) # Check if the selected word is misspelled and offer spelling # suggestions if it is. - if enchant_available and self.textCursor().hasSelection(): + if ENCHANT_AVAILABLE and self.textCursor().hasSelection(): text = unicode(self.textCursor().selectedText()) if not self.dict.check(text): spell_menu = QtGui.QMenu(translate('OpenLP.SpellTextEdit', diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 35b62ddda..70517b34d 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -261,7 +261,7 @@ class ThemeXML(object): def add_font(self, name, color, size, override, fonttype=u'main', bold=u'False', italics=u'False', line_adjustment=0, xpos=0, ypos=0, width=0, height=0 , outline=u'False', - outline_color=u'#ffffff', outline_pixel=2, shadow=u'False', + outline_color=u'#ffffff', outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5): """ Add a Font. diff --git a/openlp/core/lib/toolbar.py b/openlp/core/lib/toolbar.py index 93aed62e5..f2c7f1b0d 100644 --- a/openlp/core/lib/toolbar.py +++ b/openlp/core/lib/toolbar.py @@ -51,7 +51,8 @@ class OpenLPToolbar(QtGui.QToolBar): log.debug(u'Init done') def addToolbarButton(self, title, icon, tooltip=None, slot=None, - checkable=False): + checkable=False, shortcut=0, alternate=0, + context=QtCore.Qt.WidgetShortcut): """ A method to help developers easily add a button to the toolbar. @@ -69,8 +70,18 @@ class OpenLPToolbar(QtGui.QToolBar): ``slot`` The method to run when this button is clicked. - ``objectname`` - The name of the object, as used in `