Amend tooltips so show theme for service item if present.

Fixes: https://launchpad.net/bugs/806834
This commit is contained in:
Tim Bentley 2011-07-08 21:55:18 +01:00
parent 37fdcc62a4
commit b94115d4b2

View File

@ -956,7 +956,14 @@ class ServiceManager(QtGui.QWidget):
treewidgetitem.setIcon(0,
build_icon(u':/general/general_delete.png'))
treewidgetitem.setText(0, serviceitem.get_display_title())
treewidgetitem.setToolTip(0, serviceitem.notes)
tips = []
if serviceitem.theme and serviceitem.theme != -1:
tips.append(unicode(translate('OpenLP.ServiceManager',
'Slide theme : %s')) % serviceitem.theme)
if serviceitem.notes:
tips.append(unicode(translate('OpenLP.ServiceManager',
'Notes : %s')) % unicode(serviceitem.notes))
treewidgetitem.setToolTip(0, u'\n'.join(tips))
treewidgetitem.setData(0, QtCore.Qt.UserRole,
QtCore.QVariant(item[u'order']))
treewidgetitem.setSelected(item[u'selected'])