diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index 297e1d37f..f974d949b 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -130,9 +130,6 @@ class Settings(QtCore.QSettings): ``advanced/slide limits`` to ``SlideLimits.Wrap``. **NOTE**, this means that the rules have to cover all cases! So, if the type of the old value is bool, then there must be two rules. """ - on_monitor_default = True - if log.isEnabledFor(logging.DEBUG): - on_monitor_default = False __default_settings__ = { 'settings/version': 0, 'advanced/add page break': False, @@ -205,7 +202,7 @@ class Settings(QtCore.QSettings): 'core/view mode': 'default', # The other display settings (display position and dimensions) are defined in the ScreenList class due to a # circular dependency. - 'core/display on monitor': on_monitor_default, + 'core/display on monitor': False, 'core/override position': False, 'core/monitor': {}, 'core/application version': '0.0', diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index 244916d24..055d599aa 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -65,7 +65,7 @@ def get_vlc(): if 'vlc' not in sys.modules: try: import vlc # noqa module is not used directly, but is used via sys.modules['vlc'] - except ImportError: + except (ImportError, OSError): return None # Verify that VLC is also loadable is_vlc_available = False diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 46d067970..4a3aa5073 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -173,7 +173,7 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R for xml_file_path in xml_file_paths: theme_data = get_text_file_string(xml_file_path) theme = self._create_theme_from_xml(theme_data, self.theme_path) - self._write_theme(theme) + self.save_theme(theme) xml_file_path.unlink() def build_theme_path(self): diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index a6fdcd99f..f9a1fd2f8 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -66,8 +66,8 @@ __default_settings__ = { 'songs/add song from service': True, 'songs/add songbook slide': False, 'songs/display songbar': True, - 'songs/last directory import': '', - 'songs/last directory export': '', + 'songs/last directory import': None, + 'songs/last directory export': None, 'songs/songselect username': '', 'songs/songselect password': '', 'songs/songselect searches': '', diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 76e305b4e..3e0e0ce3a 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -18,7 +18,7 @@ environment: install: # Install dependencies from pypi - - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc" + - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock pyodbc psycopg2 pypiwin32 websockets asyncio waitress six webob requests QtAwesome PyQt5 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc Pyro4" build: off diff --git a/tests/openlp_core/ui/test_themeform.py b/tests/openlp_core/ui/test_themeform.py index 02a7d0589..19a86457f 100644 --- a/tests/openlp_core/ui/test_themeform.py +++ b/tests/openlp_core/ui/test_themeform.py @@ -23,7 +23,7 @@ Interface tests to test the ThemeWizard class and related methods. """ from unittest import TestCase -from unittest.mock import patch +from unittest.mock import patch, MagicMock from openlp.core.common.registry import Registry from openlp.core.ui.themeform import ThemeForm @@ -39,6 +39,8 @@ class TestThemeManager(TestCase, TestMixin): Create the UI """ Registry.create() + mocked_renderer = MagicMock() + Registry().register('renderer', mocked_renderer) @patch('openlp.core.display.window.QtWidgets.QVBoxLayout') def test_create_theme_wizard(self, mocked_qvboxlayout):