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 2d6bcce46..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): @@ -266,7 +267,7 @@ class MediaManagerItem(QtGui.QWidget): """ Creates the main widget for listing items the media item is tracking """ - #Add the List widget + # Add the List widget self.listView = self.ListViewWithDnD_class(self) self.listView.uniformItemSizes = True self.listView.setSpacing(1) @@ -275,9 +276,9 @@ class MediaManagerItem(QtGui.QWidget): self.listView.setAlternatingRowColors(True) self.listView.setDragEnabled(True) self.listView.setObjectName(u'%sListView' % self.plugin.name) - #Add to pageLayout + # Add to pageLayout self.pageLayout.addWidget(self.listView) - #define and add the context menu + # define and add the context menu self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) name_string = self.plugin.getString(StringContent.Name) if self.hasEditIcon: @@ -314,7 +315,7 @@ class MediaManagerItem(QtGui.QWidget): context_menu_action( self.listView, u':/general/general_add.png', translate('OpenLP.MediaManagerItem', - '&Add to selected Service Item'), + '&Add to selected Service Item'), self.onAddEditClick)) QtCore.QObject.connect(self.listView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), @@ -441,7 +442,7 @@ class MediaManagerItem(QtGui.QWidget): QtGui.QMessageBox.information(self, translate('OpenLP.MediaManagerItem', 'No Items Selected'), translate('OpenLP.MediaManagerItem', - 'You must select one or more items to preview.')) + 'You must select one or more items to preview.')) else: log.debug(u'%s Preview requested', self.plugin.name) serviceItem = self.buildServiceItem() diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index f18605711..ce0907fbb 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -60,6 +60,7 @@ class ItemCapabilities(object): AddIfNewItem = 9 ProvidesOwnDisplay = 10 + class ServiceItem(object): """ The service item is a base class for the plugins to use to interact with 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/toolbar.py b/openlp/core/lib/toolbar.py index 93aed62e5..763e6bf67 100644 --- a/openlp/core/lib/toolbar.py +++ b/openlp/core/lib/toolbar.py @@ -69,8 +69,9 @@ class OpenLPToolbar(QtGui.QToolBar): ``slot`` The method to run when this button is clicked. - ``objectname`` - The name of the object, as used in `