diff --git a/appveyor.yml b/appveyor.yml index fc6389c02..6d5d40ad8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,14 +15,14 @@ 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==1.16.7 QDarkStyle python-vlc Pyro4 zeroconf flask-cors pytest-qt" + - "%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==1.16.7 QDarkStyle python-vlc Pyro4 zeroconf flask-cors pytest-qt pyenchant" build: off test_script: - cd %APPVEYOR_BUILD_FOLDER% # Run the tests - - "%PYTHON%\\python.exe -m pytest -v tests" + - "%PYTHON%\\python.exe -m pytest tests" # Go back to the user root folder - cd.. diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index d1709db8c..4b82b2aef 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -315,7 +315,6 @@ class Settings(QtCore.QSettings): 'songs/songselect searches': '', 'songs/enable chords': True, 'songs/chord notation': 'english', # Can be english, german or neo-latin - 'songs/mainview chords': False, 'songs/disable chords import': False, 'songusage/status': PluginStatus.Inactive, 'songusage/db type': 'sqlite', diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index f8e0dd29f..8c7d0fefc 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -87,7 +87,8 @@ class PresentationMediaItem(MediaManagerItem): for file_type in file_types: if file_type not in file_type_string: file_type_string += '*.{text} '.format(text=file_type) - self.service_manager.supported_suffixes(file_type) + file_type_string = file_type_string.strip() + self.service_manager.supported_suffixes(file_type_string.split(' ')) self.on_new_file_masks = translate('PresentationPlugin.MediaItem', 'Presentations ({text})').format(text=file_type_string) diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 677f0c05e..198702e0d 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -62,9 +62,6 @@ class SongsTab(SettingsTab): self.chords_info_label = QtWidgets.QLabel(self.chords_group_box) self.chords_info_label.setWordWrap(True) self.chords_layout.addWidget(self.chords_info_label) - self.mainview_chords_check_box = QtWidgets.QCheckBox(self.mode_group_box) - self.mainview_chords_check_box.setObjectName('mainview_chords_check_box') - self.chords_layout.addWidget(self.mainview_chords_check_box) self.disable_chords_import_check_box = QtWidgets.QCheckBox(self.mode_group_box) self.disable_chords_import_check_box.setObjectName('disable_chords_import_check_box') self.chords_layout.addWidget(self.disable_chords_import_check_box) @@ -104,7 +101,6 @@ class SongsTab(SettingsTab): self.update_on_edit_check_box.stateChanged.connect(self.on_update_on_edit_check_box_changed) self.add_from_service_check_box.stateChanged.connect(self.on_add_from_service_check_box_changed) self.songbook_slide_check_box.stateChanged.connect(self.on_songbook_slide_check_box_changed) - self.mainview_chords_check_box.stateChanged.connect(self.on_mainview_chords_check_box_changed) self.disable_chords_import_check_box.stateChanged.connect(self.on_disable_chords_import_check_box_changed) self.english_notation_radio_button.clicked.connect(self.on_english_notation_button_clicked) self.german_notation_radio_button.clicked.connect(self.on_german_notation_button_clicked) @@ -123,7 +119,6 @@ class SongsTab(SettingsTab): self.chords_info_label.setText(translate('SongsPlugin.SongsTab', 'If enabled all text between "[" and "]" will ' 'be regarded as chords.')) self.chords_group_box.setTitle(translate('SongsPlugin.SongsTab', 'Chords')) - self.mainview_chords_check_box.setText(translate('SongsPlugin.SongsTab', 'Display chords in the main view')) self.disable_chords_import_check_box.setText(translate('SongsPlugin.SongsTab', 'Ignore chords when importing songs')) self.chord_notation_label.setText(translate('SongsPlugin.SongsTab', 'Chord notation to use:')) @@ -194,9 +189,6 @@ class SongsTab(SettingsTab): def on_songbook_slide_check_box_changed(self, check_state): self.songbook_slide = (check_state == QtCore.Qt.Checked) - def on_mainview_chords_check_box_changed(self, check_state): - self.mainview_chords = (check_state == QtCore.Qt.Checked) - def on_disable_chords_import_check_box_changed(self, check_state): self.disable_chords_import = (check_state == QtCore.Qt.Checked) @@ -220,13 +212,11 @@ class SongsTab(SettingsTab): self.songbook_slide = self.settings.value('add songbook slide') self.enable_chords = self.settings.value('enable chords') self.chord_notation = self.settings.value('chord notation') - self.mainview_chords = self.settings.value('mainview chords') self.disable_chords_import = self.settings.value('disable chords import') self.tool_bar_active_check_box.setChecked(self.tool_bar) self.update_on_edit_check_box.setChecked(self.update_edit) self.add_from_service_check_box.setChecked(self.update_load) self.chords_group_box.setChecked(self.enable_chords) - self.mainview_chords_check_box.setChecked(self.mainview_chords) self.disable_chords_import_check_box.setChecked(self.disable_chords_import) if self.chord_notation == 'german': self.german_notation_radio_button.setChecked(True) @@ -243,7 +233,6 @@ class SongsTab(SettingsTab): self.settings.setValue('update service on edit', self.update_edit) self.settings.setValue('add song from service', self.update_load) self.settings.setValue('enable chords', self.chords_group_box.isChecked()) - self.settings.setValue('mainview chords', self.mainview_chords) self.settings.setValue('disable chords import', self.disable_chords_import) self.settings.setValue('chord notation', self.chord_notation) # Only save footer template if it has been changed. This allows future updates diff --git a/tests/functional/openlp_plugins/songs/test_songstab.py b/tests/functional/openlp_plugins/songs/test_songstab.py index f385222b4..56ac335ce 100644 --- a/tests/functional/openlp_plugins/songs/test_songstab.py +++ b/tests/functional/openlp_plugins/songs/test_songstab.py @@ -90,7 +90,6 @@ def test_save_check_box_settings(form): form.on_update_on_edit_check_box_changed(QtCore.Qt.Unchecked) form.on_add_from_service_check_box_changed(QtCore.Qt.Checked) form.on_songbook_slide_check_box_changed(QtCore.Qt.Unchecked) - form.on_mainview_chords_check_box_changed(QtCore.Qt.Checked) form.on_disable_chords_import_check_box_changed(QtCore.Qt.Unchecked) # WHEN: Save is invoked form.save() @@ -100,7 +99,6 @@ def test_save_check_box_settings(form): assert form.settings.value('songs/update service on edit') is False assert form.settings.value('songs/add song from service') is True assert form.settings.value('songs/add songbook slide') is False - assert form.settings.value('songs/mainview chords') is True assert form.settings.value('songs/disable chords import') is False @@ -146,7 +144,7 @@ def test_footer_nochange(mocked_settings_set_val, form): # WHEN: save is invoked form.save() # THEN: footer should not have been saved (one less call than the change test below) - assert mocked_settings_set_val.call_count == 8 + assert mocked_settings_set_val.call_count == 7 @patch('openlp.core.common.settings.Settings.setValue') @@ -159,7 +157,7 @@ def test_footer_change(mocked_settings_set_val, form): # WHEN: save is invoked form.save() # THEN: footer should have been saved (one more call to setValue than the nochange test) - assert mocked_settings_set_val.call_count == 9 + assert mocked_settings_set_val.call_count == 8 assert form.footer_edit_box.toPlainText() == 'A new footer'