diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index b52d50502..1a8aa2563 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -110,7 +110,6 @@ class MainDisplay(DisplayWidget): self.blankFrame = None self.frame = None self.firstTime = True - self.mediaLoaded = False self.hasTransition = False self.mediaBackground = False QtCore.QObject.connect(Receiver.get_receiver(), @@ -185,12 +184,12 @@ class MainDisplay(DisplayWidget): def hideDisplay(self): log.debug(u'hideDisplay') - self.mediaLoaded = True - self.setVisible(False) + self.display_image.setPixmap(self.transparent) + self.display_alert.setPixmap(self.transparent) + self.display_text.setPixmap(self.transparent) def showDisplay(self): log.debug(u'showDisplay') - self.mediaLoaded = False if not self.primary: self.setVisible(True) self.showFullScreen() @@ -272,9 +271,8 @@ class MainDisplay(DisplayWidget): def onMediaQueue(self, message): log.debug(u'Queue new media message %s' % message) - self.display_image.setPixmap(self.transparent) - self.display_alert.setPixmap(self.transparent) - self.display_text.setPixmap(self.transparent) + self.hideDisplay() + self.activateWindow() class VideoWidget(QtGui.QWidget): """ @@ -338,6 +336,8 @@ class VideoDisplay(VideoWidget): self.setWindowTitle(u'OpenLP Video Display') self.parent = parent self.screens = screens + self.setAttribute(QtCore.Qt.WA_TranslucentBackground) + self.setWindowFlags(QtCore.Qt.FramelessWindowHint) self.mediaObject = Phonon.MediaObject(self) self.video = Phonon.VideoWidget() self.video.setVisible(False) @@ -400,6 +400,5 @@ class VideoDisplay(VideoWidget): log.debug(u'VideoDisplay Reached end of media playlist') self.mediaObject.stop() self.mediaObject.clearQueue() - self.mediaLoaded = False self.video.setVisible(False) self.setVisible(False) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index db4c1a8ec..1f72ddfe1 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -386,11 +386,10 @@ class SlideController(QtGui.QWidget): if str_to_bool(self.songsconfig.get_config(u'show songbar', True)) \ and len(self.slideList) > 0: self.Toolbar.makeWidgetsVisible([u'Song Menu']) - elif item.is_image(): - #Not sensible to allow loops with 1 frame - if len(item.get_frames()) > 1: + if item.is_capable(ItemCapabilities.AllowsLoop) and \ + len(item.get_frames()) > 1: self.Toolbar.makeWidgetsVisible(self.loop_list) - elif item.is_media(): + if item.is_media(): self.Toolbar.setVisible(False) self.Mediabar.setVisible(True) self.volumeSlider.setAudioOutput(self.parent.mainDisplay.videoDisplay.audio) diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py index dde8d0d4c..6c674f986 100644 --- a/openlp/plugins/alerts/lib/alertsmanager.py +++ b/openlp/plugins/alerts/lib/alertsmanager.py @@ -81,8 +81,7 @@ class AlertsManager(QtCore.QObject): self.screenChanged() self.parent.maindisplay.parent.StatusBar.showMessage(u'') self.alertList.append(text) - if self.timer_id != 0: # or self.parent.maindisplay.mediaLoaded: - print self.timer_id, self.alertList, len(self.alertList) + if self.timer_id != 0: self.parent.maindisplay.parent.StatusBar.showMessage(\ self.trUtf8(u'Alert message created and delayed')) return @@ -92,9 +91,7 @@ class AlertsManager(QtCore.QObject): log.debug(u'Generate Alert called') if len(self.alertList) == 0: return - print len(self.alertList) text = self.alertList.pop(0) - print text alertTab = self.parent.alertsTab alertframe = \ QtGui.QPixmap(self.screen[u'size'].width(), self.alertHeight) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 80c81f3e7..764399fab 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -449,6 +449,7 @@ class BibleMediaItem(MediaManagerItem): raw_footer = [] bible_text = u'' service_item.add_capability(ItemCapabilities.AllowsPreview) + service_item.add_capability(ItemCapabilities.AllowsLoop) #If we want to use a 2nd translation / version bible2 = u'' if self.SearchTabWidget.currentIndex() == 0: diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 3c68b6d3d..3d55db719 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -149,6 +149,7 @@ class CustomMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] service_item.add_capability(ItemCapabilities.AllowsEdit) service_item.add_capability(ItemCapabilities.AllowsPreview) + service_item.add_capability(ItemCapabilities.AllowsLoop) customSlide = self.parent.custommanager.get_custom(item_id) title = customSlide.title credit = customSlide.credits @@ -169,4 +170,4 @@ class CustomMediaItem(MediaManagerItem): else: raw_footer.append(u'') service_item.raw_footer = raw_footer - return True \ No newline at end of file + return True diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 4d56a7d32..6fbf66022 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -139,6 +139,7 @@ class ImageMediaItem(MediaManagerItem): service_item.title = self.trUtf8('Image(s)') service_item.add_capability(ItemCapabilities.AllowsMaintain) service_item.add_capability(ItemCapabilities.AllowsPreview) + service_item.add_capability(ItemCapabilities.AllowsLoop) for item in items: bitem = self.ListView.item(item.row()) filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString()) @@ -162,4 +163,4 @@ class ImageMediaItem(MediaManagerItem): self.parent.maindisplay.addImageWithText(frame) def onPreviewClick(self): - MediaManagerItem.onPreviewClick(self) \ No newline at end of file + MediaManagerItem.onPreviewClick(self) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index ad63cd783..9b81540e6 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -306,6 +306,7 @@ class SongMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] service_item.add_capability(ItemCapabilities.AllowsEdit) service_item.add_capability(ItemCapabilities.AllowsPreview) + service_item.add_capability(ItemCapabilities.AllowsLoop) song = self.parent.songmanager.get_song(item_id) service_item.theme = song.theme_name service_item.editId = item_id @@ -361,4 +362,4 @@ class SongMediaItem(MediaManagerItem): service_item.audit = [ song.title, author_audit, song.copyright, song.ccli_number ] - return True \ No newline at end of file + return True