openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00839
[Merge] lp:~trb143/openlp/fixes into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
More slidecontroller cleanups.
Stop Preview of media splatting the display.
Make the live toolbar a sensible size again.
--
https://code.launchpad.net/~trb143/openlp/fixes/+merge/14650
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2009-11-05 23:21:23 +0000
+++ openlp/core/ui/maindisplay.py 2009-11-09 16:45:26 +0000
@@ -130,7 +130,6 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'media_stop'), self.onMediaStop)
-
def setup(self, screenNumber):
"""
Sets up the screen on a particular screen.
@@ -264,18 +263,19 @@
self.firstTime = False
else:
self.mediaObject.enqueue(Phonon.MediaSource(file))
- self.onMediaPlay()
+ self.onMediaPlay(message[3])
- def onMediaPlay(self):
- log.debug(u'Play the new media')
- if not self.mediaLoaded and not self.displayBlank:
+ def onMediaPlay(self, live=True):
+ log.debug(u'Play the new media, Live %s', live)
+ if not self.mediaLoaded and not self.displayBlank and live:
self.blankDisplay()
self.firstTime = True
self.mediaLoaded = True
- self.display.hide()
- self.video.setFullScreen(True)
+ if live:
+ self.display.hide()
+ self.video.setFullScreen(True)
self.mediaObject.play()
- if self.primary:
+ if self.primary and live:
self.setVisible(True)
def onMediaPaws(self):
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-11-08 17:40:43 +0000
+++ openlp/core/ui/mainwindow.py 2009-11-09 16:45:26 +0000
@@ -536,6 +536,9 @@
self.settingsForm.postSetUp()
def versionCheck(self):
+ """
+ Checks the version of the Application called from openlp.pyw
+ """
applicationVersion = self.applicationVersion[u'Full']
version = check_latest_version(self.generalConfig, applicationVersion)
if applicationVersion != version:
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-11-08 17:40:43 +0000
+++ openlp/core/ui/slidecontroller.py 2009-11-09 16:45:26 +0000
@@ -26,6 +26,8 @@
import time
from PyQt4 import QtCore, QtGui
+from PyQt4.phonon import Phonon
+
from openlp.core.lib import OpenLPToolbar, Receiver, ServiceItemType, \
str_to_bool, PluginConfig
@@ -80,20 +82,9 @@
u'Loop Separator',
u'Image SpinBox'
]
- self.media_list = [
- u'Media Start',
- u'Media Stop',
- u'Media Pause'
- ]
self.song_edit_list = [
u'Edit Song',
]
- self.song_list = [
- u'First Slide',
- u'Previous Slide',
- u'Next Slide',
- u'Last Slide',
- ]
self.timer_id = 0
self.commandItem = None
self.songEdit = False
@@ -109,10 +100,12 @@
self.TypeLabel.setText(u'<strong>%s</strong>' %
self.trUtf8(u'Live'))
self.split = 1
+ prefix = u'live_slidecontroller'
else:
self.TypeLabel.setText(u'<strong>%s</strong>' %
self.trUtf8(u'Preview'))
self.split = 0
+ prefix = u'preview_slidecontroller'
self.TypeLabel.setAlignment(QtCore.Qt.AlignCenter)
self.PanelLayout.addWidget(self.TypeLabel)
# Splitter
@@ -190,16 +183,24 @@
u'Image SpinBox', self.DelaySpinBox)
self.DelaySpinBox.setSuffix(self.trUtf8(u's'))
self.DelaySpinBox.setToolTip(self.trUtf8(u'Delay between slides in seconds'))
- self.Toolbar.addToolbarButton(
- u'Media Start', u':/slides/media_playback_start.png',
- self.trUtf8(u'Start playing media'), self.onMediaPlay)
- self.Toolbar.addToolbarButton(
- u'Media Pause', u':/slides/media_playback_pause.png',
- self.trUtf8(u'Start playing media'), self.onMediaPause)
- self.Toolbar.addToolbarButton(
- u'Media Stop', u':/slides/media_playback_stop.png',
- self.trUtf8(u'Start playing media'), self.onMediaStop)
self.ControllerLayout.addWidget(self.Toolbar)
+ #Build a Media ToolBar
+ self.Mediabar = OpenLPToolbar(self)
+ self.Mediabar.addToolbarButton(
+ u'Media Start', u':/slides/media_playback_start.png',
+ self.trUtf8(u'Start playing media'), self.onMediaPlay)
+ self.Mediabar.addToolbarButton(
+ u'Media Pause', u':/slides/media_playback_pause.png',
+ self.trUtf8(u'Start playing media'), self.onMediaPause)
+ self.Mediabar.addToolbarButton(
+ u'Media Stop', u':/slides/media_playback_stop.png',
+ 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.Mediabar.addToolbarWidget(
+ u'Audio Volume', self.volumeSlider)
+ self.ControllerLayout.addWidget(self.Mediabar)
# Build the Song Toolbar
if isLive:
self.Songbar = OpenLPToolbar(self)
@@ -259,13 +260,9 @@
Receiver().send_message(u'request_spin_delay')
if isLive:
self.Toolbar.makeWidgetsInvisible(self.image_list)
- self.Toolbar.makeWidgetsInvisible(self.media_list)
else:
self.Toolbar.makeWidgetsInvisible(self.song_edit_list)
- if isLive:
- prefix = u'live_slidecontroller'
- else:
- prefix = u'preview_slidecontroller'
+ self.Mediabar.setVisible(False)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'%s_first' % prefix), self.onSlideSelectedFirst)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -291,10 +288,9 @@
self.PreviewListWidget.setColumnWidth(0, width)
for framenumber, frame in enumerate(self.commandItem.frames):
if frame[u'text']:
- break
+ return
self.PreviewListWidget.setRowHeight(framenumber, height)
-
def trackSplitter(self, tab, pos):
"""
Splitter between the slide list and the preview panel
@@ -333,10 +329,10 @@
"""
Allows the live toolbar to be customised
"""
+ self.Toolbar.setVisible(True)
self.Songbar.setVisible(False)
+ self.Mediabar.setVisible(False)
self.Toolbar.makeWidgetsInvisible(self.image_list)
- self.Toolbar.makeWidgetsInvisible(self.media_list)
- self.Toolbar.makeWidgetsVisible(self.song_list)
if item.service_item_type == ServiceItemType.Text:
self.Toolbar.makeWidgetsInvisible(self.image_list)
if item.name == u'Songs' and \
@@ -360,17 +356,24 @@
self.Toolbar.makeWidgetsVisible(self.image_list)
elif item.service_item_type == ServiceItemType.Command and \
item.name == u'Media':
- self.Toolbar.makeWidgetsInvisible(self.song_list)
- self.Toolbar.makeWidgetsVisible(self.media_list)
+ self.Toolbar.setVisible(False)
+ self.Mediabar.setVisible(True)
+ self.volumeSlider.setAudioOutput(self.parent.mainDisplay.audio)
def enablePreviewToolBar(self, item):
"""
Allows the Preview toolbar to be customised
"""
+ self.Toolbar.setVisible(True)
+ self.Mediabar.setVisible(False)
+ self.Toolbar.makeWidgetsInvisible(self.song_edit_list)
if (item.name == u'Songs' or item.name == u'Custom') and item.fromPlugin:
self.Toolbar.makeWidgetsVisible(self.song_edit_list)
- else:
- self.Toolbar.makeWidgetsInvisible(self.song_edit_list)
+ elif item.service_item_type == ServiceItemType.Command and \
+ item.name == u'Media':
+ self.Toolbar.setVisible(False)
+ self.Mediabar.setVisible(True)
+ self.volumeSlider.setAudioOutput(self.parent.mainDisplay.audio)
def addServiceItem(self, item):
"""
@@ -627,7 +630,7 @@
Receiver().send_message(u'%s_pause'% self.commandItem.name.lower())
def onMediaPlay(self):
- Receiver().send_message(u'%s_play'% self.commandItem.name.lower())
+ Receiver().send_message(u'%s_play'% self.commandItem.name.lower(), self.isLive)
def onMediaStop(self):
Receiver().send_message(u'%s_stop'% self.commandItem.name.lower())
Follow ups