More presentation fixes/tidies

This commit is contained in:
Jonathan Corwin 2010-02-17 22:57:59 +00:00
parent 959c2469a5
commit cf62d6187f
2 changed files with 11 additions and 15 deletions

View File

@ -201,7 +201,7 @@ class ImpressController(PresentationController):
try: try:
ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext') ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext')
except: except:
log.exception(u'Unable to fine running instance ') log.exception(u'Unable to find running instance ')
self.start_process() self.start_process()
loop += 1 loop += 1
try: try:
@ -233,7 +233,7 @@ class ImpressController(PresentationController):
def close_presentation(self): def close_presentation(self):
""" """
Close presentation and clean up objects Close presentation and clean up objects
Triggerent by new object being added to SlideController orOpenLP Triggered by new object being added to SlideController or OpenLP
being shutdown being shutdown
""" """
log.debug(u'close Presentation OpenOffice') log.debug(u'close Presentation OpenOffice')

View File

@ -67,8 +67,8 @@ class Controller(object):
def slide(self, slide, live): def slide(self, slide, live):
log.debug(u'Live = %s, slide' % live) log.debug(u'Live = %s, slide' % live)
# if not isLive: if not live:
# return return
self.activate() self.activate()
self.controller.goto_slide(int(slide) + 1) self.controller.goto_slide(int(slide) + 1)
self.controller.poll_slidenumber(live) self.controller.poll_slidenumber(live)
@ -136,11 +136,13 @@ class Controller(object):
self.controller.blank_screen() self.controller.blank_screen()
def unblank(self): def unblank(self):
if not self.is_live: if not self.isLive:
return return
self.activate() self.activate()
self.controller.unblank_screen() self.controller.unblank_screen()
def poll(self):
self.controller.poll_slidenumber(self.isLive)
class MessageListener(object): class MessageListener(object):
""" """
@ -229,16 +231,10 @@ class MessageListener(object):
self.previewHandler.shutdown() self.previewHandler.shutdown()
def blank(self): def blank(self):
if self.isLive:
self.liveHandler.blank() self.liveHandler.blank()
else:
self.previewHandler.blank()
def unblank(self): def unblank(self):
if self.isLive:
self.liveHandler.unblank() self.liveHandler.unblank()
else:
self.previewHandler.unblank()
def splitMessage(self, message): def splitMessage(self, message):
""" """
@ -263,4 +259,4 @@ class MessageListener(object):
return message[0], file, message[4] return message[0], file, message[4]
def timeout(self): def timeout(self):
self.controller.poll_slidenumber(self.is_live) self.liveHandler.poll()