From ce807f57b6a3ea5342f8008077a9fe340698c5ac Mon Sep 17 00:00:00 2001 From: Dmitriy Marmyshev Date: Fri, 12 Apr 2013 19:12:20 +0400 Subject: [PATCH] returned old code --- openlp/core/ui/servicemanager.py | 2 +- openlp/plugins/media/lib/mediaitem.py | 6 +++--- openlp/plugins/presentations/lib/mediaitem.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index d6c416f52..d06040f44 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -1403,7 +1403,7 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog): Opens a dialog to rename the service item. """ item = self.find_service_item()[0] - if not service_item[u'service_item'].is_capable(ItemCapabilities.CanEditTitle): + if not self.service_items[item][u'service_item'].is_capable(ItemCapabilities.CanEditTitle): return title = self.service_items[item][u'service_item'].title title, ok = QtGui.QInputDialog.getText(self, self.tr(translate('OpenLP.ServiceManager', 'Input title')), diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 0c386787a..57bc6947b 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -181,9 +181,9 @@ class MediaMediaItem(MediaManagerItem): translate('MediaPlugin.MediaItem', 'Missing Media File'), translate('MediaPlugin.MediaItem', 'The file %s no longer exists.') % filename) return False - service_item.shortname = self.displayTypeComboBox.currentText() + service_item.title = self.displayTypeComboBox.currentText() + service_item.shortname = service_item.title (path, name) = os.path.split(filename) - service_item.title = name service_item.add_from_command(path, name, CLAPPERBOARD) # Only get start and end times if going to a service if context == ServiceItemContext.Service: @@ -192,7 +192,7 @@ class MediaMediaItem(MediaManagerItem): return False service_item.add_capability(ItemCapabilities.CanAutoStartForLive) service_item.add_capability(ItemCapabilities.RequiresMedia) - service_item.add_capability(ItemCapabilities.CanEditTitle) + service_item.add_capability(ItemCapabilities.HasDetailedTitleDisplay) if Settings().value(self.settings_section + u'/media auto start') == QtCore.Qt.Checked: service_item.will_auto_start = True # force a non-existent theme diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 759f166d3..f92562541 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -244,9 +244,10 @@ class PresentationMediaItem(MediaManagerItem): items = self.list_view.selectedItems() if len(items) > 1: return False + service_item.title = self.displayTypeComboBox.currentText() service_item.shortname = self.displayTypeComboBox.currentText() service_item.add_capability(ItemCapabilities.ProvidesOwnDisplay) - service_item.add_capability(ItemCapabilities.CanEditTitle) + service_item.add_capability(ItemCapabilities.HasDetailedTitleDisplay) shortname = service_item.shortname if not shortname: return False @@ -259,7 +260,6 @@ class PresentationMediaItem(MediaManagerItem): return False controller = self.controllers[service_item.shortname] (path, name) = os.path.split(filename) - service_item.title = name doc = controller.add_document(filename) if doc.get_thumbnail_path(1, True) is None: doc.load_presentation()