forked from openlp/openlp
Renamed "last search type" to "last used search type"
This commit is contained in:
parent
8ee5c892ad
commit
3e70173be4
@ -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()
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user