← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp.

    Requested reviews:
    OpenLP Core (openlp-core)


Some memory usage fixes, and changed the QPushButton on the live toolbar to a QAction - making it fit in with the rest of the UI.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bitsandbobs/+merge/14861
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw	2009-11-11 19:10:38 +0000
+++ openlp.pyw	2009-11-14 12:40:28 +0000
@@ -133,8 +133,16 @@
     # Set up command line options.
     usage = u'Usage: %prog [options] [qt-options]'
     parser = OptionParser(usage=usage)
-    parser.add_option("-d", "--debug", dest="debug",
-                      action="store_true", help="set logging to DEBUG level")
+    parser.add_option("-l", "--log-level", dest="loglevel",
+                      default="info", metavar="LEVEL",
+                      help="Set logging to LEVEL level. Valid values are "
+                           "\"debug\", \"info\", \"warning\".")
+    parser.add_option("-p", "--portable", dest="portable",
+                      action="store_true",
+                      help="Specify if this should be run as a portable app, "
+                           "off a USB flash drive.")
+    parser.add_option("-s", "--style", dest="style",
+                      help="Set the Qt4 style (passed directly to Qt4).")
     # Set up logging
     filename = u'openlp.log'
     logfile = RotatingFileHandler(filename, maxBytes=200000, backupCount=5)
@@ -144,14 +152,21 @@
     logging.addLevelName(15, u'Timer')
     # Parse command line options and deal with them.
     (options, args) = parser.parse_args()
-    if options.debug:
+    qt_args = []
+    if options.loglevel.lower() in ['d', 'debug']:
         log.setLevel(logging.DEBUG)
+    elif options.loglevel.lower() in ['w', 'warning']:
+        log.setLevel(logging.WARNING)
     else:
         log.setLevel(logging.INFO)
+    if options.style:
+        qt_args.extend(['-style', options.style])
+    # Throw the rest of the arguments at Qt, just in case.
+    qt_args.extend(args)
     # Initialise the resources
     qInitResources()
     # Now create and actually run the application.
-    app = OpenLP(sys.argv)
+    app = OpenLP(qt_args)
     sys.exit(app.run())
 
 if __name__ == u'__main__':

=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py	2009-11-03 06:15:35 +0000
+++ openlp/core/lib/eventreceiver.py	2009-11-14 12:40:28 +0000
@@ -129,16 +129,16 @@
 
 class Receiver():
     """
-    Class to allow events to be passed from different parts of the
-    system. This is a static wrapper around the ``EventReceiver``
-    class. As there is only one instance of it in the system the QT
-    signal/slot architecture can send messages across the system.
+    Class to allow events to be passed from different parts of the system. This
+    is a static wrapper around the ``EventReceiver`` class. As there is only
+    one instance of it in the system the Qt4 signal/slot architecture can send
+    messages across the system.
 
     To send a message:
-       ``Receiver().send_message(u'<<Message ID>>', data)``
+       ``Receiver.send_message(u'<<Message ID>>', data)``
 
     To receive a Message
-        ``QtCore.QObject.connect(Receiver().get_receiver(), QtCore.SIGNAL(u'<<Message ID>>'), <<ACTION>>)``
+        ``QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'<<Message ID>>'), <<ACTION>>)``
     """
     eventreceiver = EventReceiver()
 

=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py	2009-11-03 18:14:25 +0000
+++ openlp/core/lib/toolbar.py	2009-11-14 12:40:28 +0000
@@ -46,7 +46,7 @@
         self.log.debug(u'Init done')
 
     def addToolbarButton(self, title, icon, tooltip=None, slot=None,
-        objectname=None):
+        checkable=False):
         """
         A method to help developers easily add a button to the toolbar.
 
@@ -69,14 +69,19 @@
         """
         ButtonIcon = buildIcon(icon)
         if ButtonIcon:
