forked from openlp/openlp
Head
This commit is contained in:
commit
4820d5d15f
@ -513,9 +513,13 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
log.debug(u'processManagerItem')
|
||||
self.onStopLoop()
|
||||
#If old item was a command tell it to stop
|
||||
if self.serviceItem and self.serviceItem.is_command():
|
||||
self.onMediaStop()
|
||||
#If old item was a command tell it to stop
|
||||
if self.serviceItem:
|
||||
if self.serviceItem.is_command():
|
||||
Receiver.send_message(u'%s_stop' %
|
||||
self.serviceItem.name.lower(), [serviceItem, self.isLive])
|
||||
if self.serviceItem.is_media():
|
||||
self.onMediaStop()
|
||||
if serviceItem.is_media():
|
||||
self.onMediaStart(serviceItem)
|
||||
if self.isLive:
|
||||
@ -830,7 +834,7 @@ class SlideController(QtGui.QWidget):
|
||||
return
|
||||
Receiver.send_message(u'%s_next' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
if self.serviceItem.is_command() and self.isLive:
|
||||
self.updatePreview()
|
||||
else:
|
||||
row = self.PreviewListWidget.currentRow() + 1
|
||||
@ -854,7 +858,7 @@ class SlideController(QtGui.QWidget):
|
||||
return
|
||||
Receiver.send_message(u'%s_previous' % self.serviceItem.name.lower(),
|
||||
[self.serviceItem, self.isLive])
|
||||
if self.serviceItem.is_command():
|
||||
if self.serviceItem.is_command() and self.isLive:
|
||||
self.updatePreview()
|
||||
else:
|
||||
row = self.PreviewListWidget.currentRow() - 1
|
||||
|
@ -132,18 +132,13 @@ class ImpressController(PresentationController):
|
||||
|
||||
def get_com_desktop(self):
|
||||
log.debug(u'get COM Desktop OpenOffice')
|
||||
try:
|
||||
desktop = self.manager.createInstance(u'com.sun.star.frame.Desktop')
|
||||
return desktop
|
||||
except:
|
||||
log.exception(u'Failed to get COM desktop')
|
||||
return None
|
||||
return self.manager.createInstance(u'com.sun.star.frame.Desktop')
|
||||
|
||||
def get_com_servicemanager(self):
|
||||
log.debug(u'get_com_servicemanager openoffice')
|
||||
try:
|
||||
return Dispatch(u'com.sun.star.ServiceManager')
|
||||
except:
|
||||
except pywintypes.com_error:
|
||||
log.exception(u'Failed to get COM service manager')
|
||||
return None
|
||||
|
||||
|
@ -70,16 +70,16 @@ class Controller(object):
|
||||
if self.doc.slidenumber > 1:
|
||||
self.doc.goto_slide(self.doc.slidenumber)
|
||||
|
||||
def slide(self, slide, live):
|
||||
log.debug(u'Live = %s, slide' % live)
|
||||
if not live:
|
||||
def slide(self, slide):
|
||||
log.debug(u'Live = %s, slide' % self.is_live)
|
||||
if not self.is_live:
|
||||
return
|
||||
if self.doc.is_blank():
|
||||
self.doc.slidenumber = int(slide) + 1
|
||||
return
|
||||
self.activate()
|
||||
self.doc.goto_slide(int(slide) + 1)
|
||||
self.doc.poll_slidenumber(live)
|
||||
self.doc.poll_slidenumber(self.is_live)
|
||||
|
||||
def first(self):
|
||||
"""
|
||||
@ -248,11 +248,10 @@ class MessageListener(object):
|
||||
def slide(self, message):
|
||||
is_live = message[1]
|
||||
slide = message[2]
|
||||
item = message[0]
|
||||
if is_live:
|
||||
self.live_handler.slide(slide, item)
|
||||
self.live_handler.slide(slide)
|
||||
else:
|
||||
self.preview_handler.slide(slide, item)
|
||||
self.preview_handler.slide(slide)
|
||||
|
||||
def first(self, message):
|
||||
is_live = message[1]
|
||||
|
Loading…
Reference in New Issue
Block a user