← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
    openlp.org Core (openlp-core)

Clean up SlideController and make toolbar items hideable
Remove ImageToolbar code
Fix SlideController Keyboard events
Clean up PostInitialisation from Settings.
-- 
https://code.launchpad.net/~trb143/openlp/bugfixes/+merge/10870
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2009-08-26 05:00:19 +0000
+++ openlp/core/lib/__init__.py	2009-08-27 05:17:20 +0000
@@ -66,6 +66,7 @@
 from xmlrootclass import XmlRootClass
 from serviceitem import ServiceItem
 from eventreceiver import Receiver
+from serviceitem import ServiceType
 from serviceitem import ServiceItem
 from toolbar import OpenLPToolbar
 from songxmlhandler import SongXMLBuilder

=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py	2009-08-26 05:00:19 +0000
+++ openlp/core/lib/eventreceiver.py	2009-08-29 07:17:56 +0000
@@ -29,27 +29,31 @@
 
     ``stop_import``
         Stops the Bible Import
+
     ``pre_load_bibles``
         Triggers the plugin to relaod the bible lists
+
     ``process_events``
         Requests the Application to flush the events queue
-    ``{preview|live}_slide_first``
-        display the first slide on the list
-    ``{preview|live}_slide_previous``
-        display the previous slide on the list
-    ``{preview|live}_slide_next``
-        display the next slide on the list
-    ``{preview|live}_slide_last``
-        display the last slide on the list
+
     ``{plugin}_add_service_item ``
         ask the plugin to push the selected items to the service item
+
     ``update_themes ``
         send out message with new themes
+
     ``update_global_theme ``
         Tell the components we have a new global theme
+
     ``load_song_list``
         Tells the the song plugin to reload the song list
 
+    ``update_spin_delay``
+        Pushes out the Image loop delay
+
+    ``request_spin_delay``
+        Requests a spin delay
+
     """
     global log
     log = logging.getLogger(u'EventReceiver')

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2009-07-10 13:16:15 +0000
+++ openlp/core/lib/serviceitem.py	2009-08-28 18:27:32 +0000
@@ -25,6 +25,11 @@
 
 from openlp.core.lib import buildIcon
 
+class ServiceType(object):
+    Text = 1
+    Image = 2
+    Command = 3
+
 class ServiceItem(object):
     """
     The service item is a base class for the plugins to use to interact with
@@ -83,22 +88,19 @@
             self.RenderManager.set_override_theme(self.theme)
         log.debug(u'Formatting slides')
         self.frames = []
-        if self.service_item_type == u'text':
+        if self.service_item_type == ServiceType.Text:
             for slide in self.service_frames:
                 formated = self.RenderManager.format_slide(slide[u'raw_slide'])
                 for format in formated:
                     frame = self.RenderManager.generate_slide(format, self.raw_footer)
                     self.frames.append({u'title': slide[u'title'], u'image': frame})
-        elif self.service_item_type == u'command':
+        elif self.service_item_type == ServiceType.Command:
             self.frames = self.service_frames
             self.service_frames = []
-        elif self.service_item_type == u'image':
-            #print "image"
-            #print self.service_frames
+        elif self.service_item_type == ServiceType.Image:
             for slide in self.service_frames:
                 slide[u'image'] = self.RenderManager.resize_image(slide[u'image'])
             self.frames = self.service_frames
-            #self.service_frames = []
         else:
             log.error(u'Invalid value renderer :%s' % self.service_item_type)
 
@@ -115,7 +117,7 @@
         ``image``
             The actual image file name.
         """
-        self.service_item_type = u'image'
+        self.service_item_type = ServiceType.Image
         self.service_item_path = path
         self.service_frames.append({u'title': frame_title, u'image': image})
 
@@ -129,7 +131,7 @@
         ``raw_slide``
             The raw text of the slide.
         """
-        self.service_item_type = u'text'
+        self.service_item_type = ServiceType.Text
         frame_title = frame_title.split(u'\n')[0]
         self.service_frames.append({u'title': frame_title, u'raw_slide': raw_slide})
 
