From f0379925bc3a00f5f6df0abb0391667bcbcec0eb Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Mar 2011 16:38:22 +0100 Subject: [PATCH 1/5] fixed bug #719102 Fixes: https://launchpad.net/bugs/719102 --- openlp/plugins/songs/lib/mediaitem.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 46c027316..64802d05f 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -274,6 +274,7 @@ class SongMediaItem(MediaManagerItem): def onNewClick(self): log.debug(u'onNewClick') + self.editItem = None self.edit_song_form.newSong() self.edit_song_form.exec_() From 7c7410a218e928d32f376398acd98dd5ff5b6376 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Mar 2011 16:53:26 +0100 Subject: [PATCH 2/5] complete fixe --- openlp/plugins/songs/lib/mediaitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 64802d05f..6efeee618 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -274,7 +274,6 @@ class SongMediaItem(MediaManagerItem): def onNewClick(self): log.debug(u'onNewClick') - self.editItem = None self.edit_song_form.newSong() self.edit_song_form.exec_() @@ -311,6 +310,7 @@ class SongMediaItem(MediaManagerItem): item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0] self.edit_song_form.loadSong(item_id, False) self.edit_song_form.exec_() + self.editItem = None def onDeleteClick(self): """ From 94d7f4e9326bbddc054a90a1b502e1ddffd7b396 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Mar 2011 19:03:16 +0100 Subject: [PATCH 3/5] speed up application start/song search --- openlp/plugins/songs/lib/db.py | 2 +- openlp/plugins/songs/lib/mediaitem.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/db.py b/openlp/plugins/songs/lib/db.py index a6255476a..b72517f70 100644 --- a/openlp/plugins/songs/lib/db.py +++ b/openlp/plugins/songs/lib/db.py @@ -256,7 +256,7 @@ def init_schema(url): mapper(Song, songs_table, properties={ 'authors': relation(Author, backref='songs', - secondary=authors_songs_table), + secondary=authors_songs_table, lazy=False), 'book': relation(Book, backref='songs'), 'media_files': relation(MediaFile, backref='songs', secondary=media_files_songs_table), diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 46c027316..05f8b29bc 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -253,9 +253,9 @@ class SongMediaItem(MediaManagerItem): if self.searchAsYouType: search_length = 1 if self.searchTextEdit.currentSearchType() == SongSearch.Entire: - search_length = 7 + search_length = 4 elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics: - search_length = 6 + search_length = 3 if len(text) > search_length: self.onSearchTextButtonClick() elif len(text) == 0: From f1b8e53e30a255a6b09cd35228e8d1f5964c3bbc Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 11 Mar 2011 19:02:36 +0000 Subject: [PATCH 4/5] Fix missing path for song usage report generation Fixes: https://launchpad.net/bugs/733271 --- openlp/plugins/songusage/forms/songusagedetailform.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openlp/plugins/songusage/forms/songusagedetailform.py b/openlp/plugins/songusage/forms/songusagedetailform.py index ee37b2a9c..71cbcba96 100644 --- a/openlp/plugins/songusage/forms/songusagedetailform.py +++ b/openlp/plugins/songusage/forms/songusagedetailform.py @@ -88,6 +88,14 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog): """ log.debug(u'accept') path = unicode(self.fileLineEdit.text()) + if path == u'': + Receiver.send_message(u'openlp_error_message', { + u'title': translate('SongUsagePlugin.SongUsageDetailForm', + 'Report Creation'), + u'message': unicode(translate( + 'SongUsagePlugin.SongUsageDetailForm', 'No output path has been' + ' selected for the report.'))}) + return check_directory_exists(path) filename = unicode(translate('SongUsagePlugin.SongUsageDetailForm', 'usage_detail_%s_%s.txt')) % ( From b3ca0ef69a3dd5db60f1d366c14dd4c69b208c84 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 11 Mar 2011 19:20:31 +0000 Subject: [PATCH 5/5] Fix text --- openlp/plugins/songusage/forms/songusagedetailform.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songusage/forms/songusagedetailform.py b/openlp/plugins/songusage/forms/songusagedetailform.py index 71cbcba96..edfee3595 100644 --- a/openlp/plugins/songusage/forms/songusagedetailform.py +++ b/openlp/plugins/songusage/forms/songusagedetailform.py @@ -91,10 +91,11 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog): if path == u'': Receiver.send_message(u'openlp_error_message', { u'title': translate('SongUsagePlugin.SongUsageDetailForm', - 'Report Creation'), + 'Output Path Not Selected'), u'message': unicode(translate( - 'SongUsagePlugin.SongUsageDetailForm', 'No output path has been' - ' selected for the report.'))}) + 'SongUsagePlugin.SongUsageDetailForm', 'You have not set a ' + 'valid output location for your song usage report. Please ' + 'select an existing path on your computer.'))}) return check_directory_exists(path) filename = unicode(translate('SongUsagePlugin.SongUsageDetailForm',