openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #10760
[Merge] lp:~trb143/openlp/fbeta3 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/fbeta3 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #806829 in OpenLP: "Cannot change theme on selected song via Service Manager"
https://bugs.launchpad.net/openlp/+bug/806829
Bug #806834 in OpenLP: "Difficult to determine theme assigned to a song using Service Manager"
https://bugs.launchpad.net/openlp/+bug/806834
For more details, see:
https://code.launchpad.net/~trb143/openlp/fbeta3/+merge/67435
Improve ServiceManager tool tips to include theme.
Fix change of theme in servicemanager to allow live to be updated.
--
https://code.launchpad.net/~trb143/openlp/fbeta3/+merge/67435
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/fbeta3 into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2011-06-18 13:36:29 +0000
+++ openlp/core/lib/serviceitem.py 2011-07-09 19:26:13 +0000
@@ -352,6 +352,9 @@
Updates the _uuid with the value from the original one
The _uuid is unique for a given service item but this allows one to
replace an original version.
+
+ ``other``
+ The service item to be merged with
"""
self._uuid = other._uuid
self.notes = other.notes
@@ -461,3 +464,14 @@
else:
return u'%s : %s' % (start, end)
+ def update_theme(self, theme):
+ """
+ updates the theme in the service item
+
+ ``theme``
+ The new theme to be replaced in the service item
+ """
+ self.theme = theme
+ self._new_item()
+ self.render()
+
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-07-07 20:14:12 +0000
+++ openlp/core/ui/servicemanager.py 2011-07-09 19:26:13 +0000
@@ -956,7 +956,17 @@
treewidgetitem.setIcon(0,
build_icon(u':/general/general_delete.png'))
treewidgetitem.setText(0, serviceitem.get_display_title())
- treewidgetitem.setToolTip(0, serviceitem.notes)
+ tips = []
+ # <st> does not work with tooltips it needs <b>
+ if serviceitem.theme and serviceitem.theme != -1:
+ tips.append(u'<b>%s :</b> <em>%s</em>' %
+ (unicode(translate('OpenLP.ServiceManager', 'Slide theme')),
+ serviceitem.theme))
+ if serviceitem.notes:
+ tips.append(u'<b>%s :</b> %s' %
+ (unicode(translate('OpenLP.ServiceManager', 'Notes')),
+ unicode(serviceitem.notes)))
+ treewidgetitem.setToolTip(0, u'<br />'.join(tips))
treewidgetitem.setData(0, QtCore.Qt.UserRole,
QtCore.QVariant(item[u'order']))
treewidgetitem.setSelected(item[u'selected'])
@@ -1338,7 +1348,7 @@
if not theme:
theme = None
item = self.findServiceItem()[0]
- self.serviceItems[item][u'service_item'].theme = theme
+ self.serviceItems[item][u'service_item'].update_theme(theme)
self.regenerateServiceItems()
def _getParentItemData(self, item):
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2011-07-08 06:41:30 +0000
+++ openlp/core/ui/slidecontroller.py 2011-07-09 19:26:13 +0000
@@ -28,6 +28,7 @@
import logging
import os
import time
+import copy
from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon
@@ -598,7 +599,8 @@
log.debug(u'processManagerItem live = %s' % self.isLive)
self.onStopLoop()
old_item = self.serviceItem
- self.serviceItem = serviceItem
+ # take a copy not a link to the servicemeanager copy.
+ self.serviceItem = copy.copy(serviceItem)
if old_item and self.isLive and old_item.is_capable(
ItemCapabilities.ProvidesOwnDisplay):
self._resetBlank()
Follow ups