@@ -143,7 +145,7 @@
         ``command``
             The command of/for the slide.
         """
-        self.service_item_type = u'command'
+        self.service_item_type = ServiceType.Command
         self.service_frames.append({u'title': frame_title, u'command': command})
 
     def get_oos_repr(self):
@@ -160,15 +162,12 @@
             u'type':self.service_item_type
         }
         oos_data = []
-        if self.service_item_type == u'text':
+        if self.service_item_type == ServiceType.Text:
             for slide in self.service_frames:
                 oos_data.append(slide)
-        elif self.service_item_type == u'image':
-            #print "sf", self.service_frames
+        elif self.service_item_type == ServiceType.Image:
             for slide in self.service_frames:
-                #print "s", slide
                 oos_data.append(slide[u'title'])
-        #print "od", oos_data
         return {u'header': oos_header, u'data': oos_data}
 
     def set_from_oos(self, serviceitem, path=None):
@@ -182,7 +181,6 @@
         ``path``
             Defaults to *None*. Any path data, usually for images.
         """
-        #print "sfs", serviceitem
         header = serviceitem[u'serviceitem'][u'header']
         self.title = header[u'title']
         self.service_item_type = header[u'type']
@@ -190,12 +188,11 @@
         self.theme = header[u'theme']
         self.addIcon(header[u'icon'])
         self.raw_footer = header[u'footer']
-        if self.service_item_type == u'text':
+        if self.service_item_type == ServiceType.Text:
             for slide in serviceitem[u'serviceitem'][u'data']:
                 self.service_frames.append(slide)
-        elif self.service_item_type == u'image':
+        elif self.service_item_type == ServiceType.Image:
             for text_image in serviceitem[u'serviceitem'][u'data']:
                 filename = os.path.join(path, text_image)
-                #print "fn",  filename
                 real_image = QtGui.QImage(unicode(filename))
                 self.add_from_image(path, text_image, real_image)

=== modified file 'openlp/core/lib/settingstab.py'
--- openlp/core/lib/settingstab.py	2009-07-10 13:16:15 +0000
+++ openlp/core/lib/settingstab.py	2009-08-29 07:17:56 +0000
@@ -93,3 +93,9 @@
         Save settings to disk.
         """
         pass
+
+    def postSetUp(self):
+        """
+        Changes which need to be made after setup of application
+        """
+        pass

=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py	2009-07-08 06:55:08 +0000
+++ openlp/core/lib/toolbar.py	2009-08-28 17:40:07 +0000
@@ -34,8 +34,9 @@
         QtGui.QToolBar.__init__(self, None)
         # useful to be able to reuse button icons...
         self.icons = {}
+        self.actions = {}
         self.log = logging.getLogger(u'OpenLPToolbar')
-        self.log.info(u'Init done')
+        self.log.debug(u'Init done')
 
     def addToolbarButton(self, title, icon, tooltip=None, slot=None, objectname=None):
         """
@@ -70,12 +71,28 @@
                 ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
                     QtGui.QIcon.Normal, QtGui.QIcon.Off)
         if ButtonIcon is not None:
-            ToolbarButton = self.addAction(ButtonIcon, title)
+            if slot is not None:
+                ToolbarButton = self.addAction(ButtonIcon, title, slot)
+            else:
+                ToolbarButton = self.addAction(ButtonIcon, title)
             if tooltip is not None:
                 ToolbarButton.setToolTip(tooltip)
-            if slot is not None:
-                QtCore.QObject.connect(ToolbarButton, QtCore.SIGNAL(u'triggered()'), slot)
             self.icons[title] = ButtonIcon
