From e3b7cc2c91609827b0256f947b1a3756f7d3e7fb Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 28 Oct 2010 16:56:52 +0200 Subject: [PATCH] fixed manager for customs --- openlp/plugins/custom/customplugin.py | 8 ++++---- openlp/plugins/custom/lib/mediaitem.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 63bce3f81..c7fb38e3b 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -59,7 +59,7 @@ class CustomPlugin(Plugin): return CustomTab(self.name, visible_name[u'title']) def getMediaManagerItem(self): - # Create the CustomManagerItem object + # Create the ManagerItem object return CustomMediaItem(self, self, self.icon) def about(self): @@ -76,7 +76,7 @@ class CustomPlugin(Plugin): Returns True if the theme is being used, otherwise returns False. """ - if self.custommanager.get_all_objects(CustomSlide, + if self.manager.get_all_objects(CustomSlide, CustomSlide.theme_name == theme): return True return False @@ -92,11 +92,11 @@ class CustomPlugin(Plugin): ``newTheme`` The new name the plugin should now use. """ - customsUsingTheme = self.custommanager.get_all_objects(CustomSlide, + customsUsingTheme = self.manager.get_all_objects(CustomSlide, CustomSlide.theme_name == oldTheme) for custom in customsUsingTheme: custom.theme_name = newTheme - self.custommanager.save_object(custom) + self.manager.save_object(custom) def setPluginTextStrings(self): """ diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 3fe8a9b0f..9cdcb9ed7 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -140,7 +140,7 @@ class CustomMediaItem(MediaManagerItem): id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0] for item in self.listView.selectedIndexes()] for id in id_list: - self.parent.custommanager.delete_object(CustomSlide, id) + self.parent.manager.delete_object(CustomSlide, id) for row in row_list: self.listView.takeItem(row) @@ -162,7 +162,7 @@ class CustomMediaItem(MediaManagerItem): service_item.add_capability(ItemCapabilities.AllowsEdit) service_item.add_capability(ItemCapabilities.AllowsPreview) service_item.add_capability(ItemCapabilities.AllowsLoop) - customSlide = self.parent.custommanager.get_object(CustomSlide, item_id) + customSlide = self.parent.manager.get_object(CustomSlide, item_id) title = customSlide.title credit = customSlide.credits service_item.editId = item_id