This commit is contained in:
Tim Bentley 2013-02-02 20:58:27 +00:00
commit 7303395cb7
2 changed files with 12 additions and 2 deletions

View File

@ -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):

View File

@ -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)