From 4c19db0b910c5d0d35223589c759221a58932877 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Nov 2010 20:45:22 +0000 Subject: [PATCH 1/3] Force black backgounds for videos --- openlp/core/ui/themeform.py | 9 +++++++++ openlp/plugins/media/lib/mediaitem.py | 2 ++ 2 files changed, 11 insertions(+) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index ff57ecd56..1406adbbd 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -569,6 +569,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): (QtGui.QMessageBox.Ok), QtGui.QMessageBox.Ok) return + if self.theme.theme_name == u'-1': + QtGui.QMessageBox.critical(self, + translate('OpenLP.ThemeForm', 'Theme Name Missing'), + translate('OpenLP.ThemeForm', + 'Invalid theme name. ' + 'Please enter one.'), + (QtGui.QMessageBox.Ok), + QtGui.QMessageBox.Ok) + return save_from = None save_to = None if self.theme.background_type == \ diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 6e3695149..030f67153 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -125,6 +125,8 @@ class MediaMediaItem(MediaManagerItem): service_item.title = unicode( translate('MediaPlugin.MediaItem', 'Media')) service_item.add_capability(ItemCapabilities.RequiresMedia) + # force a nonexistent theme + service_item.theme = -1 frame = u':/media/image_clapperboard.png' (path, name) = os.path.split(filename) service_item.add_from_command(path, name, frame) From e103dea7f147fb4e83b3b82480748f2d7ca857e4 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Nov 2010 20:46:44 +0000 Subject: [PATCH 2/3] Add extra invalid theme name --- openlp/core/ui/themeform.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 1406adbbd..0ea5f057f 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -569,9 +569,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): (QtGui.QMessageBox.Ok), QtGui.QMessageBox.Ok) return - if self.theme.theme_name == u'-1': + if self.theme.theme_name == u'-1' or self.theme.theme_name == u'None': QtGui.QMessageBox.critical(self, - translate('OpenLP.ThemeForm', 'Theme Name Missing'), + translate('OpenLP.ThemeForm', 'Theme Name Invalid'), translate('OpenLP.ThemeForm', 'Invalid theme name. ' 'Please enter one.'), From 85261fe6598a2f066ebd7be4ab9652fbbf972463 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 22 Nov 2010 18:52:58 +0000 Subject: [PATCH 3/3] Fix server load edit bug --- 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 a4f78cf95..21de00fce 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -409,7 +409,7 @@ class SongMediaItem(MediaManagerItem): Song.search_title.like(u'%' + item.data_string[u'title'].split(u'@')[0] + u'%'), Song.search_title.asc()) - author_list = item.data_string[u'authors'].split(u',') + author_list = item.data_string[u'authors'].split(u', ') editId = 0 uuid = 0 if search_results: