openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #06831
[Merge] lp:~googol-hush/openlp/trivial into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/52728
Hello!
- "Entire Song" considers song comments
- fixed the "search_length" (searching the entire song should take longer than just searching the lyrics)
- show songs, when the search field is cleared by using backspace
- trivial clean ups
--
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/52728
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2011-03-08 16:46:53 +0000
+++ openlp/core/ui/maindisplay.py 2011-03-09 18:48:13 +0000
@@ -516,9 +516,6 @@
``parent``
The parent widget.
-
- ``screens``
- The list of screens.
"""
log.debug(u'AudioPlayer Initialisation started')
QtCore.QObject.__init__(self, parent)
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2011-03-08 16:46:53 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2011-03-09 18:48:13 +0000
@@ -159,15 +159,15 @@
def onSearchTextButtonClick(self):
search_keywords = unicode(self.searchTextEdit.displayText())
search_results = []
- # search_type = self.searchTypeComboBox.currentIndex()
search_type = self.searchTextEdit.currentSearchType()
if search_type == SongSearch.Entire:
log.debug(u'Entire Song Search')
search_results = self.parent.manager.get_all_objects(Song,
or_(Song.search_title.like(u'%' + self.whitespace.sub(u' ',
search_keywords.lower()) + u'%'),
- Song.search_lyrics.like(u'%' + search_keywords.lower() + \
- u'%')), Song.search_title.asc())
+ Song.search_lyrics.like(u'%' + search_keywords.lower() + u'%'),
+ Song.comments.like(u'%' + search_keywords.lower() + u'%')),
+ Song.search_title.asc())
self.displayResultsSong(search_results)
elif search_type == SongSearch.Titles:
log.debug(u'Titles Search')
@@ -253,11 +253,13 @@
if self.searchAsYouType:
search_length = 1
if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
- search_length = 3
+ search_length = 7
elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
- search_length = 7
+ search_length = 6
if len(text) > search_length:
self.onSearchTextButtonClick()
+ elif len(text) == 0:
+ self.onClearTextButtonClick()
def onImportClick(self):
if not hasattr(self, u'import_wizard'):
@@ -446,10 +448,9 @@
add_song = False
editId = song.id
break
- if add_song:
- if self.addSongFromService:
- editId = self.openLyrics.xml_to_song(item.xml_version)
- self.onSearchTextButtonClick()
+ if add_song and self.addSongFromService:
+ editId = self.openLyrics.xml_to_song(item.xml_version)
+ self.onSearchTextButtonClick()
# Update service with correct song id.
if editId:
Receiver.send_message(u'service_item_update',
Follow ups