diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index 9a241473a..be02b3caa 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -170,6 +170,15 @@ class GeneralTab(SettingsTab): self.customHeightValueEdit.setMaximum(9999) self.displayLayout.addWidget(self.customHeightValueEdit, 4, 3) self.rightLayout.addWidget(self.displayGroupBox) + # Background audio + self.audioGroupBox = QtGui.QGroupBox(self.rightColumn) + self.audioGroupBox.setObjectName(u'audioGroupBox') + self.audioLayout = QtGui.QVBoxLayout(self.audioGroupBox) + self.audioLayout.setObjectName(u'audioLayout') + self.startPausedCheckBox = QtGui.QCheckBox(self.audioGroupBox) + self.startPausedCheckBox.setObjectName(u'startPausedCheckBox') + self.audioLayout.addWidget(self.startPausedCheckBox) + self.rightLayout.addWidget(self.audioGroupBox) self.rightLayout.addStretch() # Signals and slots QtCore.QObject.connect(self.overrideCheckBox, @@ -243,6 +252,10 @@ class GeneralTab(SettingsTab): self.customYLabel.setText(translate('OpenLP.GeneralTab', 'Y')) self.customHeightLabel.setText(translate('OpenLP.GeneralTab', 'Height')) self.customWidthLabel.setText(translate('OpenLP.GeneralTab', 'Width')) + self.audioGroupBox.setTitle( + translate('OpenLP.GeneralTab', 'Background Audio')) + self.startPausedCheckBox.setText( + translate('OpenLP.GeneralTab', 'Start background audio paused')) def load(self): """ @@ -290,6 +303,8 @@ class GeneralTab(SettingsTab): QtCore.QVariant(self.screens.current[u'size'].height())).toInt()[0]) self.customWidthValueEdit.setValue(settings.value(u'width', QtCore.QVariant(self.screens.current[u'size'].width())).toInt()[0]) + self.startPausedCheckBox.setChecked(settings.value( + u'audio start paused', QtCore.QVariant(True)).toBool()) settings.endGroup() self.customXValueEdit.setEnabled(self.overrideCheckBox.isChecked()) self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked()) @@ -341,6 +356,8 @@ class GeneralTab(SettingsTab): QtCore.QVariant(self.customWidthValueEdit.value())) settings.setValue(u'override position', QtCore.QVariant(self.overrideCheckBox.isChecked())) + settings.setValue(u'audio start paused', + QtCore.QVariant(self.startPausedCheckBox.isChecked())) settings.endGroup() # On save update the screens as well self.postSetUp(True) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 3171d67d3..6615d0e35 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -633,7 +633,14 @@ class SlideController(QtGui.QWidget): log.debug(u'Starting to play...') self.display.audioPlayer.addToPlaylist( self.serviceItem.background_audio) - self.display.audioPlayer.play() + if QtCore.QSettings().value( + self.parent().generalSettingsSection + \ + u'/audio start paused', + QtCore.QVariant(True)).toBool(): + self.audioPauseItem.setChecked(True) + self.display.audioPlayer.pause() + else: + self.display.audioPlayer.play() self.setAudioItemsVisibility(True) row = 0 text = []