← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~tomasgroth/openlp/mudraw-locate-fix into lp:openlp

 

Tomas Groth has proposed merging lp:~tomasgroth/openlp/mudraw-locate-fix into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/mudraw-locate-fix/+merge/221511

Small fix for locating mudraw on windows and mac. Enabled presentation plugin on mac and adjusted test accordingly.

[SUCCESS] http://ci.openlp.org/job/Branch-01-Pull/467/
[SUCCESS] http://ci.openlp.org/job/Branch-02-Functional-Tests/423/
[SUCCESS] http://ci.openlp.org/job/Branch-03-Interface-Tests/368/
[SUCCESS] http://ci.openlp.org/view/Branch/job/Branch-04-Windows_Tests/329/
[SUCCESS] http://ci.openlp.org/view/Branch/job/Branch-05a-Code_Analysis/225/
[SUCCESS] http://ci.openlp.org/view/Branch/job/Branch-05b-Test_Coverage/99/
-- 
https://code.launchpad.net/~tomasgroth/openlp/mudraw-locate-fix/+merge/221511
Your team OpenLP Core is requested to review the proposed merge of lp:~tomasgroth/openlp/mudraw-locate-fix into lp:openlp.
=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2014-04-12 20:19:22 +0000
+++ openlp/core/lib/pluginmanager.py	2014-05-30 09:38:12 +0000
@@ -82,11 +82,6 @@
         present_plugin_dir = os.path.join(self.base_path, 'presentations')
         self.log_debug('finding plugins in %s at depth %d' % (self.base_path, start_depth))
         for root, dirs, files in os.walk(self.base_path):
-            if sys.platform == 'darwin' and root.startswith(present_plugin_dir):
-                # TODO Presentation plugin is not yet working on Mac OS X.
-                # For now just ignore it. The following code will ignore files from the presentation plugin directory
-                # and thereby never import the plugin.
-                continue
             for name in files:
                 if name.endswith('.py') and not name.startswith('__'):
                     path = os.path.abspath(os.path.join(root, name))

=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py	2014-05-02 06:34:57 +0000
+++ openlp/core/ui/firsttimeform.py	2014-05-30 09:38:12 +0000
@@ -412,10 +412,7 @@
         self._increment_progress_bar(translate('OpenLP.FirstTimeWizard', 'Enabling selected plugins...'))
         self._set_plugin_status(self.songs_check_box, 'songs/status')
         self._set_plugin_status(self.bible_check_box, 'bibles/status')
-        # TODO Presentation plugin is not yet working on Mac OS X.
-        # For now just ignore it.
-        if sys.platform != 'darwin':
-            self._set_plugin_status(self.presentation_check_box, 'presentations/status')
+        self._set_plugin_status(self.presentation_check_box, 'presentations/status')
         self._set_plugin_status(self.image_check_box, 'images/status')
         self._set_plugin_status(self.media_check_box, 'media/status')
         self._set_plugin_status(self.remote_check_box, 'remotes/status')

=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py	2014-05-03 15:01:43 +0000
+++ openlp/core/ui/firsttimewizard.py	2014-05-30 09:38:12 +0000
@@ -95,13 +95,10 @@
         self.image_check_box.setChecked(True)
         self.image_check_box.setObjectName('image_check_box')
         self.plugin_layout.addWidget(self.image_check_box)
-        # TODO Presentation plugin is not yet working on Mac OS X.
-        # For now just ignore it.
-        if sys.platform != 'darwin':
-            self.presentation_check_box = QtGui.QCheckBox(self.plugin_page)
-            self.presentation_check_box.setChecked(True)
-            self.presentation_check_box.setObjectName('presentation_check_box')
-            self.plugin_layout.addWidget(self.presentation_check_box)
+        self.presentation_check_box = QtGui.QCheckBox(self.plugin_page)
+        self.presentation_check_box.setChecked(True)
+        self.presentation_check_box.setObjectName('presentation_check_box')
+        self.plugin_layout.addWidget(self.presentation_check_box)
         self.media_check_box = QtGui.QCheckBox(self.plugin_page)
         self.media_check_box.setChecked(True)
         self.media_check_box.setObjectName('media_check_box')
@@ -222,10 +219,7 @@
         self.custom_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Custom Slides'))
         self.bible_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Bible'))
         self.image_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Images'))
-        # TODO Presentation plugin is not yet working on Mac OS X.
-        # For now just ignore it.
-        if sys.platform != 'darwin':
-            self.presentation_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Presentations'))
+        self.presentation_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Presentations'))
         self.media_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Media (Audio and Video)'))
         self.remote_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Allow remote access'))
         self.song_usage_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Monitor Song Usage'))

=== modified file 'openlp/plugins/presentations/lib/pdfcontroller.py'
--- openlp/plugins/presentations/lib/pdfcontroller.py	2014-04-15 08:33:21 +0000
+++ openlp/plugins/presentations/lib/pdfcontroller.py	2014-05-30 09:38:12 +0000
@@ -126,8 +126,8 @@
             if os.name == 'nt':
                 # for windows we only accept mudraw.exe in the base folder
                 application_path = AppLocation.get_directory(AppLocation.AppDir)
-                if os.path.isfile(application_path + '/../mudraw.exe'):
-                    self.mudrawbin = application_path + '/../mudraw.exe'
+                if os.path.isfile(os.path.join(application_path, 'mudraw.exe')):
+                    self.mudrawbin = os.path.join(application_path, 'mudraw.exe')
             else:
                 DEVNULL = open(os.devnull, 'wb')
                 # First try to find mupdf
@@ -145,8 +145,8 @@
                 # Last option: check if mudraw is placed in OpenLP base folder
                 if not self.mudrawbin and not self.gsbin:
                     application_path = AppLocation.get_directory(AppLocation.AppDir)
-                    if os.path.isfile(application_path + '/../mudraw'):
-                        self.mudrawbin = application_path + '/../mudraw'
+                    if os.path.isfile(os.path.join(application_path, 'mudraw')):
+                        self.mudrawbin = os.path.join(application_path, 'mudraw')
         if self.mudrawbin:
             self.also_supports = ['xps']
             return True

=== modified file 'tests/interfaces/openlp_core_lib/test_pluginmanager.py'
--- tests/interfaces/openlp_core_lib/test_pluginmanager.py	2014-04-02 19:35:09 +0000
+++ tests/interfaces/openlp_core_lib/test_pluginmanager.py	2014-05-30 09:38:12 +0000
@@ -88,7 +88,7 @@
         plugin_names = [plugin.name for plugin in plugin_manager.plugins]
         assert 'songs' in plugin_names, 'There should be a "songs" plugin.'
         assert 'bibles' in plugin_names, 'There should be a "bibles" plugin.'
-        assert 'presentations' not in plugin_names, 'There should NOT be a "presentations" plugin.'
+        assert 'presentations' in plugin_names, 'There should be a "presentations" plugin.'
         assert 'images' in plugin_names, 'There should be a "images" plugin.'
         assert 'media' in plugin_names, 'There should be a "media" plugin.'
         assert 'custom' in plugin_names, 'There should be a "custom" plugin.'


Follow ups