+            self.actions[title] = ToolbarButton
+
+    def addToolbarSeparator(self, handle):
+        """
+        Add a Separator bar to the toolbar and store it's Handle
+        """
+        action = self.addSeparator()
+        self.actions[handle] = action
+
+    def addToolbarWidget(self, handle, widget):
+        """
+        Add a Widget to the toolbar and store it's Handle
+        """
+        action = self.addWidget(widget)
+        self.actions[handle] = action
 
     def getIconFromTitle(self, title):
         """
@@ -90,3 +107,11 @@
         else:
             self.log.error(u'getIconFromTitle - no icon for %s' % title)
             return QtGui.QIcon()
+
+    def makeWidgetsInvisible(self, widgets):
+        for widget in widgets:
+            self.actions[widget].setVisible(False)
+
+    def makeWidgetsVisible(self, widgets):
+        for widget in widgets:
+            self.actions[widget].setVisible(True)

=== modified file 'openlp/core/ui/__init__.py'
--- openlp/core/ui/__init__.py	2009-08-13 20:02:38 +0000
+++ openlp/core/ui/__init__.py	2009-08-27 05:17:20 +0000
@@ -17,7 +17,7 @@
 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 Place, Suite 330, Boston, MA 02111-1307 USA
 """
-from slidecontroller import MasterToolbar
+#from slidecontroller import MasterToolbar
 from maindisplay import MainDisplay
 from amendthemeform import AmendThemeForm
 from slidecontroller import SlideController

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2009-08-26 05:00:19 +0000
+++ openlp/core/ui/mainwindow.py	2009-08-29 07:17:56 +0000
@@ -313,8 +313,6 @@
             translate(u'mainWindow', u'Service Manager'))
         self.ThemeManagerDock.setWindowTitle(
             translate(u'mainWindow', u'Theme Manager'))
