openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #02133
[Merge] lp:~j-corwin/openlp/present into lp:openlp
Jonathan Corwin has proposed merging lp:~j-corwin/openlp/present into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#598361 AttributeError: 'NoneType' object has no attribute 'isPaused'
https://bugs.launchpad.net/bugs/598361
Fix bug 598361 - Error when previewing presentation
Close presentations correctly when finished
Fix preview presentation previous/next buttons
--
https://code.launchpad.net/~j-corwin/openlp/present/+merge/28534
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/present into lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-06-23 17:37:01 +0000
+++ openlp/core/ui/slidecontroller.py 2010-06-25 20:27:27 +0000
@@ -519,9 +519,13 @@
"""
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:
@@ -827,7 +831,7 @@
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
@@ -851,7 +855,7 @@
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
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-06-23 22:26:54 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-06-25 20:27:27 +0000
@@ -132,18 +132,13 @@
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
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2010-06-23 22:26:54 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2010-06-25 20:27:27 +0000
@@ -70,16 +70,16 @@
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 @@
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]
Follow ups