From a866b3049131867d4247b46a25c1ddb40ba7025a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 6 Apr 2010 18:52:09 +0100 Subject: [PATCH] Presentation bug fixes --- openlp/plugins/presentations/lib/impresscontroller.py | 2 +- openlp/plugins/presentations/lib/mediaitem.py | 7 +++---- openlp/plugins/presentations/lib/presentationcontroller.py | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/openlp/plugins/presentations/lib/impresscontroller.py b/openlp/plugins/presentations/lib/impresscontroller.py index 3e7a17990..7b4367a72 100644 --- a/openlp/plugins/presentations/lib/impresscontroller.py +++ b/openlp/plugins/presentations/lib/impresscontroller.py @@ -363,7 +363,7 @@ class ImpressDocument(PresentationDocument): def get_slide_preview_file(self, slide_no): """ - Returns an image path containing a preview for theimpresscontroller.py + Returns an image path containing a preview for the requested slide ``slide_no`` diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index b761ead12..79c8600f0 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -143,10 +143,9 @@ class PresentationMediaItem(MediaManagerItem): #not sure of this has errors #John please can you look at . for cidx in self.controllers: - if self.controllers[cidx].enabled: - self.controllers[cidx].remove_doc(filepath) - self.controllers[cidx].presentation_deleted() - self.controllers[cidx].close_presentation() + doc = self.controllers[cidx].add_doc(filepath) + doc.presentation_deleted() + doc.close_presentation() def generateSlideData(self, service_item, item=None): items = self.ListView.selectedIndexes() diff --git a/openlp/plugins/presentations/lib/presentationcontroller.py b/openlp/plugins/presentations/lib/presentationcontroller.py index 145cd4566..389744b0b 100644 --- a/openlp/plugins/presentations/lib/presentationcontroller.py +++ b/openlp/plugins/presentations/lib/presentationcontroller.py @@ -115,7 +115,6 @@ class PresentationController(object): """ return False - def start_process(self): """ Loads a running version of the presentation application in the background. @@ -148,6 +147,9 @@ class PresentationController(object): if doc in self.docs: self.docs.remove(doc) + def close_presentation(self): + pass + class PresentationDocument(object): """ Base class for presentation documents to inherit from. @@ -258,7 +260,7 @@ class PresentationDocument(object): Close presentation and clean up objects Triggered by new object being added to SlideController """ - self.controller.delete_doc(self) + self.controller.close_presentation() def is_active(self): """