-        self.DefaultThemeLabel.setText(MainWindow.defaultThemeText + \
-            self.ThemeManagerContents.getDefault())
         self.FileNewItem.setText(translate(u'mainWindow', u'&New'))
         self.FileNewItem.setToolTip(translate(u'mainWindow', u'New Service'))
         self.FileNewItem.setStatusTip(
@@ -492,6 +490,8 @@
         # Once all components are initialised load the Themes
         log.info(u'Load Themes')
         self.ThemeManagerContents.loadThemes()
+        log.info(u'Load data from Settings')
+        self.settingsForm.postSetUp()
 
     def getMonitorNumber(self):
         """

=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py	2009-08-06 13:17:36 +0000
+++ openlp/core/ui/settingsform.py	2009-08-29 07:17:56 +0000
@@ -51,3 +51,7 @@
         for tab_index in range(0, self.SettingsTabWidget.count()):
             self.SettingsTabWidget.widget(tab_index).save()
         return QtGui.QDialog.accept(self)
+
+    def postSetUp(self):
+        for tab_index in range(0, self.SettingsTabWidget.count()):
+            self.SettingsTabWidget.widget(tab_index).postSetUp()

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-08-24 05:10:04 +0000
+++ openlp/core/ui/slidecontroller.py	2009-08-29 08:17:40 +0000
@@ -21,7 +21,7 @@
 import os
 
 from PyQt4 import QtCore, QtGui
-from openlp.core.lib import OpenLPToolbar, translate, buildIcon, Receiver
+from openlp.core.lib import OpenLPToolbar, translate, buildIcon, Receiver, ServiceType
 
 class SlideList(QtGui.QTableWidget):
     """
@@ -36,16 +36,16 @@
         if type(event) == QtGui.QKeyEvent:
             #here accept the event and do something
             if event.key() == QtCore.Qt.Key_Up:
-                self.parent.BaseToolbar.onSlideSelectedPrevious()
+                self.parent.onSlideSelectedPrevious()
                 event.accept()
             elif event.key() == QtCore.Qt.Key_Down:
-                self.parent.BaseToolbar.onSlideSelectedNext()
+                self.parent.onSlideSelectedNext()
                 event.accept()
             elif event.key() == QtCore.Qt.Key_PageUp:
-                self.parent.BaseToolbar.onSlideSelectedFirst()
+                self.parent.onSlideSelectedFirst()
                 event.accept()
             elif event.key() == QtCore.Qt.Key_PageDown:
-                self.parent.BaseToolbar.onSlideSelectedLast()
+                self.parent.onSlideSelectedLast()
                 event.accept()
             event.ignore()
         else:
@@ -63,13 +63,11 @@
         """
         Set up the Slide Controller.
         """
-        self.toolbarList = {}
         QtGui.QWidget.__init__(self, parent)
         self.isLive = isLive
-        self.prefix  = u'preview_'
-        if isLive:
-            self.prefix  = u'live_'
         self.parent = parent
+        self.image_list = [u'Start Loop', u'Stop Loop', u'Loop Spearator', u'Image SpinBox']
+        self.timer_id = 0
         self.Panel = QtGui.QWidget(parent.ControlSplitter)
         self.Splitter = QtGui.QSplitter(self.Panel)
         self.Splitter.setOrientation(QtCore.Qt.Vertical)
@@ -96,10 +94,53 @@
         self.PreviewListWidget.isLive = self.isLive
         self.PreviewListWidget.setObjectName(u'PreviewListWidget')
         self.ControllerLayout.addWidget(self.PreviewListWidget)
-        # Plugin the Base Toolbar class
-        self.BaseToolbar = MasterToolbar(self.isLive)
-        self.registerToolbar(u'master', self.BaseToolbar)
-        self.Toolbar = self.BaseToolbar.getToolbar()
+        # Build the full toolbar
+        self.Toolbar = OpenLPToolbar(self)
+        sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
+            QtGui.QSizePolicy.Fixed)
+        sizeToolbarPolicy.setHorizontalStretch(0)
+        sizeToolbarPolicy.setVerticalStretch(0)
+        sizeToolbarPolicy.setHeightForWidth(
+            self.Toolbar.sizePolicy().hasHeightForWidth())
+        self.Toolbar.setSizePolicy(sizeToolbarPolicy)
+        if self.isLive:
+            self.Toolbar.addToolbarButton(u'First Slide',
+                u':/slides/slide_first.png',
+                translate(u'SlideController', u'Move to first'),
+                self.onSlideSelectedFirst)
+        self.Toolbar.addToolbarButton(u'Previous Slide',
+            u':/slides/slide_previous.png',
+            translate(u'SlideController', u'Move to previous'),
+            self.onSlideSelectedPrevious)
+        self.Toolbar.addToolbarButton(u'Next Slide',
+            u':/slides/slide_next.png',
+            translate(u'SlideController', u'Move to next'),
+            self.onSlideSelectedNext)
+        if self.isLive:
+            self.Toolbar.addToolbarButton(u'Last Slide',
+                u':/slides/slide_last.png',
+                translate(u'SlideController', u'Move to last'),
+                self.onSlideSelectedLast)
+        if self.isLive:
+            self.Toolbar.addToolbarSeparator(u'Close Separator')
+            self.Toolbar.addToolbarButton(u'Close Screen',
+                u':/slides/slide_close.png',
+                translate(u'SlideController', u'Close Screen'),
+                self.onBlankScreen)
+        if isLive:
+            self.Toolbar.addToolbarSeparator(u'Loop Spearator')
+            self.Toolbar.addToolbarButton(u'Start Loop',
+                u':/media/media_time.png',
+                translate(u'SlideController', u'Start continuous loop'),
+                self.onStartLoop)
+            self.Toolbar.addToolbarButton(u'Stop Loop',
+                u':/media/media_stop.png',
+                translate(u'SlideController', u'Stop continuous loop'),
+                self.onStopLoop)
+            self.DelaySpinBox = QtGui.QSpinBox()
+            self.Toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
+            self.DelaySpinBox.setSuffix(translate(u'SlideController', u's'))
+
         self.ControllerLayout.addWidget(self.Toolbar)
         sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
             QtGui.QSizePolicy.Fixed)
@@ -110,7 +151,7 @@
         self.Toolbar.setSizePolicy(sizeToolbarPolicy)
         # Screen preview area
         self.PreviewFrame = QtGui.QFrame(self.Splitter)
-        self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 280, 190))
+        self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 300, 225))
         self.PreviewFrame.setSizePolicy(QtGui.QSizePolicy(
             QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum))
         self.PreviewFrame.setFrameShape(QtGui.QFrame.StyledPanel)
@@ -128,7 +169,7 @@
         sizePolicy.setHeightForWidth(
             self.SlidePreview.sizePolicy().hasHeightForWidth())
         self.SlidePreview.setSizePolicy(sizePolicy)
