Fixes for Jon

This commit is contained in:
Tim Bentley 2011-04-29 17:27:27 +01:00
parent 4304d111f1
commit 08b6d7cee1
2 changed files with 9 additions and 4 deletions

View File

@ -81,6 +81,9 @@ class MainDisplay(DisplayWidget):
QtCore.SIGNAL(u'maindisplay_hide'), self.hideDisplay) QtCore.SIGNAL(u'maindisplay_hide'), self.hideDisplay)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay) QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'openlp_phonon_creation'),
self.createMediaObject)
def retranslateUi(self): def retranslateUi(self):
""" """
@ -105,10 +108,8 @@ class MainDisplay(DisplayWidget):
self.videoWidget.setGeometry(QtCore.QRect(0, 0, self.videoWidget.setGeometry(QtCore.QRect(0, 0,
self.screen[u'size'].width(), self.screen[u'size'].height())) self.screen[u'size'].width(), self.screen[u'size'].height()))
log.debug(u'Setup Phonon for monitor %s' % self.screens.monitor_number) log.debug(u'Setup Phonon for monitor %s' % self.screens.monitor_number)
if self.needsPhonon: if self.isLive:
if self.firstTime: if not self.firstTime:
self.firstTime = False
else:
self.createMediaObject() self.createMediaObject()
log.debug(u'Setup webView for monitor %s' % self.screens.monitor_number) log.debug(u'Setup webView for monitor %s' % self.screens.monitor_number)
self.webView = QtWebKit.QWebView(self) self.webView = QtWebKit.QWebView(self)
@ -171,6 +172,8 @@ class MainDisplay(DisplayWidget):
u'Finished setup for monitor %s' % self.screens.monitor_number) u'Finished setup for monitor %s' % self.screens.monitor_number)
def createMediaObject(self): def createMediaObject(self):
self.firstTime = False
log.debug(u'Creating Phonon objects - Start for %s', self.isLive)
self.mediaObject = Phonon.MediaObject(self) self.mediaObject = Phonon.MediaObject(self)
self.audio = Phonon.AudioOutput(Phonon.VideoCategory, self.mediaObject) self.audio = Phonon.AudioOutput(Phonon.VideoCategory, self.mediaObject)
Phonon.createPath(self.mediaObject, self.videoWidget) Phonon.createPath(self.mediaObject, self.videoWidget)
@ -184,6 +187,7 @@ class MainDisplay(DisplayWidget):
QtCore.QObject.connect(self.mediaObject, QtCore.QObject.connect(self.mediaObject,
QtCore.SIGNAL(u'tick(qint64)'), QtCore.SIGNAL(u'tick(qint64)'),
self.videoTick) self.videoTick)
log.debug(u'Creating Phonon objects - Finished for %s', self.isLive)
def text(self, slide): def text(self, slide):
""" """

View File

@ -99,6 +99,7 @@ class VersionThread(QtCore.QThread):
local_version.get(u'revision') and \ local_version.get(u'revision') and \
remote_version[u'revision'] > local_version[u'revision']: remote_version[u'revision'] > local_version[u'revision']:
Receiver.send_message(u'openlp_version_check', u'%s' % version) Receiver.send_message(u'openlp_version_check', u'%s' % version)
Receiver.send_message(u'openlp_phonon_creation')
class AppLocation(object): class AppLocation(object):