diff --git a/openlp/plugins/presentations/lib/pptviewcontroller.py b/openlp/plugins/presentations/lib/pptviewcontroller.py index 7b0be4c59..ec3adebe4 100644 --- a/openlp/plugins/presentations/lib/pptviewcontroller.py +++ b/openlp/plugins/presentations/lib/pptviewcontroller.py @@ -83,7 +83,7 @@ class PptviewController(PresentationController): if self.process: return log.debug(u'start PPTView') - dllpath = os.path.join(self.plugin.pluginManager.basepath, u'presentations', u'lib', u'pptviewlib', + dllpath = os.path.join(self.plugin_manager.basepath, u'presentations', u'lib', u'pptviewlib', u'pptviewlib.dll') self.process = cdll.LoadLibrary(dllpath) if log.isEnabledFor(logging.DEBUG): diff --git a/openlp/plugins/presentations/lib/presentationcontroller.py b/openlp/plugins/presentations/lib/presentationcontroller.py index 0051b1d0a..8f468de63 100644 --- a/openlp/plugins/presentations/lib/presentationcontroller.py +++ b/openlp/plugins/presentations/lib/presentationcontroller.py @@ -33,7 +33,7 @@ import shutil from PyQt4 import QtCore -from openlp.core.lib import Receiver, check_directory_exists, create_thumb, validate_thumb, Settings +from openlp.core.lib import Receiver, Registry, check_directory_exists, create_thumb, validate_thumb, Settings from openlp.core.utils import AppLocation log = logging.getLogger(__name__) @@ -438,3 +438,13 @@ class PresentationController(object): def close_presentation(self): pass + + def _get_plugin_manager(self): + """ + Adds the plugin manager to the class dynamically + """ + if not hasattr(self, u'_plugin_manager'): + self._plugin_manager = Registry().get(u'plugin_manager') + return self._plugin_manager + + plugin_manager = property(_get_plugin_manager)