-        self.SlidePreview.setFixedSize(QtCore.QSize(250, 210))
+        self.SlidePreview.setFixedSize(QtCore.QSize(300, 225))
         self.SlidePreview.setFrameShape(QtGui.QFrame.Box)
         self.SlidePreview.setFrameShadow(QtGui.QFrame.Plain)
         self.SlidePreview.setLineWidth(1)
@@ -140,45 +181,46 @@
             QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSlideSelected)
         QtCore.QObject.connect(self.PreviewListWidget,
             QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
-        # Window Event Handlers
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_first'% self.prefix), self.onSlideSelectedFirst)
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_previous'% self.prefix), self.onSlideSelectedPrevious)
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_next'% self.prefix), self.onSlideSelectedNext)
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_last'% self.prefix), self.onSlideSelectedLast)
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_start_loop'% self.prefix), self.onStartLoop)
-        QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'%sslide_stop_loop'% self.prefix), self.onStopLoop)
-
-
-    def registerToolbar(self, handle,controller):
-        """
-        Register a new toolbar with the controller
-        ``handle``
-            Identifier for the toolbar being stored this should equal the
-            plugins name.
-        ``controller``
-            The toolbar class which should extend MasterToolbar
-        """
-        #store the handle name in lower case so no probems later
-        self.toolbarList[handle.lower()] = controller
-
-    def retrieveToolbar(self, handle):
-        """
-        Find the toolbar and return master if none present
-        Add extra information back into toolbar class
-        ``handle``
-            Identifier for the toolbar being requested
-        """
-        try:
-            toolbar =  self.toolbarList[handle.lower()]
-        except:
-            toolbar = self.toolbarList[u'master']
-        return toolbar
+        if isLive:
+            QtCore.QObject.connect(Receiver.get_receiver(),
+                QtCore.SIGNAL(u'update_spin_delay'), self.receiveSpinDelay)
+            Receiver().send_message(u'request_spin_delay')
+        if isLive:
+            self.Toolbar.makeWidgetsInvisible(self.image_list)
+        else:
+            pass
+
+    def receiveSpinDelay(self, value):
+        self.DelaySpinBox.setValue(int(value))
+
+    def enableToolBar(self, item):
+        """
+        Allows the toolbars to be reconfigured based on Controller Type
+        and ServiceItem Type
+        """
+        if self.isLive:
+            self.enableLiveToolBar(item)
+        else:
+            self.enablePreviewToolBar(item)
+
+    def enableLiveToolBar(self, item):
+        """
+        Allows the live toolbar to be customised
+        """
+        if item.service_item_type == ServiceType.Text:
+            self.Toolbar.makeWidgetsInvisible(self.image_list)
+        elif item.service_item_type == ServiceType.Image:
+            #Not sensible to allow loops with 1 frame
+            if len(item.frames) > 1:
+                self.Toolbar.makeWidgetsVisible(self.image_list)
+            else:
+                self.Toolbar.makeWidgetsInvisible(self.image_list)
+
+    def enablePreviewToolBar(self, item):
+        """
+        Allows the Preview toolbar to be customised
+        """
+        pass
 
     def addServiceItem(self, item):
         """
@@ -186,13 +228,8 @@
         request the correct the toolbar of the plugin
         Called by plugins
         """
-        self.BaseToolbar = self.retrieveToolbar(item.shortname)
-        self.ControllerLayout.removeWidget(self.Toolbar)
-        #remove the old toolbar
-        self.Toolbar.clear()
-        self.Toolbar = self.BaseToolbar.getToolbar()
-        self.ControllerLayout.addWidget(self.Toolbar)
         item.render()
+        self.enableToolBar(item)
         self.displayServiceManagerItems(item, 0)
 
     def addServiceManagerItem(self, item, slideno):
