← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~mzibricky/openlp/bug-1002038 into lp:openlp

 

matysek has proposed merging lp:~mzibricky/openlp/bug-1002038 into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)
  Raoul Snyman (raoul-snyman)
Related bugs:
  Bug #1002038 in OpenLP: "disable presentations on Mac"
  https://bugs.launchpad.net/openlp/+bug/1002038

For more details, see:
https://code.launchpad.net/~mzibricky/openlp/bug-1002038/+merge/129617

This change disables presentation plugin on osx and hides it in menu and fristtimewizard to be not visible for users.

This also removes the line disabling presentation plugin.
-- 
https://code.launchpad.net/~mzibricky/openlp/bug-1002038/+merge/129617
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2012-06-22 14:14:53 +0000
+++ openlp/core/lib/pluginmanager.py	2012-10-15 08:27:24 +0000
@@ -85,6 +85,14 @@
         log.debug(u'finding plugins in %s at depth %d',
             unicode(plugin_dir), startdepth)
         for root, dirs, files in os.walk(plugin_dir):
+            # TODO Presentation plugin is not yet working on Mac OS X.
+            # For now just ignore it. The following code will hide it
+            # in settings dialog.
+            if sys.platform == 'darwin':
+                present_plugin_dir = os.path.join(plugin_dir, 'presentations')
+                # Ignore files from the presentation plugin directory.
+                if root.startswith(present_plugin_dir):
+                    continue
             for name in files:
                 if name.endswith(u'.py') and not name.startswith(u'__'):
                     path = os.path.abspath(os.path.join(root, name))

=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py	2012-06-22 14:14:53 +0000
+++ openlp/core/ui/firsttimewizard.py	2012-10-15 08:27:24 +0000
@@ -82,13 +82,13 @@
         self.imageCheckBox.setChecked(True)
         self.imageCheckBox.setObjectName(u'imageCheckBox')
         self.pluginLayout.addWidget(self.imageCheckBox)
-        self.presentationCheckBox = QtGui.QCheckBox(self.pluginPage)
-        if sys.platform == "darwin":
-            self.presentationCheckBox.setChecked(False)
-        else:
+        # TODO Presentation plugin is not yet working on Mac OS X.
+        # For now just ignore it.
+        if sys.platform != 'darwin':
+            self.presentationCheckBox = QtGui.QCheckBox(self.pluginPage)
             self.presentationCheckBox.setChecked(True)
-        self.presentationCheckBox.setObjectName(u'presentationCheckBox')
-        self.pluginLayout.addWidget(self.presentationCheckBox)
+            self.presentationCheckBox.setObjectName(u'presentationCheckBox')
+            self.pluginLayout.addWidget(self.presentationCheckBox)
         self.mediaCheckBox = QtGui.QCheckBox(self.pluginPage)
         self.mediaCheckBox.setChecked(True)
         self.mediaCheckBox.setObjectName(u'mediaCheckBox')
@@ -214,10 +214,11 @@
         self.bibleCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Bible'))
         self.imageCheckBox.setText(translate('OpenLP.FirstTimeWizard',
             'Images'))
-        self.presentationCheckBox.setText(translate('OpenLP.FirstTimeWizard',
-            'Presentations'))
-        if sys.platform == "darwin":
-            self.presentationCheckBox.setEnabled(False)
+        # TODO Presentation plugin is not yet working on Mac OS X.
+        # For now just ignore it.
+        if sys.platform != 'darwin':
+            self.presentationCheckBox.setText(translate('OpenLP.FirstTimeWizard',
+                'Presentations'))
         self.mediaCheckBox.setText(translate('OpenLP.FirstTimeWizard',
             'Media (Audio and Video)'))
         self.remoteCheckBox.setText(translate('OpenLP.FirstTimeWizard',


Follow ups