fixed bug 1112587

Fixes: https://launchpad.net/bugs/1112587
This commit is contained in:
Andreas Preikschat 2013-02-10 13:21:59 +01:00
parent 8840df2fb2
commit 5c6a63e518

View File

@ -101,7 +101,6 @@ class SlideController(Controller):
u'delaySpinBox' u'delaySpinBox'
] ]
self.audioList = [ self.audioList = [
u'songMenu',
u'audioPauseItem', u'audioPauseItem',
u'audioTimeLabel' u'audioTimeLabel'
] ]
@ -287,7 +286,7 @@ class SlideController(Controller):
text=translate('OpenLP.SlideController', 'Pause Audio'), text=translate('OpenLP.SlideController', 'Pause Audio'),
tooltip=translate('OpenLP.SlideController', 'Pause audio.'), tooltip=translate('OpenLP.SlideController', 'Pause audio.'),
checked=False, visible=False, category=self.category, checked=False, visible=False, category=self.category,
context=QtCore.Qt.WindowShortcut, context=QtCore.Qt.WindowShortcut,
shortcuts=[], triggers=self.onAudioPauseClicked) shortcuts=[], triggers=self.onAudioPauseClicked)
self.audioMenu = QtGui.QMenu( self.audioMenu = QtGui.QMenu(
translate('OpenLP.SlideController', 'Background Audio'), self.toolbar) translate('OpenLP.SlideController', 'Background Audio'), self.toolbar)
@ -319,6 +318,7 @@ class SlideController(Controller):
self.audioTimeLabel.setObjectName(u'audioTimeLabel') self.audioTimeLabel.setObjectName(u'audioTimeLabel')
self.toolbar.addToolbarWidget(self.audioTimeLabel) self.toolbar.addToolbarWidget(self.audioTimeLabel)
self.toolbar.setWidgetVisible(self.audioList, False) self.toolbar.setWidgetVisible(self.audioList, False)
self.toolbar.setWidgetVisible([u'songMenu'], False)
# Screen preview area # Screen preview area
self.previewFrame = QtGui.QFrame(self.splitter) self.previewFrame = QtGui.QFrame(self.splitter)
self.previewFrame.setGeometry(QtCore.QRect(0, 0, 300, 300 * self.ratio)) self.previewFrame.setGeometry(QtCore.QRect(0, 0, 300, 300 * self.ratio))
@ -689,6 +689,7 @@ class SlideController(Controller):
self.toolbar.hide() self.toolbar.hide()
self.mediabar.hide() self.mediabar.hide()
self.songMenu.hide() self.songMenu.hide()
self.toolbar.setWidgetVisible([u'songMenu'], False)
self.toolbar.setWidgetVisible(self.loopList, False) self.toolbar.setWidgetVisible(self.loopList, False)
# Reset the button # Reset the button
self.playSlidesOnce.setChecked(False) self.playSlidesOnce.setChecked(False)
@ -699,7 +700,7 @@ class SlideController(Controller):
if Settings().value( if Settings().value(
self.parent().songsSettingsSection + u'/display songbar', self.parent().songsSettingsSection + u'/display songbar',
QtCore.QVariant(True)).toBool() and self.slideList: QtCore.QVariant(True)).toBool() and self.slideList:
self.songMenu.show() self.toolbar.setWidgetVisible([u'songMenu'], True)
if item.is_capable(ItemCapabilities.CanLoop) and \ if item.is_capable(ItemCapabilities.CanLoop) and \
len(item.get_frames()) > 1: len(item.get_frames()) > 1:
self.toolbar.setWidgetVisible(self.loopList) self.toolbar.setWidgetVisible(self.loopList)