forked from openlp/openlp
modified:
openlp/core/lib/mediamanageritem.py openlp/core/ui/servicemanager.py openlp/core/ui/slidecontroller.py openlp/plugins/custom/lib/mediaitem.py openlp/plugins/songs/lib/mediaitem.py pending merges: Tim Bentley 2011-05-20 [merge] Stop preview media and presentations when... Tim Bentley 2011-05-20 Fix extra indent Tim Bentley 2011-05-20 [merge] Head Tim Bentley 2011-05-20 Stop the media / presentation if going from P...
This commit is contained in:
commit
48148bc297
@ -114,7 +114,10 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'%s_service_load' % self.parent.name.lower()),
|
||||
self.serviceLoad)
|
||||
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'%s_set_autoselect_item' % self.parent.name.lower()),
|
||||
self.setAutoSelectItem)
|
||||
|
||||
def requiredIcons(self):
|
||||
"""
|
||||
Tis method is called to define the icons for the plugin.
|
||||
@ -467,6 +470,9 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
if keepFocus:
|
||||
self.listView.setFocus()
|
||||
|
||||
def setAutoSelectItem(self, itemToSelect=None):
|
||||
self.autoSelectItem = itemToSelect
|
||||
|
||||
def onLiveClick(self):
|
||||
"""
|
||||
Send an item live by building a service item then adding that service
|
||||
|
@ -286,6 +286,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
QtCore.SIGNAL(u'theme_update_global'), self.themeChange)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'service_item_update'), self.serviceItemUpdate)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'preview_add_service_item'), self.addServiceItem)
|
||||
# Last little bits of setting up
|
||||
self.service_theme = unicode(QtCore.QSettings().value(
|
||||
self.mainwindow.serviceSettingsSection + u'/service theme',
|
||||
|
@ -1054,7 +1054,7 @@ class SlideController(QtGui.QWidget):
|
||||
From the preview display request the Item to be added to service
|
||||
"""
|
||||
self.serviceItem.from_plugin = False
|
||||
self.parent.serviceManager.addServiceItem(self.serviceItem)
|
||||
Receiver.send_message('preview_add_service_item',self.serviceItem)
|
||||
|
||||
def onGoLiveClick(self):
|
||||
"""
|
||||
@ -1062,6 +1062,14 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
if QtCore.QSettings().value(u'advanced/double click live',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
# Live and Preview have issues if we have video or presentations
|
||||
# playing in both at the same time.
|
||||
if self.serviceItem.is_command():
|
||||
Receiver.send_message(u'%s_stop' %
|
||||
self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_media():
|
||||
self.onMediaClose()
|
||||
self.onGoLive()
|
||||
|
||||
def onGoLive(self):
|
||||
|
@ -62,7 +62,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
# which Custom is required.
|
||||
self.remoteCustom = -1
|
||||
self.manager = parent.manager
|
||||
self.setAutoSelectItem()
|
||||
self.autoSelectItem = None
|
||||
|
||||
def addEndHeaderBar(self):
|
||||
self.addToolbarSeparator()
|
||||
@ -106,9 +106,6 @@ class CustomMediaItem(MediaManagerItem):
|
||||
QtCore.SIGNAL(u'custom_edit_clear'), self.onRemoteEditClear)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'custom_load_list'), self.initialise)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'custom_set_autoselect_item'),
|
||||
self.setAutoSelectItem)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
|
||||
|
||||
@ -148,9 +145,6 @@ class CustomMediaItem(MediaManagerItem):
|
||||
if customSlide.title == self.autoSelectItem :
|
||||
self.listView.setCurrentItem(custom_name)
|
||||
|
||||
def setAutoSelectItem(self,itemToSelect="*"):
|
||||
self.autoSelectItem = itemToSelect
|
||||
|
||||
def onNewClick(self):
|
||||
self.parent.edit_custom_form.loadCustom(0)
|
||||
self.parent.edit_custom_form.exec_()
|
||||
|
@ -73,7 +73,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.editItem = None
|
||||
self.quickPreviewAllowed = True
|
||||
self.hasSearch = True
|
||||
self.setAutoSelectItem()
|
||||
self.autoSelectItem = None
|
||||
|
||||
def addEndHeaderBar(self):
|
||||
self.addToolbarSeparator()
|
||||
@ -124,9 +124,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
QtCore.QObject.connect(self.searchTextEdit,
|
||||
QtCore.SIGNAL(u'searchTypeChanged(int)'),
|
||||
self.onSearchTextButtonClick)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'songs_set_autoselect_item'),
|
||||
self.setAutoSelectItem)
|
||||
|
||||
def configUpdated(self):
|
||||
self.searchAsYouType = QtCore.QSettings().value(
|
||||
@ -163,9 +160,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
QtCore.QVariant(SongSearch.Entire)).toInt()[0])
|
||||
self.configUpdated()
|
||||
|
||||
def setAutoSelectItem(self,itemToSelect="*"):
|
||||
self.autoSelectItem = itemToSelect
|
||||
|
||||
def onSearchTextButtonClick(self):
|
||||
# Save the current search type to the configuration.
|
||||
QtCore.QSettings().setValue(u'%s/last search type' %
|
||||
|
Loading…
Reference in New Issue
Block a user