@@ -201,12 +238,7 @@
         request the correct the toolbar of the plugin
         Called by ServiceManager
         """
-        self.BaseToolbar = self.retrieveToolbar(item.shortname)
-        self.ControllerLayout.removeWidget(self.Toolbar)
-        #remove the old toolbar
-        self.Toolbar.clear()
-        self.Toolbar = self.BaseToolbar.getToolbar()
-        self.ControllerLayout.addWidget(self.Toolbar)
+        self.enableToolBar(item)
         self.displayServiceManagerItems(item, slideno)
 
     def displayServiceManagerItems(self, serviceitem, slideno):
@@ -243,25 +275,10 @@
         self.PreviewListWidget.setFocus()
 
     #Screen event methods
-    def onSlideSelected(self):
-        """
-        Generate the preview when you click on a slide.
-        if this is the Live Controller also display on the screen
-        """
-        row = self.PreviewListWidget.currentRow()
-        if row > -1 and row < self.PreviewListWidget.rowCount():
-            label = self.PreviewListWidget.cellWidget(row, 0)
-            smallframe = label.pixmap()
-            frame = self.serviceitem.frames[row][u'image']
-            self.SlidePreview.setPixmap(smallframe)
-            if self.isLive:
-                self.parent.mainDisplay.frameView(frame)
-
     def onSlideSelectedFirst(self):
         """
         Go to the first slide.
         """
-        print "oSSF"
         self.PreviewListWidget.selectRow(0)
         self.onSlideSelected()
 
@@ -312,12 +329,12 @@
         self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount() - 1)
         self.onSlideSelected()
 
-    def onStartLoop(self, value):
+    def onStartLoop(self):
         """
         Go to the last slide.
         """
         if self.PreviewListWidget.rowCount() > 1:
-            self.timer_id = self.startTimer(int(value) * 1000)
+            self.timer_id = self.startTimer(int(self.DelaySpinBox.value()) * 1000)
 
     def onStopLoop(self):
         """
@@ -329,88 +346,5 @@
         if event.timerId() == self.timer_id:
             self.onSlideSelectedNext()
 
-class MasterToolbar(QtCore.QObject):
-    """
-    Class from which all toolbars should extend
-    """
-    def __init__(self, isLive):
-        self.Toolbar = None
-        QtCore.QObject.__init__(self)
-        self.PreviewListWidget = QtGui.QListWidget()
-        self.isLive = isLive
-        self.prefix  = u'preview_'
-        if isLive:
-            self.prefix  = u'live_'
-
-    def getToolbar(self):
-        #define toolbar here as it needs to be redefined each time
-        #as the clear destroys it.
-        self.defineToolbar()
-        self.defineZone1()
-        self.defineZone2()
-        self.defineZone3()
-        self.defineZone4()
-        self.defineZone5()
-        return self.Toolbar
-
-    def defineToolbar(self):
-        # Controller toolbar
-        self.Toolbar = OpenLPToolbar(self)
-        sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
-            QtGui.QSizePolicy.Fixed)
-        sizeToolbarPolicy.setHorizontalStretch(0)
-        sizeToolbarPolicy.setVerticalStretch(0)
-        sizeToolbarPolicy.setHeightForWidth(
-            self.Toolbar.sizePolicy().hasHeightForWidth())
-        self.Toolbar.setSizePolicy(sizeToolbarPolicy)
-
-    def defineZone1(self):
-        #Dummy Zone
-        pass
-
-    def defineZone2(self):
-        if self.isLive:
-            self.Toolbar.addToolbarButton(u'First Slide',
-                u':/slides/slide_first.png',
-                translate(u'SlideController', u'Move to first'),
-                self.onSlideFirst)
-        self.Toolbar.addToolbarButton(u'Previous Slide',
-            u':/slides/slide_previous.png',
-            translate(u'SlideController', u'Move to previous'),
-            self.onSlidePrevious)
-        self.Toolbar.addToolbarButton(u'Next Slide',
-            u':/slides/slide_next.png',
-            translate(u'SlideController', u'Move to next'),
-            self.onSlideNext)
-        if self.isLive:
-            self.Toolbar.addToolbarButton(u'Last Slide',
-                u':/slides/slide_last.png',
-                translate(u'SlideController', u'Move to last'),
-                self.onSlideLast)
-
-    def defineZone3(self):
-        #Dummy Zone
-        pass
-
-    def defineZone4(self):
-        if self.isLive:
-            self.Toolbar.addSeparator()
-            self.Toolbar.addToolbarButton(u'Close Screen',
-                u':/slides/slide_close.png',
-                translate(u'SlideController', u'Close Screen'),
-                self.onSlideBlank)
-
-    def defineZone5(self):
-        #Dummy Zone
-        pass
-
-    def onSlideFirst(self):
-        Receiver().send_message(u'%sslide_first'% self.prefix)
-    def onSlidePrevious(self):
-        Receiver().send_message(u'%sslide_previous'% self.prefix)
-    def onSlideNext(self):
-        Receiver().send_message(u'%sslide_next'% self.prefix)
-    def onSlideLast(self):
-        Receiver().send_message(u'%sslide_last' % self.prefix)
-    def onSlideBlank(self):
-        Receiver().send_message(u'%sslide_blank' % self.prefix)
+
+

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-08-26 05:00:19 +0000
+++ openlp/core/ui/thememanager.py	2009-08-29 07:17:56 +0000
@@ -85,9 +85,6 @@
         self.servicePath = self.config.get_data_path()
         self.global_theme = unicode(self.config.get_config(u'theme global theme', u''))
 
