openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16002
[Merge] lp:~googol/openlp/fixes into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #598393 in OpenLP: "After adding a new image to a selected (image) item in the service manager it is not selected anymore"
https://bugs.launchpad.net/openlp/+bug/598393
Bug #719102 in OpenLP: "editing author after editing song causes traceback"
https://bugs.launchpad.net/openlp/+bug/719102
Bug #730979 in OpenLP: "Song export crashes"
https://bugs.launchpad.net/openlp/+bug/730979
Bug #747206 in OpenLP: "Missing dictionary for spell check prevents program start"
https://bugs.launchpad.net/openlp/+bug/747206
For more details, see:
https://code.launchpad.net/~googol/openlp/fixes/+merge/110562
Hello,
- fixed missing "plugin" in kwargs
--
https://code.launchpad.net/~googol/openlp/fixes/+merge/110562
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/fixes into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py 2012-06-09 23:14:28 +0000
+++ openlp/plugins/songs/forms/songimportform.py 2012-06-15 16:14:23 +0000
@@ -515,6 +515,7 @@
self.formatWidgets[format][u'importWidget'] = importWidget
return importWidget
+
class SongImportSourcePage(QtGui.QWizardPage):
"""
Subclass of QtGui.QWizardPage to override isComplete() for Source Page.
=== modified file 'openlp/plugins/songs/lib/importer.py'
--- openlp/plugins/songs/lib/importer.py 2012-06-08 21:03:18 +0000
+++ openlp/plugins/songs/lib/importer.py 2012-06-15 16:14:23 +0000
@@ -66,6 +66,7 @@
log.exception('Error importing %s', 'OooImport')
HAS_OOO = False
+
class SongFormatSelect(object):
"""
This is a special enumeration class listing available file selection modes.
@@ -74,6 +75,7 @@
MultipleFiles = 1
SingleFolder = 2
+
class SongFormat(object):
"""
This is a special static class that holds an enumeration of the various
@@ -84,8 +86,10 @@
``u'class'``
Import class, e.g. ``OpenLyricsImport``
+
``u'name'``
Name of the format, e.g. ``u'OpenLyrics'``
+
``u'prefix'``
Prefix for Qt objects. Use mixedCase, e.g. ``u'openLyrics'``
See ``SongImportForm.addFileSelectItem()``
@@ -94,11 +98,14 @@
``u'canDisable'``
Whether song format importer is disablable.
+
``u'availability'``
Whether song format importer is available.
+
``u'selectMode'``
Whether format accepts single file, multiple files, or single folder
(as per ``SongFormatSelect`` options).
+
``u'filter'``
File extension filter for ``QFileDialog``.
@@ -106,14 +113,19 @@
``u'comboBoxText'``
Combo box selector (default value is the format's ``u'name'``).
+
``u'disabledLabelText'``
Required for disablable song formats.
+
``u'getFilesTitle'``
Title for ``QFileDialog`` (default includes the format's ``u'name'``).
+
``u'invalidSourceMsg'``
Message displayed if ``isValidSource()`` returns ``False``.
+
``u'descriptionText'``
Short description (1-2 lines) about the song format.
+ Message displayed if ``isValidSource()`` returns ``False``.
"""
# Song formats (ordered alphabetically after Generic)
# * Numerical order of song formats is significant as it determines the
@@ -313,7 +325,7 @@
SongFormat.WordsOfWorship,
SongFormat.ZionWorx
]
-
+
@staticmethod
def get(format, *attributes):
"""
@@ -326,6 +338,7 @@
Zero or more song format attributes from SongFormat.
Return type depends on number of supplied attributes:
+
:0: Return dict containing all defined attributes for the format.
:1: Return the attribute value.
:>1: Return tuple of requested attribute values.
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py 2012-06-08 19:30:33 +0000
+++ openlp/plugins/songs/songsplugin.py 2012-06-15 16:14:23 +0000
@@ -195,6 +195,7 @@
def importSongs(self, format, **kwargs):
class_ = SongFormat.get(format, u'class')
+ kwargs[u'plugin'] = self
importer = class_(self.manager, **kwargs)
importer.register(self.mediaItem.importWizard)
return importer
Follow ups