← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/bug1113446 into lp:openlp

 

Phill has proposed merging lp:~phill-ridout/openlp/bug1113446 into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)
Related bugs:
  Bug #1113446 in OpenLP: "AttributeError: 'PresentationPlugin' object has no attribute 'pluginManager' in trunk"
  https://bugs.launchpad.net/openlp/+bug/1113446

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug1113446/+merge/146277

Fixes bug 1113446 with lots of help from Tim
New line at end of file added
-- 
https://code.launchpad.net/~phill-ridout/openlp/bug1113446/+merge/146277
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py	2013-01-05 22:17:30 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py	2013-02-02 17:47:22 +0000
@@ -83,7 +83,7 @@
             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):

=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py	2013-01-10 23:07:48 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py	2013-02-02 17:47:22 +0000
@@ -33,7 +33,7 @@
 
 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 @@
 
     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)


Follow ups