← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/futures into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/futures into lp:openlp.

    Requested reviews:
    OpenLP Core (openlp-core)


Fix presentation tab
Fix theme rebuilding for service items and live.
-- 
https://code.launchpad.net/~trb143/openlp/futures/+merge/19993
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2010-02-09 12:20:16 +0000
+++ openlp/core/ui/servicemanager.py	2010-02-23 19:24:14 +0000
@@ -573,13 +573,15 @@
         self.regenerateServiceItems()
 
     def regenerateServiceItems(self):
+        #force reset of renderer as theme data has changed
+        self.parent.RenderManager.themesata = None
         if len(self.serviceItems) > 0:
             tempServiceItems = self.serviceItems
             self.onNewService()
             for item in tempServiceItems:
-                self.addServiceItem(item[u'service_item'])
+                self.addServiceItem(item[u'service_item'], True)
 
-    def addServiceItem(self, item):
+    def addServiceItem(self, item, rebuild=False):
         """
         Add a Service item to the list
 
@@ -606,6 +608,9 @@
                     u'order': len(self.serviceItems)+1,
                     u'expanded':True})
                 self.repaintServiceList(sitem + 1, 0)
+            #if rebuilding list make sure live is fixed.
+            if rebuild:
+                self.parent.LiveController.replaceServiceManagerItem(item)
         self.parent.serviceChanged(False, self.serviceName)
 
     def makePreview(self):

=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	2009-12-31 12:52:01 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2010-02-23 19:24:14 +0000
@@ -51,17 +51,10 @@
         self.PresentationLeftLayout.setMargin(0)
         self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
         self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
-        self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox)
+        self.VerseDisplayLayout = QtGui.QVBoxLayout(self.VerseDisplayGroupBox)
         self.VerseDisplayLayout.setMargin(8)
         self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout')
-        self.VerseTypeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
-        self.VerseTypeWidget.setObjectName(u'VerseTypeWidget')
-        self.VerseTypeLayout = QtGui.QHBoxLayout(self.VerseTypeWidget)
-        self.VerseTypeLayout.setSpacing(8)
-        self.VerseTypeLayout.setMargin(0)
-        self.VerseTypeLayout.setObjectName(u'VerseTypeLayout')
         self.PresenterCheckboxes = {}
-        index = 0
         for key in self.controllers:
             controller = self.controllers[key]
             checkbox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
@@ -69,8 +62,7 @@
             checkbox.setEnabled(controller.available)
             checkbox.setObjectName(controller.name + u'CheckBox')
             self.PresenterCheckboxes[controller.name] = checkbox
-            index = index + 1
-            self.VerseDisplayLayout.addWidget(checkbox, index, 0, 1, 1)
+            self.VerseDisplayLayout.addWidget(checkbox)
         self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
         self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget')
         self.PresentationThemeLayout = QtGui.QHBoxLayout(
@@ -96,6 +88,7 @@
         self.PresentationLayout.addWidget(self.PresentationRightWidget)
 
     def retranslateUi(self):
+        self.VerseDisplayGroupBox.setTitle(self.trUtf8('Available Controllers'))
         for key in self.controllers:
             controller = self.controllers[key]
             checkbox = self.PresenterCheckboxes[controller.name]
@@ -115,4 +108,4 @@
             controller = self.controllers[key]
             checkbox = self.PresenterCheckboxes[controller.name]
             self.config.set_config(
-                controller.name, unicode(checkbox.checkState()))
\ No newline at end of file
+                controller.name, unicode(checkbox.checkState()))


Follow ups