forked from openlp/openlp
Small fix for locating mudraw on windows and mac.
Enabled presentation plugin on mac and adjusted test accordingly. bzr-revno: 2390
This commit is contained in:
commit
d832933110
@ -82,11 +82,6 @@ class PluginManager(RegistryMixin, OpenLPMixin, RegistryProperties):
|
||||
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))
|
||||
|
@ -412,10 +412,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard, RegistryProperties):
|
||||
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')
|
||||
|
@ -95,13 +95,10 @@ class Ui_FirstTimeWizard(object):
|
||||
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 @@ class Ui_FirstTimeWizard(object):
|
||||
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'))
|
||||
|
@ -126,8 +126,8 @@ class PdfController(PresentationController):
|
||||
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 @@ class PdfController(PresentationController):
|
||||
# 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
|
||||
|
@ -88,7 +88,7 @@ class TestPluginManager(TestCase, TestMixin):
|
||||
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.'
|
||||
|
Loading…
Reference in New Issue
Block a user