From 3e70173be47f89acf776d65b57585abe216748e8 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Sun, 4 Jun 2017 12:52:15 +0300 Subject: [PATCH] Renamed "last search type" to "last used search type" --- openlp/core/lib/searchedit.py | 4 ++-- openlp/plugins/bibles/bibleplugin.py | 2 +- openlp/plugins/custom/customplugin.py | 2 +- openlp/plugins/songs/songsplugin.py | 2 +- tests/interfaces/openlp_core_lib/test_searchedit.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/searchedit.py b/openlp/core/lib/searchedit.py index 52baf0d2c..e2e70a934 100644 --- a/openlp/core/lib/searchedit.py +++ b/openlp/core/lib/searchedit.py @@ -105,7 +105,7 @@ class SearchEdit(QtWidgets.QLineEdit): self.setPlaceholderText(action.placeholder_text) self.menu_button.setDefaultAction(action) self._current_search_type = identifier - Settings().setValue('{section}/last search type'.format(section=self.settings_section), identifier) + Settings().setValue('{section}/last used search type'.format(section=self.settings_section), identifier) self.searchTypeChanged.emit(identifier) return True @@ -141,7 +141,7 @@ class SearchEdit(QtWidgets.QLineEdit): self.menu_button.resize(QtCore.QSize(28, 18)) self.menu_button.setMenu(menu) self.set_current_search_type( - Settings().value('{section}/last search type'.format(section=self.settings_section))) + Settings().value('{section}/last used search type'.format(section=self.settings_section))) self.menu_button.show() self._update_style_sheet() diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 8157dc087..3c321329b 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -38,7 +38,7 @@ __default_settings__ = { 'bibles/db password': '', 'bibles/db hostname': '', 'bibles/db database': '', - 'bibles/last search type': BibleSearch.Combined, + 'bibles/last used search type': BibleSearch.Combined, 'bibles/reset to combined quick search': True, 'bibles/verse layout style': LayoutStyle.VersePerSlide, 'bibles/book name language': LanguageSelection.Bible, diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index b38f52023..652aa8b9a 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -40,7 +40,7 @@ __default_settings__ = { 'custom/db password': '', 'custom/db hostname': '', 'custom/db database': '', - 'custom/last search type': CustomSearch.Titles, + 'custom/last used search type': CustomSearch.Titles, 'custom/display footer': True, 'custom/add custom from service': True } diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 4494ade49..41655284f 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -54,7 +54,7 @@ __default_settings__ = { 'songs/db password': '', 'songs/db hostname': '', 'songs/db database': '', - 'songs/last search type': SongSearch.Entire, + 'songs/last used search type': SongSearch.Entire, 'songs/last import type': SongFormat.OpenLyrics, 'songs/update service on edit': False, 'songs/add song from service': True, diff --git a/tests/interfaces/openlp_core_lib/test_searchedit.py b/tests/interfaces/openlp_core_lib/test_searchedit.py index e2a01a450..4f4c4d68c 100644 --- a/tests/interfaces/openlp_core_lib/test_searchedit.py +++ b/tests/interfaces/openlp_core_lib/test_searchedit.py @@ -88,7 +88,7 @@ class TestSearchEdit(TestCase, TestMixin): # settings self.assertEqual(self.search_edit.current_search_type(), SearchTypes.First, "The first search type should be selected.") - self.mocked_settings().setValue.assert_called_once_with('settings_section/last search type', 0) + self.mocked_settings().setValue.assert_called_once_with('settings_section/last used search type', 0) def test_set_current_search_type(self): """ @@ -105,7 +105,7 @@ class TestSearchEdit(TestCase, TestMixin): self.assertEqual(self.search_edit.placeholderText(), SECOND_PLACEHOLDER_TEXT, "The correct placeholder text should be 'Second Placeholder Text'.") self.mocked_settings().setValue.assert_has_calls( - [call('settings_section/last search type', 0), call('settings_section/last search type', 1)]) + [call('settings_section/last used search type', 0), call('settings_section/last used search type', 1)]) def test_clear_button_visibility(self): """