forked from openlp/openlp
Validate Service item viewer loading
This commit is contained in:
parent
a8bbd540d4
commit
27a963a9c2
@ -550,6 +550,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
log.info(u'Load data from Settings')
|
log.info(u'Load data from Settings')
|
||||||
self.settingsForm.postSetUp()
|
self.settingsForm.postSetUp()
|
||||||
|
|
||||||
|
|
||||||
def versionCheck(self, version):
|
def versionCheck(self, version):
|
||||||
"""
|
"""
|
||||||
Checks the version of the Application called from openlp.pyw
|
Checks the version of the Application called from openlp.pyw
|
||||||
|
@ -102,6 +102,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.serviceItems = []
|
self.serviceItems = []
|
||||||
self.serviceName = u''
|
self.serviceName = u''
|
||||||
self.suffixes = u''
|
self.suffixes = u''
|
||||||
|
self.viewers = u''
|
||||||
self.droppos = 0
|
self.droppos = 0
|
||||||
#is a new service and has not been saved
|
#is a new service and has not been saved
|
||||||
self.isNew = True
|
self.isNew = True
|
||||||
@ -232,6 +233,9 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
def supportedSuffixes(self, suffix):
|
def supportedSuffixes(self, suffix):
|
||||||
self.suffixes = u'%s %s' % (self.suffixes, suffix)
|
self.suffixes = u'%s %s' % (self.suffixes, suffix)
|
||||||
|
|
||||||
|
def supportedViewers(self, viewer):
|
||||||
|
self.viewers = u'%s %s' % (self.viewers, viewer)
|
||||||
|
|
||||||
def contextMenu(self, point):
|
def contextMenu(self, point):
|
||||||
item = self.ServiceManagerList.itemAt(point)
|
item = self.ServiceManagerList.itemAt(point)
|
||||||
if item is None:
|
if item is None:
|
||||||
@ -686,6 +690,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
type = serviceItem._raw_frames[0][u'title'].split(u'.')[1]
|
type = serviceItem._raw_frames[0][u'title'].split(u'.')[1]
|
||||||
if type not in self.suffixes:
|
if type not in self.suffixes:
|
||||||
serviceItem.isValid = False
|
serviceItem.isValid = False
|
||||||
|
if serviceItem.title not in self.viewers:
|
||||||
|
serviceItem.isValid = False
|
||||||
|
|
||||||
def cleanUp(self):
|
def cleanUp(self):
|
||||||
"""
|
"""
|
||||||
|
@ -486,6 +486,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
Display the slide number passed
|
Display the slide number passed
|
||||||
"""
|
"""
|
||||||
log.debug(u'processManagerItem')
|
log.debug(u'processManagerItem')
|
||||||
|
self.onStopLoop()
|
||||||
#If old item was a command tell it to stop
|
#If old item was a command tell it to stop
|
||||||
if self.serviceItem and self.serviceItem.is_command():
|
if self.serviceItem and self.serviceItem.is_command():
|
||||||
self.onMediaStop()
|
self.onMediaStop()
|
||||||
@ -827,7 +828,10 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
Stop the timer loop running
|
Stop the timer loop running
|
||||||
"""
|
"""
|
||||||
|
if self.timer_id != 0:
|
||||||
self.killTimer(self.timer_id)
|
self.killTimer(self.timer_id)
|
||||||
|
self.timer_id = 0
|
||||||
|
|
||||||
|
|
||||||
def timerEvent(self, event):
|
def timerEvent(self, event):
|
||||||
"""
|
"""
|
||||||
|
@ -55,6 +55,7 @@ class MediaPlugin(Plugin):
|
|||||||
self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
|
self.video_list, mimetype = self._add_to_list(self.video_list, type, mimetype)
|
||||||
self.service_manager.supportedSuffixes(self.audio_list)
|
self.service_manager.supportedSuffixes(self.audio_list)
|
||||||
self.service_manager.supportedSuffixes(self.video_list)
|
self.service_manager.supportedSuffixes(self.video_list)
|
||||||
|
self.service_manager.supportedViewers(self.name)
|
||||||
|
|
||||||
def _add_to_list(self, list, value, type):
|
def _add_to_list(self, list, value, type):
|
||||||
if len(value) == 2:
|
if len(value) == 2:
|
||||||
|
@ -71,6 +71,7 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
if self.controllers[controller].enabled:
|
if self.controllers[controller].enabled:
|
||||||
types = self.controllers[controller].supports + \
|
types = self.controllers[controller].supports + \
|
||||||
self.controllers[controller].alsosupports
|
self.controllers[controller].alsosupports
|
||||||
|
self.parent.service_manager.supportedViewers(controller)
|
||||||
for type in types:
|
for type in types:
|
||||||
if fileType.find(type) == -1:
|
if fileType.find(type) == -1:
|
||||||
fileType += u'*%s ' % type
|
fileType += u'*%s ' % type
|
||||||
|
Loading…
Reference in New Issue
Block a user