diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index 603d7cadb..e62b24d8e 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -72,6 +72,7 @@ class ServiceItem(object): self._raw_frames = [] self._display_frames = [] self._uuid = unicode(uuid.uuid1()) + self.autoPreviewAllowed = False def addIcon(self, icon): """ @@ -200,7 +201,8 @@ class ServiceItem(object): u'icon':self.icon, u'footer':self.raw_footer, u'type':self.service_item_type, - u'audit':self.audit + u'audit':self.audit, + u'preview':self.autoPreviewAllowed } service_data = [] if self.service_item_type == ServiceItemType.Text: @@ -234,6 +236,7 @@ class ServiceItem(object): self.addIcon(header[u'icon']) self.raw_footer = header[u'footer'] self.audit = header[u'audit'] + self.autoPreviewAllowed = header[u'preview'] if self.service_item_type == ServiceItemType.Text: for slide in serviceitem[u'serviceitem'][u'data']: self._raw_frames.append(slide) diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py index d821c0f45..c65ea3dd0 100644 --- a/openlp/core/ui/generaltab.py +++ b/openlp/core/ui/generaltab.py @@ -87,6 +87,10 @@ class GeneralTab(SettingsTab): self.SaveCheckServiceCheckBox.setObjectName(u'SaveCheckServiceCheckBox') self.SettingsLayout.addWidget(self.SaveCheckServiceCheckBox) self.GeneralLeftLayout.addWidget(self.SettingsGroupBox) + self.AutoPreviewCheckBox = QtGui.QCheckBox(self.SettingsGroupBox) + self.AutoPreviewCheckBox.setObjectName(u'AutoPreviewCheckBox') + self.SettingsLayout.addWidget(self.AutoPreviewCheckBox) + self.GeneralLeftLayout.addWidget(self.SettingsGroupBox) self.GeneralLeftSpacer = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.GeneralLeftLayout.addItem(self.GeneralLeftSpacer) @@ -137,6 +141,8 @@ class GeneralTab(SettingsTab): QtCore.SIGNAL(u'stateChanged(int)'), self.onShowSplashCheckBoxChanged) QtCore.QObject.connect(self.SaveCheckServiceCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), self.onSaveCheckServiceCheckBox) + QtCore.QObject.connect(self.AutoPreviewCheckBox, + QtCore.SIGNAL(u'stateChanged(int)'), self.onAutoPreviewCheckBox) QtCore.QObject.connect(self.NumberEdit, QtCore.SIGNAL(u'editingFinished()'), self.onNumberEditLostFocus) QtCore.QObject.connect(self.UsernameEdit, @@ -153,6 +159,7 @@ class GeneralTab(SettingsTab): self.ShowSplashCheckBox.setText(self.trUtf8('Show the splash screen')) self.SettingsGroupBox.setTitle(self.trUtf8('Application Settings')) self.SaveCheckServiceCheckBox.setText(self.trUtf8('Prompt to save Service before starting New')) + self.AutoPreviewCheckBox.setText(self.trUtf8('Preview Next Song from Service Manager')) self.CCLIGroupBox.setTitle(self.trUtf8('CCLI Details')) self.NumberLabel.setText(self.trUtf8('CCLI Number:')) self.UsernameLabel.setText(self.trUtf8('SongSelect Username:')) @@ -173,6 +180,9 @@ class GeneralTab(SettingsTab): def onSaveCheckServiceCheckBox(self, value): self.PromptSaveService = (value == QtCore.Qt.Checked) + def onAutoPreviewCheckBox(self, value): + self.AutoPreview = (value == QtCore.Qt.Checked) + def onNumberEditLostFocus(self): self.CCLINumber = self.NumberEdit.displayText() @@ -194,6 +204,7 @@ class GeneralTab(SettingsTab): self.AutoOpen = str_to_bool(self.config.get_config(u'auto open', u'False')) self.ShowSplash = str_to_bool(self.config.get_config(u'show splash', u'True')) self.PromptSaveService = str_to_bool(self.config.get_config(u'save prompt', u'False')) + self.AutoPreview = str_to_bool(self.config.get_config(u'auto preview', u'False')) self.CCLINumber = unicode(self.config.get_config(u'ccli number', u'')) self.Username = unicode(self.config.get_config(u'songselect username', u'')) self.Password = unicode(self.config.get_config(u'songselect password', u'')) @@ -203,6 +214,7 @@ class GeneralTab(SettingsTab): self.WarningCheckBox.setChecked(self.Warning) self.AutoOpenCheckBox.setChecked(self.AutoOpen) self.ShowSplashCheckBox.setChecked(self.ShowSplash) + self.AutoPreviewCheckBox.setChecked(self.AutoPreview) self.NumberEdit.setText(self.CCLINumber) self.UsernameEdit.setText(self.Username) self.PasswordEdit.setText(self.Password) @@ -213,6 +225,7 @@ class GeneralTab(SettingsTab): self.config.set_config(u'auto open', self.AutoOpen) self.config.set_config(u'show splash', self.ShowSplash) self.config.set_config(u'save prompt', self.PromptSaveService) + self.config.set_config(u'auto preview', self.AutoPreview) self.config.set_config(u'ccli number', self.CCLINumber) self.config.set_config(u'songselect username', self.Username) self.config.set_config(u'songselect password', self.Password) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 5ee248a3b..22fbb7ecc 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -621,6 +621,7 @@ class ServiceManager(QtGui.QWidget): self.parent.PreviewController.addServiceManagerItem( self.serviceItems[item][u'service_item'], count) + def makeLive(self): """ Send the current item to the Live slide controller @@ -628,6 +629,13 @@ class ServiceManager(QtGui.QWidget): item, count = self.findServiceItem() self.parent.LiveController.addServiceManagerItem( self.serviceItems[item][u'service_item'], count) + if str_to_bool(PluginConfig(u'General'). + get_config(u'auto preview', u'False')): + item += 1 + if len(self.serviceItems) > 0 and item < len(self.serviceItems) and \ + self.serviceItems[item][u'service_item'].autoPreviewAllowed: + self.parent.PreviewController.addServiceManagerItem( + self.serviceItems[item][u'service_item'], 0) def remoteEdit(self): """ diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 4fce998ae..44d37c4c4 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -435,6 +435,7 @@ class BibleMediaItem(MediaManagerItem): raw_slides = [] raw_footer = [] bible_text = u'' + self.service_item.autoPreviewAllowed = True #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 c9ca91112..0750a467e 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -144,6 +144,7 @@ class CustomMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] else: item_id = self.remoteCustom + self.service_item.autoPreviewAllowed = True customSlide = self.parent.custommanager.get_custom(item_id) title = customSlide.title credit = customSlide.credits @@ -165,4 +166,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 145e07f04..d538c70af 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -144,6 +144,7 @@ class ImageMediaItem(MediaManagerItem): items = self.ListView.selectedIndexes() if items: service_item.title = self.trUtf8('Image(s)') + self.service_item.autoPreviewAllowed = True for item in items: bitem = self.ListView.item(item.row()) filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString()) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 7398fe18d..63fd69d48 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -290,6 +290,7 @@ class SongMediaItem(MediaManagerItem): item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0] else: item_id = self.remoteSong + service_item.autoPreviewAllowed = True song = self.parent.songmanager.get_song(item_id) service_item.theme = song.theme_name service_item.edit_enabled = True diff --git a/version.txt b/version.txt index 220f10e50..34d78cfd2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.9.0-712 +1.9.0-715