-            if slot:
+            if slot and not checkable:
                 ToolbarButton = self.addAction(ButtonIcon, title, slot)
             else:
                 ToolbarButton = self.addAction(ButtonIcon, title)
             if tooltip:
                 ToolbarButton.setToolTip(tooltip)
+            if checkable:
+                ToolbarButton.setCheckable(True)
+                QtCore.QObject.connect(ToolbarButton,
+                    QtCore.SIGNAL(u'toggled(bool)'), slot)
             self.icons[title] = ButtonIcon
             self.actions[title] = ToolbarButton
+            return ToolbarButton
 
     def addToolbarSeparator(self, handle):
         """

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2009-11-12 19:12:13 +0000
+++ openlp/core/ui/maindisplay.py	2009-11-14 12:40:28 +0000
@@ -48,16 +48,16 @@
         if type(event) == QtGui.QKeyEvent:
             #here accept the event and do something
             if event.key() == QtCore.Qt.Key_Up:
-                Receiver().send_message(u'live_slidecontroller_previous')
+                Receiver.send_message(u'live_slidecontroller_previous')
                 event.accept()
             elif event.key() == QtCore.Qt.Key_Down:
-                Receiver().send_message(u'live_slidecontroller_next')
+                Receiver.send_message(u'live_slidecontroller_next')
                 event.accept()
             elif event.key() == QtCore.Qt.Key_PageUp:
-                Receiver().send_message(u'live_slidecontroller_first')
+                Receiver.send_message(u'live_slidecontroller_first')
                 event.accept()
             elif event.key() == QtCore.Qt.Key_PageDown:
-                Receiver().send_message(u'live_slidecontroller_last')
+                Receiver.send_message(u'live_slidecontroller_last')
                 event.accept()
             elif event.key() == QtCore.Qt.Key_Escape:
                 self.resetDisplay()
@@ -112,8 +112,6 @@
         self.firstTime = True
         self.mediaLoaded = False
         QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'live_slide_blank'), self.blankDisplay)
-        QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'alert_text'), self.displayAlert)
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'live_slide_hide'), self.hideDisplay)
@@ -208,19 +206,17 @@
 #    def aa(self):
 #        self.setWindowOpacity(1)
 
-    def blankDisplay(self):
-        if not self.displayBlank:
+    def blankDisplay(self, blanked=True):
+        if blanked:
             self.displayBlank = True
             self.display.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
         else:
             self.displayBlank = False
             if self.frame:
                 self.frameView(self.frame)
-        if self.parent.LiveController.blackPushButton.isChecked() != \
-            self.displayBlank:
-            self.parent.LiveController.blackPushButton.setChecked(
-                self.displayBlank)
-        self.parent.generalConfig.set_config(u'Screen Blank',self.displayBlank)
+        #if blanked != self.displayBlank:
+        #    self.parent.LiveController.blankButton.setChecked(self.displayBlank)
+        self.parent.generalConfig.set_config(u'Screen Blank', self.displayBlank)
 
     def displayAlert(self, text=u''):
         """

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2009-11-11 19:10:38 +0000
+++ openlp/core/ui/servicemanager.py	2009-11-14 12:40:28 +0000
@@ -599,7 +599,7 @@
         item, count = self.findServiceItem()
         if self.serviceItems[item][u'data'].editEnabled:
             self.remoteEditTriggered = True
