forked from openlp/openlp
r2071
This commit is contained in:
commit
9d2f50d5ca
@ -674,6 +674,7 @@ class AdvancedTab(SettingsTab):
|
||||
options = QtGui.QFileDialog.ShowDirsOnly))
|
||||
# Set the new data path.
|
||||
if new_data_path:
|
||||
new_data_path = os.path.normpath(new_data_path)
|
||||
if self.currentDataPath.lower() == new_data_path.lower():
|
||||
self.onDataDirectoryCancelButtonClicked()
|
||||
return
|
||||
|
@ -971,6 +971,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
setting_sections.extend([self.themesSettingsSection])
|
||||
setting_sections.extend([self.displayTagsSection])
|
||||
setting_sections.extend([self.headerSection])
|
||||
setting_sections.extend([u'crashreport'])
|
||||
# Add plugin sections.
|
||||
for plugin in self.pluginManager.plugins:
|
||||
setting_sections.extend([plugin.name])
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import OpenLPToolbar, Receiver, translate
|
||||
@ -105,8 +106,12 @@ class MediaController(object):
|
||||
AppLocation.get_directory(AppLocation.AppDir),
|
||||
u'core', u'ui', u'media')
|
||||
for filename in os.listdir(controller_dir):
|
||||
if filename.endswith(u'player.py') and not \
|
||||
filename == 'media_player.py':
|
||||
# TODO vlc backend is not yet working on Mac OS X.
|
||||
# For now just ignore vlc backend on Mac OS X.
|
||||
if sys.platform == 'darwin' and filename == 'vlcplayer.py':
|
||||
log.warn(u'Disabling vlc media player')
|
||||
continue
|
||||
if filename.endswith(u'player.py'):
|
||||
path = os.path.join(controller_dir, filename)
|
||||
if os.path.isfile(path):
|
||||
modulename = u'openlp.core.ui.media.' + \
|
||||
@ -114,7 +119,9 @@ class MediaController(object):
|
||||
log.debug(u'Importing controller %s', modulename)
|
||||
try:
|
||||
__import__(modulename, globals(), locals(), [])
|
||||
except ImportError:
|
||||
# On some platforms importing vlc.py might cause
|
||||
# also OSError exceptions. (e.g. Mac OS X)
|
||||
except (ImportError, OSError):
|
||||
log.warn(u'Failed to import %s on path %s',
|
||||
modulename, path)
|
||||
controller_classes = MediaPlayer.__subclasses__()
|
||||
|
@ -157,7 +157,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
u'outlineColorButton', self.outlineColorButton)
|
||||
self.mainAreaPage.registerField(
|
||||
u'outlineSizeSpinBox', self.outlineSizeSpinBox)
|
||||
self.mainAreaPage.registerField(u'shadowCheckBox', self.shadowCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'shadowCheckBox', self.shadowCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'mainBoldCheckBox', self.mainBoldCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
@ -168,8 +169,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
u'shadowSizeSpinBox', self.shadowSizeSpinBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'footerSizeSpinBox', self.footerSizeSpinBox)
|
||||
self.areaPositionPage.registerField(u'mainPositionX', self.mainXSpinBox)
|
||||
self.areaPositionPage.registerField(u'mainPositionY', self.mainYSpinBox)
|
||||
self.areaPositionPage.registerField(
|
||||
u'mainPositionX', self.mainXSpinBox)
|
||||
self.areaPositionPage.registerField(
|
||||
u'mainPositionY', self.mainYSpinBox)
|
||||
self.areaPositionPage.registerField(
|
||||
u'mainPositionWidth', self.mainWidthSpinBox)
|
||||
self.areaPositionPage.registerField(
|
||||
@ -202,7 +205,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
Updates the lines on a page on the wizard
|
||||
"""
|
||||
self.mainLineCountLabel.setText(unicode(translate('OpenLP.ThemeForm',
|
||||
self.mainLineCountLabel.setText(unicode(translate(
|
||||
'OpenLP.ThemeWizard',
|
||||
'(approximately %d lines per slide)')) % int(lines))
|
||||
|
||||
def resizeEvent(self, event=None):
|
||||
@ -224,6 +228,19 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.previewBoxLabel.setFixedSize(pixmapWidth + 2 * frameWidth,
|
||||
pixmapHeight + 2 * frameWidth)
|
||||
|
||||
def validateCurrentPage(self):
|
||||
background_image = BackgroundType.to_string(BackgroundType.Image)
|
||||
if self.page(self.currentId()) == self.backgroundPage and \
|
||||
self.theme.background_type == background_image and \
|
||||
self.imageFileEdit.text().isEmpty():
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('OpenLP.ThemeWizard', 'Background Image Empty'),
|
||||
translate('OpenLP.ThemeWizard', 'You have not selected a '
|
||||
'background image. Please select one before continuing.'))
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def onCurrentIdChanged(self, pageId):
|
||||
"""
|
||||
Detects Page changes and updates as appropriate.
|
||||
@ -521,7 +538,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
images_filter = u'%s;;%s (*.*) (*)' % (
|
||||
images_filter, UiStrings().AllFiles)
|
||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||
translate('OpenLP.ThemeForm', 'Select Image'), u'',
|
||||
translate('OpenLP.ThemeWizard', 'Select Image'), u'',
|
||||
images_filter)
|
||||
if filename:
|
||||
self.theme.background_filename = unicode(filename)
|
||||
@ -603,14 +620,14 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.theme_name = unicode(self.field(u'name').toString())
|
||||
if not self.theme.theme_name:
|
||||
critical_error_message_box(
|
||||
translate('OpenLP.ThemeForm', 'Theme Name Missing'),
|
||||
translate('OpenLP.ThemeForm',
|
||||
translate('OpenLP.ThemeWizard', 'Theme Name Missing'),
|
||||
translate('OpenLP.ThemeWizard',
|
||||
'There is no name for this theme. Please enter one.'))
|
||||
return
|
||||
if self.theme.theme_name == u'-1' or self.theme.theme_name == u'None':
|
||||
critical_error_message_box(
|
||||
translate('OpenLP.ThemeForm', 'Theme Name Invalid'),
|
||||
translate('OpenLP.ThemeForm',
|
||||
translate('OpenLP.ThemeWizard', 'Theme Name Invalid'),
|
||||
translate('OpenLP.ThemeWizard',
|
||||
'Invalid theme name. Please enter one.'))
|
||||
return
|
||||
saveFrom = None
|
||||
|
@ -257,6 +257,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
theme.set_default_header_footer()
|
||||
self.themeForm.theme = theme
|
||||
self.themeForm.exec_()
|
||||
self.loadThemes()
|
||||
|
||||
def onRenameTheme(self):
|
||||
"""
|
||||
@ -283,7 +284,6 @@ class ThemeManager(QtGui.QWidget):
|
||||
plugin.renameTheme(old_theme_name, new_theme_name)
|
||||
self.mainwindow.renderer.update_theme(
|
||||
new_theme_name, old_theme_name)
|
||||
self.loadThemes()
|
||||
|
||||
def onCopyTheme(self):
|
||||
"""
|
||||
|
@ -136,7 +136,7 @@ class AppLocation(object):
|
||||
else:
|
||||
path = AppLocation.get_directory(AppLocation.DataDir)
|
||||
check_directory_exists(path)
|
||||
return path
|
||||
return os.path.normpath(path)
|
||||
|
||||
@staticmethod
|
||||
def get_section_data_path(section):
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2926
resources/i18n/fi.ts
2926
resources/i18n/fi.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2286
resources/i18n/id.ts
2286
resources/i18n/id.ts
File diff suppressed because it is too large
Load Diff
2870
resources/i18n/it.ts
2870
resources/i18n/it.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3308
resources/i18n/ko.ts
3308
resources/i18n/ko.ts
File diff suppressed because it is too large
Load Diff
3184
resources/i18n/nb.ts
3184
resources/i18n/nb.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3534
resources/i18n/pl.ts
3534
resources/i18n/pl.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1668
resources/i18n/ru.ts
1668
resources/i18n/ru.ts
File diff suppressed because it is too large
Load Diff
2912
resources/i18n/sk.ts
2912
resources/i18n/sk.ts
File diff suppressed because it is too large
Load Diff
3542
resources/i18n/sq.ts
3542
resources/i18n/sq.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user