forked from openlp/openlp
Merge branch 'alpha-fixes1' into 'master'
Fixes for the first Alpha: Closes #354 See merge request openlp/openlp!111
This commit is contained in:
commit
74a207e135
@ -74,4 +74,4 @@ class SingleColumnTableWidget(QtWidgets.QTableWidget):
|
||||
self.resizeRowsToContents()
|
||||
|
||||
|
||||
__all__ = ['AlertLocation', 'DisplayControllerType', 'HideMode', 'SingleColumnTableWidget']
|
||||
__all__ = ['DisplayControllerType', 'HideMode', 'SingleColumnTableWidget']
|
||||
|
@ -147,7 +147,7 @@ class VlcPlayer(MediaPlayer):
|
||||
"""
|
||||
return get_vlc() is not None
|
||||
|
||||
def load(self, controller, output_display, file):
|
||||
def load(self, controller, output_display, file=None):
|
||||
"""
|
||||
Load a video into VLC
|
||||
|
||||
|
@ -80,7 +80,7 @@ class VersionWorker(ThreadWorker):
|
||||
|
||||
**Rules around versions and version files:**
|
||||
|
||||
* If a version number has a build (i.e. -bzr1234), then it is a nightly.
|
||||
* If a version number has a revision hash (i.e. g9034d140b), then it is a nightly.
|
||||
* If a version number's minor version is an odd number, it is a development release.
|
||||
* If a version number's minor version is an even number, it is a stable release.
|
||||
"""
|
||||
@ -143,7 +143,9 @@ def get_version():
|
||||
"""
|
||||
Returns the application version of the running instance of OpenLP::
|
||||
|
||||
{'full': '1.9.4-bzr1249', 'version': '1.9.4', 'build': 'bzr1249'}
|
||||
{'full': '2.9.0.dev2963+97ba02d1f', 'version': '2.9.0', 'build': '97ba02d1f'}
|
||||
or
|
||||
{'full': '2.9.0', 'version': '2.9.0', 'build': None}
|
||||
"""
|
||||
global APPLICATION_VERSION
|
||||
if APPLICATION_VERSION:
|
||||
@ -154,11 +156,11 @@ def get_version():
|
||||
except OSError:
|
||||
log.exception('Error in version file.')
|
||||
full_version = '0.0.0'
|
||||
bits = full_version.split('-')
|
||||
bits = full_version.split('.dev')
|
||||
APPLICATION_VERSION = {
|
||||
'full': full_version,
|
||||
'version': bits[0],
|
||||
'build': bits[1] if len(bits) > 1 else None
|
||||
'build': full_version.split('+')[1] if '+' in full_version else None
|
||||
}
|
||||
if APPLICATION_VERSION['build']:
|
||||
log.info('OpenLP version {version} build {build}'.format(version=APPLICATION_VERSION['version'],
|
||||
|
@ -81,7 +81,7 @@ class SelectPlanForm(QtWidgets.QDialog, Ui_SelectPlanDialog):
|
||||
self.on_plan_selection_combobox_changed()
|
||||
# Set the 2 lists of themes
|
||||
theme_manager = Registry().get('theme_manager')
|
||||
for theme in theme_manager.get_themes():
|
||||
for theme in theme_manager.get_theme_names():
|
||||
self.song_theme_selection_combo_box.addItem(theme)
|
||||
self.slide_theme_selection_combo_box.addItem(theme)
|
||||
|
||||
|
@ -21,8 +21,7 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from lxml import objectify
|
||||
from lxml.etree import Error, LxmlError
|
||||
from lxml import objectify, etree
|
||||
|
||||
from openlp.core.common import normalize_str
|
||||
from openlp.core.common.i18n import translate
|
||||
@ -130,7 +129,7 @@ class OpenSongImport(SongImport):
|
||||
self.set_defaults()
|
||||
try:
|
||||
tree = objectify.parse(file)
|
||||
except (Error, LxmlError):
|
||||
except (etree.Error, etree.LxmlError):
|
||||
self.log_error(file.name, SongStrings.XMLSyntaxError)
|
||||
log.exception('Error parsing XML')
|
||||
return
|
||||
|
@ -75,8 +75,8 @@ class TestSelectPlanForm(TestCase, TestMixin):
|
||||
self.form.planning_center_api.airplane_mode = True
|
||||
self.form.planning_center_api.airplane_mode_directory = TEST_PATH
|
||||
self.theme_manager = ThemeManager(None)
|
||||
self.theme_manager.get_themes = MagicMock()
|
||||
self.theme_manager.get_themes.return_value = ['themeA', 'themeB']
|
||||
self.theme_manager.get_theme_names = MagicMock()
|
||||
self.theme_manager.get_theme_names.return_value = ['themeA', 'themeB']
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user