-            Receiver().send_message(u'%s_edit' % self.serviceItems[item][u'data'].name, u'L:%s' %
+            Receiver.send_message(u'%s_edit' % self.serviceItems[item][u'data'].name, u'L:%s' %
                 self.serviceItems[item][u'data'].editId )
 
     def onRemoteEditClear(self):
@@ -666,7 +666,7 @@
                 self.serviceItems.insert(newpos, serviceItem)
                 self.repaintServiceList(endpos, startCount)
             else:
-                Receiver().send_message(u'%s_add_service_item' % plugin)
+                Receiver.send_message(u'%s_add_service_item' % plugin)
 
     def updateThemeList(self, theme_list):
         """

=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py	2009-11-03 18:14:25 +0000
+++ openlp/core/ui/settingsform.py	2009-11-14 12:40:28 +0000
@@ -67,7 +67,7 @@
     def accept(self):
         for tab_index in range(0, self.SettingsTabWidget.count()):
             self.SettingsTabWidget.widget(tab_index).save()
-        Receiver().send_message(u'config_updated')
+        Receiver.send_message(u'config_updated')
         return QtGui.QDialog.accept(self)
 
     def postSetUp(self):

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-11-12 17:21:15 +0000
+++ openlp/core/ui/slidecontroller.py	2009-11-14 12:40:28 +0000
@@ -159,8 +159,11 @@
                 self.trUtf8(u'Move to last'), self.onSlideSelectedLast)
         if self.isLive:
             self.Toolbar.addToolbarSeparator(u'Close Separator')
-            self.blackPushButton = self.Toolbar.addPushButton(
-                u':/slides/slide_close.png')
+            self.blankButton = self.Toolbar.addToolbarButton(
+                u'Blank Screen', u':/slides/slide_close.png',
+                self.trUtf8(u'Blank Screen'), self.onBlankScreen, True)
+            QtCore.QObject.connect(Receiver.get_receiver(),
+                QtCore.SIGNAL(u'live_slide_blank'), self.onBlankDisplay)
         if not self.isLive:
             self.Toolbar.addToolbarSeparator(u'Close Separator')
             self.Toolbar.addToolbarButton(
@@ -197,7 +200,7 @@
             self.trUtf8(u'Start playing media'), self.onMediaStop)
         self.volumeSlider = Phonon.VolumeSlider()
         self.volumeSlider.setGeometry(QtCore.QRect(90, 260, 221, 24))
-        self.volumeSlider.setObjectName("volumeSlider")
+        self.volumeSlider.setObjectName(u'volumeSlider')
         self.Mediabar.addToolbarWidget(
             u'Audio Volume', self.volumeSlider)
         self.ControllerLayout.addWidget(self.Mediabar)
@@ -265,11 +268,11 @@
         QtCore.QObject.connect(self.PreviewListWidget,
             QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
         if isLive:
-            QtCore.QObject.connect(self.blackPushButton,
-                QtCore.SIGNAL(u'clicked(bool)'), self.onBlankScreen)
+            #QtCore.QObject.connect(self.blackPushButton,
+            #    QtCore.SIGNAL(u'clicked(bool)'), self.onBlankScreen)
             QtCore.QObject.connect(Receiver.get_receiver(),
                 QtCore.SIGNAL(u'update_spin_delay'), self.receiveSpinDelay)
-            Receiver().send_message(u'request_spin_delay')
+            Receiver.send_message(u'request_spin_delay')
         if isLive:
             self.Toolbar.makeWidgetsInvisible(self.image_list)
         else:
@@ -402,7 +405,7 @@
         self.enableToolBar(item)
         if item.isCommand():
             if self.isLive:
-                Receiver().send_message(u'%s_start' % item.name.lower(), \
+                Receiver.send_message(u'%s_start' % item.name.lower(), \
                     [item.shortname, item.service_item_path,
                     item.service_frames[0][u'title'], self.isLive])
             else:
@@ -435,7 +438,7 @@
         self.enableToolBar(item)
         if item.isCommand():
             if self.isLive:
-                Receiver().send_message(u'%s_start' % item.name.lower(), \
+                Receiver.send_message(u'%s_start' % item.name.lower(), \
                     [item.shortname, item.service_item_path,
                     item.service_frames[0][u'title'], slideno, self.isLive])
             else:
@@ -488,7 +491,7 @@
         self.PreviewListWidget.setFocus()
         log.log(15, u'Display Rendering took %4s' % (time.time() - before))
         if self.serviceitem.audit and self.isLive:
-            Receiver().send_message(u'songusage_live', self.serviceitem.audit)
+            Receiver.send_message(u'songusage_live', self.serviceitem.audit)
         log.debug(u'displayServiceManagerItems End')
 
     #Screen event methods
@@ -497,23 +500,26 @@
         Go to the first slide.
         """
         if self.commandItem and self.commandItem.isCommand():
-            Receiver().send_message(u'%s_first'% self.commandItem.name.lower())
+            Receiver.send_message(u'%s_first'% self.commandItem.name.lower())
             self.updatePreview()
         else:
             self.PreviewListWidget.selectRow(0)
             self.onSlideSelected()
 
+    def onBlankDisplay(self):
+        self.blankButton.setChecked(self.parent.mainDisplay.displayBlank)
+
     def onBlankScreen(self, blanked):
         """
         Blank the screen.
         """
         if self.commandItem and self.commandItem.isCommand():
             if blanked:
-                Receiver().send_message(u'%s_blank'% self.commandItem.name.lower())
+                Receiver.send_message(u'%s_blank'% self.commandItem.name.lower())
             else:
-                Receiver().send_message(u'%s_unblank'% self.commandItem.name.lower())
+                Receiver.send_message(u'%s_unblank'% self.commandItem.name.lower())
         else:
-            self.parent.mainDisplay.blankDisplay()
+            self.parent.mainDisplay.blankDisplay(blanked)
 
     def onSlideSelected(self):
         """
@@ -524,7 +530,7 @@
         self.row = 0
         if row > -1 and row < self.PreviewListWidget.rowCount():
             if self.commandItem.isCommand():
-                Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
+                Receiver.send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
                 if self.isLive:
                     self.updatePreview()
             else:
@@ -569,7 +575,7 @@
         Go to the next slide.
         """
         if self.commandItem and self.commandItem.isCommand():
-            Receiver().send_message(u'%s_next'% self.commandItem.name.lower())
+            Receiver.send_message(u'%s_next'% self.commandItem.name.lower())
             self.updatePreview()
         else:
             row = self.PreviewListWidget.currentRow() + 1
@@ -583,7 +589,7 @@
         Go to the previous slide.
         """
         if self.commandItem and self.commandItem.isCommand():
-            Receiver().send_message(
+            Receiver.send_message(
                 u'%s_previous'% self.commandItem.name.lower())
             self.updatePreview()
         else:
@@ -598,7 +604,7 @@
         Go to the last slide.
         """
         if self.commandItem and self.commandItem.isCommand():
-            Receiver().send_message(u'%s_last'% self.commandItem.name.lower())
+            Receiver.send_message(u'%s_last'% self.commandItem.name.lower())
             self.updatePreview()
         else:
             self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount() - 1)
