← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/testing into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/testing into lp:openlp.

    Requested reviews:
    OpenLP Core (openlp-core)


Stop having to restart between videos.

Make blanking screen a bit saner.
-- 
https://code.launchpad.net/~meths/openlp/testing/+merge/14295
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2009-11-01 19:41:13 +0000
+++ openlp/core/ui/maindisplay.py	2009-11-02 01:10:24 +0000
@@ -105,6 +105,7 @@
         self.alertTab = None
         self.timer_id = 0
         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(),
@@ -122,7 +123,7 @@
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'media_pause'), self.onMediaPaws)
         QtCore.QObject.connect(Receiver.get_receiver(),
-            QtCore.SIGNAL(u'media_stop'), self.onMediaFinish)
+            QtCore.SIGNAL(u'media_stop'), self.onMediaStop)
 
 
     def setup(self, screenNumber):
@@ -204,6 +205,10 @@
             self.displayBlank = False
             if self.frame is not None:
                 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)
 
     def displayAlert(self, text=u''):
@@ -245,7 +250,6 @@
             self.timer_id = 0
 
     def onMediaQueue(self, message):
-        self.display.close()
         file = os.path.join(message[1], message[2])
         if self.firstTime:
             self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
@@ -255,6 +259,10 @@
         self.onMediaPlay()
 
     def onMediaPlay(self):
+        if not self.mediaLoaded and not self.displayBlank:
+            self.blankDisplay()
+        self.firstTime = True
+        self.mediaLoaded = True
         self.display.hide()
         self.mediaObject.play()
         self.setVisible(True)
@@ -262,9 +270,12 @@
     def onMediaPaws(self):
         self.mediaObject.pause()
 
+    def onMediaStop(self):
+        self.mediaObject.stop()
+        self.display.show()
+
     def onMediaFinish(self):
-        self.setVisible(False)
         self.mediaObject.stop()
         self.mediaObject.clearQueue()
-        self.video.close()
+        self.mediaLoaded = False
         self.display.show()

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-11-01 19:22:51 +0000
+++ openlp/core/ui/slidecontroller.py	2009-11-02 01:10:24 +0000
@@ -241,7 +241,7 @@
             QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
         if isLive:
             QtCore.QObject.connect(self.blackPushButton,
-                QtCore.SIGNAL(u'toggled(bool)'), self.onBlankScreen)
+                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')


Follow ups