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/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 `