@@ -627,7 +633,7 @@
 
     def onEditSong(self):
         self.songEdit = True
-        Receiver().send_message(u'%s_edit' % self.commandItem.name, u'P:%s' %
+        Receiver.send_message(u'%s_edit' % self.commandItem.name, u'P:%s' %
             self.commandItem.editId )
 
     def onGoLive(self):
@@ -648,13 +654,13 @@
 
     def onMediaPause(self):
         if self.isLive:
-            Receiver().send_message(u'%s_pause'% self.commandItem.name.lower())
+            Receiver.send_message(u'%s_pause'% self.commandItem.name.lower())
         else:
             self.mediaObject.pause()
 
     def onMediaPlay(self):
         if self.isLive:
-            Receiver().send_message(u'%s_play'% self.commandItem.name.lower(), self.isLive)
+            Receiver.send_message(u'%s_play'% self.commandItem.name.lower(), self.isLive)
         else:
             self.SlidePreview.hide()
             self.video.show()
@@ -662,7 +668,7 @@
 
     def onMediaStop(self):
         if self.isLive:
-            Receiver().send_message(u'%s_stop'% self.commandItem.name.lower())
+            Receiver.send_message(u'%s_stop'% self.commandItem.name.lower())
         else:
             self.mediaObject.stop()
             self.video.hide()

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-11-08 13:56:25 +0000
+++ openlp/core/ui/thememanager.py	2009-11-14 12:40:28 +0000
@@ -145,7 +145,7 @@
                 name = u'%s (%s)' % (self.global_theme, self.trUtf8(u'default'))
                 self.ThemeListWidget.item(count).setText(name)
                 self.config.set_config(u'theme global theme', self.global_theme)
-                Receiver().send_message(
+                Receiver.send_message(
                     u'update_global_theme', self.global_theme)
                 self.pushThemes()
 
@@ -265,7 +265,7 @@
         self.pushThemes()
 
     def pushThemes(self):
-        Receiver().send_message(u'update_themes', self.getThemes() )
+        Receiver.send_message(u'update_themes', self.getThemes() )
 
     def getThemes(self):
         return self.themelist

=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py	2009-10-30 17:44:16 +0000
+++ openlp/core/ui/themestab.py	2009-11-14 12:40:28 +0000
@@ -135,10 +135,10 @@
     def save(self):
         self.config.set_config(u'theme global style', self.global_style )
         self.config.set_config(u'theme global theme',self.global_theme)
-        Receiver().send_message(u'update_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 )
+        Receiver.send_message(u'update_global_theme', self.global_theme )
 
     def onSongLevelButtonPressed(self):
         self.global_style = u'Song'

=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py	2009-11-07 00:00:36 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py	2009-11-14 12:40:28 +0000
@@ -199,9 +199,9 @@
     def onCancelButtonClicked(self):
         # tell import to stop
         self.message = self.trUtf8(u'Bible import stopped')
-        Receiver().send_message(u'stop_import')
+        Receiver.send_message(u'stop_import')
         # tell bibleplugin to reload the bibles
-        Receiver().send_message(u'pre_load_bibles')
+        Receiver.send_message(u'pre_load_bibles')
         self.close()
 
     def onImportButtonClicked(self):
@@ -220,7 +220,7 @@
                 self.MessageLabel.setText(message)
                 self.ProgressBar.setValue(self.barmax)
                 # tell bibleplugin to reload the bibles
-                Receiver().send_message(u'pre_load_bibles')
+                Receiver.send_message(u'pre_load_bibles')
                 QtGui.QMessageBox.information(self,
                     self.trUtf8(u'Information'), self.trUtf8(message))
 

=== modified file 'openlp/plugins/bibles/lib/bibleCSVimpl.py'
--- openlp/plugins/bibles/lib/bibleCSVimpl.py	2009-11-07 00:00:36 +0000
+++ openlp/plugins/bibles/lib/bibleCSVimpl.py	2009-11-14 12:40:28 +0000
@@ -40,7 +40,7 @@
         """
         self.bibledb = bibledb
         self.loadbible = True
-        QtCore.QObject.connect(Receiver().get_receiver(),
+        QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'openlpstopimport'), self.stop_import)
 
     def stop_import(self):
@@ -66,7 +66,7 @@
                 count += 1
                 #Flush the screen events
                 if count % 3 == 0:
-                    Receiver().send_message(u'process_events')
+                    Receiver.send_message(u'process_events')
                     count = 0
         except:
             log.exception(u'Loading books from file failed')
@@ -97,7 +97,7 @@
                 count += 1
                 #Every x verses repaint the screen
                 if count % 3 == 0:
-                    Receiver().send_message(u'process_events')
+                    Receiver.send_message(u'process_events')
                     count = 0
         except:
             log.exception(u'Loading verses from file failed')

=== modified file 'openlp/plugins/bibles/lib/bibleOSISimpl.py'
--- openlp/plugins/bibles/lib/bibleOSISimpl.py	2009-11-07 00:00:36 +0000
+++ openlp/plugins/bibles/lib/bibleOSISimpl.py	2009-11-14 12:40:28 +0000
@@ -74,7 +74,7 @@
             self.loadbible = False
             if fbibles:
                 fbibles.close()
-        QtCore.QObject.connect(Receiver().get_receiver(),
+        QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'openlpstopimport'), self.stop_import)
 
     def stop_import(self):
@@ -173,13 +173,13 @@
                             testament)
                         dialogobject.incrementProgressBar(
                             self.booksOfBible[p[0]])
-                        Receiver().send_message(u'process_events')
+                        Receiver.send_message(u'process_events')
                         count = 0
                     self.bibledb.add_verse(book.id, p[1], p[2], text)
                     count += 1
                     #Every 3 verses repaint the screen
                     if count % 3 == 0:
-                        Receiver().send_message(u'process_events')
+                        Receiver.send_message(u'process_events')
                         count = 0
         except:
             log.exception(u'Loading bible from OSIS file failed')

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2009-11-03 19:01:53 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2009-11-14 12:40:28 +0000
@@ -54,7 +54,7 @@
         MediaManagerItem.__init__(self, parent, icon, title)
         # place to store the search results
         self.search_results = {}
-        QtCore.QObject.connect(Receiver().get_receiver(),
+        QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'openlpreloadbibles'), self.reloadBibles)
 
     def initPluginNameVisible(self):
@@ -284,7 +284,7 @@
     def setQuickMessage(self, text):
         self.QuickMessage.setText(text)
         self.AdvancedMessage.setText(text)
-        Receiver().send_message(u'process_events')
+        Receiver.send_message(u'process_events')
         #minor delay to get the events processed
         time.sleep(0.1)
 

=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py	2009-11-06 18:50:46 +0000
+++ openlp/plugins/custom/forms/editcustomform.py	2009-11-14 12:40:28 +0000
@@ -82,7 +82,7 @@
         log.debug(u'onPreview')
         if button.text() == unicode(self.trUtf8(u'Save && Preview')) \
             and self.saveCustom():
-            Receiver().send_message(u'preview_custom')
+            Receiver.send_message(u'preview_custom')
 
     def initialise(self):
         self.editAll = False
@@ -130,13 +130,13 @@
             self.previewButton.setVisible(True)
 
     def closePressed(self):
-        Receiver().send_message(u'remote_edit_clear')
+        Receiver.send_message(u'remote_edit_clear')
         self.close()
 
     def accept(self):
         log.debug(u'accept')
         if self.saveCustom():
-            Receiver().send_message(u'load_custom_list')
+            Receiver.send_message(u'load_custom_list')
             self.close()
 
     def saveCustom(self):

=== modified file 'openlp/plugins/images/lib/imagetab.py'
--- openlp/plugins/images/lib/imagetab.py	2009-10-30 17:44:16 +0000
+++ openlp/plugins/images/lib/imagetab.py	2009-11-14 12:40:28 +0000
@@ -74,7 +74,7 @@
 
     def save(self):
         self.config.set_config(u'loop delay', self.loop_delay)
-        Receiver().send_message(u'update_spin_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)
+        Receiver.send_message(u'update_spin_delay', self.loop_delay)

=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py	2009-11-06 19:23:58 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py	2009-11-14 12:40:28 +0000
@@ -77,7 +77,7 @@
         self.controller.load_presentation(file)
         if self.is_live:
             self.controller.start_presentation()
-            Receiver().send_message(u'live_slide_hide') 
+            Receiver.send_message(u'live_slide_hide')
         self.controller.slidenumber = 0
         self.timer.start()
 
@@ -89,7 +89,7 @@
         self.controller.start_presentation()
         if self.controller.slidenumber > 1:
             self.controller.goto_slide(self.controller.slidenumber)
-        
+
     def slide(self, message):
         if not self.is_live:
             return
@@ -143,7 +143,7 @@
         Based on the handler passed at startup triggers slide show to shut down
         """
         if self.is_live:
-            Receiver().send_message(u'live_slide_show') 
+            Receiver.send_message(u'live_slide_show')
         self.controller.close_presentation()
         self.controller.slidenumber = 0
         self.timer.stop()
@@ -155,13 +155,13 @@
             return
         if not self.controller.is_active():
             return
-        self.controller.blank_screen()        
+        self.controller.blank_screen()
 
     def unblank(self):
         if not self.is_live:
             return
         self.activate()
-        self.controller.unblank_screen()        
+        self.controller.unblank_screen()
 
     def decodeMessage(self, message):
         """

=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py	2009-11-06 19:23:58 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py	2009-11-14 12:40:28 +0000
@@ -50,25 +50,25 @@
 
     ``name``
         The name that appears in the options and the media manager
-    
+
     ``enabled``
         The controller is enabled
 
     ``available``
         The controller is available on this machine. Set by init via
         call to check_available
-        
+
     ``plugin``
         The presentationplugin object
 
     **Hook Functions**
-    
+
     ``kill()``
         Called at system exit to clean up any running presentations
 
     ``check_available()``
         Returns True if presentation application is installed/can run on this machine
-    
+
     ``presentation_deleted()``
         Deletes presentation specific files, e.g. thumbnails
 
@@ -83,7 +83,7 @@
 
     ``is_active()``
         Returns True if a presentation is currently running
-    
+
     ``blank_screen()``
         Blanks the screen, making it black.
 
@@ -118,7 +118,7 @@
     global log
     log = logging.getLogger(u'PresentationController')
     log.info(u'loaded')
-    
+
     def __init__(self, plugin=None, name=u'PresentationController'):
         """
         This is the constructor for the presentationcontroller object.
@@ -163,7 +163,7 @@
         """
         self.store_filename(presentation)
         shutil.rmtree(self.thumbnailpath)
-    
+
     def start_process(self):
         """
         Loads a running version of the presentation application in the background.
@@ -229,7 +229,7 @@
         Returns true if a presentation is loaded
         """
         return False
-    
+
     def blank_screen(self):
         """
         Blanks the screen, making it black.
@@ -311,5 +311,5 @@
             prefix = u'live'
         else:
             prefix = u'preview'
-        Receiver().send_message(u'%s_slidecontroller_change' % prefix, 
+        Receiver.send_message(u'%s_slidecontroller_change' % prefix,
             self.slidenumber - 1)

=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py	2009-11-07 07:42:18 +0000
+++ openlp/plugins/remotes/remoteplugin.py	2009-11-14 12:40:28 +0000
@@ -73,9 +73,9 @@
         pos = datagram.find(u':')
         event = unicode(datagram[:pos].lower())
         if event == u'alert':
-            Receiver().send_message(u'alert_text', unicode(datagram[pos + 1:]))
+            Receiver.send_message(u'alert_text', unicode(datagram[pos + 1:]))
         if event == u'next_slide':
-            Receiver().send_message(u'live_slide_next')
+            Receiver.send_message(u'live_slide_next')
 
     def about(self):
         about_text = self.trUtf8(u'<b>Remote Plugin</b><br>This plugin '

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2009-11-04 19:13:49 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2009-11-14 12:40:28 +0000
@@ -404,16 +404,16 @@
         log.debug(u'onPreview')
         if button.text() == unicode(self.trUtf8(u'Save && Preview')) \
             and self.saveSong():
-            Receiver().send_message(u'preview_song')
+            Receiver.send_message(u'preview_song')
 
     def closePressed(self):
-        Receiver().send_message(u'remote_edit_clear')
+        Receiver.send_message(u'remote_edit_clear')
         self.close()
 
     def accept(self):
         log.debug(u'accept')
         if self.saveSong():
-            Receiver().send_message(u'load_song_list')
+            Receiver.send_message(u'load_song_list')
             self.close()
 
     def saveSong(self):


Follow ups