-    def getDefault(self):
-        return self.global_theme
-
     def changeGlobalFromTab(self, themeName):
         log.debug(u'changeGlobalFromTab %s', themeName)
         for count in range (0,  self.ThemeListWidget.count()):

=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py	2009-08-25 20:04:58 +0000
+++ openlp/core/ui/themestab.py	2009-08-29 07:17:56 +0000
@@ -124,6 +124,9 @@
         self.config.set_config(u'theme global theme',self.global_theme)
         Receiver().send_message(u'update_global_theme',  self.global_theme )
 
+    def postSetUp(self):
+        Receiver().send_message(u'update_global_theme',  self.global_theme )
+
     def onSongLevelButtonPressed(self):
         self.global_style= u'Song'
         self.parent.RenderManager.set_global_theme(self.global_theme, self.global_style)

=== modified file 'openlp/plugins/images/lib/__init__.py'
--- openlp/plugins/images/lib/__init__.py	2009-08-24 05:13:27 +0000
+++ openlp/plugins/images/lib/__init__.py	2009-08-27 05:17:20 +0000
@@ -18,5 +18,4 @@
 Place, Suite 330, Boston, MA 02111-1307 USA
 """
 from mediaitem import ImageMediaItem
-from imagetoolbar import ImageToolbar
 from imagetab import ImageTab

=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py	2009-07-06 16:34:13 +0000
+++ openlp/plugins/images/lib/imagetab.py	2009-08-29 07:17:56 +0000
@@ -20,7 +20,7 @@
 
 from PyQt4 import QtCore, QtGui
 
-from openlp.core.lib import SettingsTab,  str_to_bool,  translate
+from openlp.core.lib import SettingsTab,  str_to_bool,  translate,  Receiver
 
 class ImageTab(SettingsTab):
     """
@@ -67,3 +67,7 @@
 
     def save(self):
         self.config.set_config(u'loop delay', self.loop_delay)
+        Receiver().send_message(u'update_spin_delay',  self.loop_delay )
+
+    def postSetUp(self):
+        Receiver().send_message(u'update_spin_delay',  self.loop_delay )

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2009-08-25 05:18:09 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2009-08-27 05:17:20 +0000
@@ -22,7 +22,6 @@
 
 from PyQt4 import QtCore, QtGui
 from openlp.core.lib import MediaManagerItem, ServiceItem, translate, BaseListWithDnD,  buildIcon
-from openlp.plugins.images.lib.imagetoolbar import ImageToolbar
 
 # We have to explicitly create separate classes for each plugin
 # in order for DnD to the Service manager to work correctly.
@@ -56,9 +55,6 @@
         self.ServiceItemIconName = u':/media/media_image.png'
         self.servicePath = None
         MediaManagerItem.__init__(self, parent, icon, title)
-        #create and install our own slide controller toolbar
-        imageToolbar = ImageToolbar(self, True)
-        parent.live_controller.registerToolbar(self.ConfigSection, imageToolbar)
 
     def initialise(self):
         self.ListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)


Follow ups