Fix opening and displaying of presentations

bzr-revno: 848
This commit is contained in:
Jonathan Corwin 2010-06-17 08:28:17 +01:00
commit a752567feb
4 changed files with 7 additions and 5 deletions

View File

@ -181,7 +181,7 @@ class ImpressController(PresentationController):
class ImpressDocument(PresentationDocument): class ImpressDocument(PresentationDocument):
def __init__(self, controller, presentation): def __init__(self, controller, presentation):
log.debug(u'Init Presentation OpenOffice') log.debug(u'Init Presentation OpenOffice')
PresentationDocument.__init__(controller, presentation) PresentationDocument.__init__(self, controller, presentation)
self.document = None self.document = None
self.presentation = None self.presentation = None
self.control = None self.control = None

View File

@ -29,6 +29,7 @@ import os
from PyQt4 import QtCore from PyQt4 import QtCore
from openlp.core.lib import Receiver from openlp.core.lib import Receiver
from openlp.core.ui import HideMode
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -55,7 +56,7 @@ class Controller(object):
self.doc.start_presentation() self.doc.start_presentation()
if isBlank: if isBlank:
self.blank() self.blank()
Receiver.send_message(u'maindisplay_hide') Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
self.doc.slidenumber = 0 self.doc.slidenumber = 0
def activate(self): def activate(self):
@ -179,6 +180,7 @@ class Controller(object):
self.doc.slidenumber != self.doc.get_slide_number(): self.doc.slidenumber != self.doc.get_slide_number():
self.doc.goto_slide(self.doc.slidenumber) self.doc.goto_slide(self.doc.slidenumber)
self.doc.unblank_screen() self.doc.unblank_screen()
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
def poll(self): def poll(self):
self.doc.poll_slidenumber(self.isLive) self.doc.poll_slidenumber(self.isLive)

View File

@ -104,7 +104,7 @@ class PowerpointController(PresentationController):
class PowerpointDocument(PresentationDocument): class PowerpointDocument(PresentationDocument):
def __init__(self, controller, presentation): def __init__(self, controller, presentation):
log.debug(u'Init Presentation Powerpoint') log.debug(u'Init Presentation Powerpoint')
PresentationDocument.__init__(controller, presentation) PresentationDocument.__init__(self, controller, presentation)
self.presentation = None self.presentation = None
def load_presentation(self): def load_presentation(self):
@ -142,7 +142,7 @@ class PowerpointDocument(PresentationDocument):
if self.check_thumbnails(): if self.check_thumbnails():
return return
self.presentation.Export(os.path.join(self.thumbnailpath, ''), 'png', self.presentation.Export(os.path.join(self.thumbnailpath, ''), 'png',
640, 480) 320, 240)
def close_presentation(self): def close_presentation(self):
""" """

View File

@ -102,7 +102,7 @@ class PptviewController(PresentationController):
class PptviewDocument(PresentationDocument): class PptviewDocument(PresentationDocument):
def __init__(self, controller, presentation): def __init__(self, controller, presentation):
log.debug(u'Init Presentation PowerPoint') log.debug(u'Init Presentation PowerPoint')
PresentationDocument.__init__(controller, presentation) PresentationDocument.__init__(self, controller, presentation)
self.presentation = None self.presentation = None
self.pptid = None self.pptid = None
self.blanked = False self.blanked = False