forked from openlp/openlp
Amend Service Item Title
This commit is contained in:
parent
139cf93541
commit
8e7d29adf1
@ -314,6 +314,18 @@ class ServiceItem(object):
|
||||
path, text_image[u'title'], text_image[u'image'] )
|
||||
self._new_item()
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
Returns the title of the service item.
|
||||
"""
|
||||
if self.is_text():
|
||||
return self.title
|
||||
else:
|
||||
if len(self._raw_frames) > 1:
|
||||
return self.title
|
||||
else:
|
||||
return self._raw_frames[0][u'title']
|
||||
|
||||
def merge(self, other):
|
||||
"""
|
||||
Updates the _uuid with the value from the original one
|
||||
|
@ -833,7 +833,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
else:
|
||||
treewidgetitem.setIcon(0,
|
||||
build_icon(u':/general/general_delete.png'))
|
||||
treewidgetitem.setText(0, serviceitem.title)
|
||||
treewidgetitem.setText(0, serviceitem.get_title())
|
||||
treewidgetitem.setToolTip(0, serviceitem.notes)
|
||||
treewidgetitem.setData(0, QtCore.Qt.UserRole,
|
||||
QtCore.QVariant(item[u'order']))
|
||||
@ -1176,7 +1176,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
for item in self.serviceItems:
|
||||
service_item = item[u'service_item']
|
||||
data_item = {}
|
||||
data_item[u'title'] = unicode(service_item.title)
|
||||
data_item[u'title'] = unicode(service_item.get_title())
|
||||
data_item[u'plugin'] = unicode(service_item.name)
|
||||
data_item[u'notes'] = unicode(service_item.notes)
|
||||
data_item[u'selected'] = (item == curitem)
|
||||
|
Loading…
Reference in New Issue
Block a user