forked from openlp/openlp
Head
This commit is contained in:
commit
e42dbc9504
@ -575,7 +575,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.SIGNAL(u'toggled(bool)'), self.setAutoLanguage)
|
QtCore.SIGNAL(u'toggled(bool)'), self.setAutoLanguage)
|
||||||
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
|
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
|
||||||
QtCore.QObject.connect(self.ModeDefaultItem,
|
QtCore.QObject.connect(self.ModeDefaultItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.setViewMode)
|
QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked)
|
||||||
QtCore.QObject.connect(self.ModeSetupItem,
|
QtCore.QObject.connect(self.ModeSetupItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
|
||||||
QtCore.QObject.connect(self.ModeLiveItem,
|
QtCore.QObject.connect(self.ModeLiveItem,
|
||||||
@ -670,6 +670,16 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.generalSettingsSection + u'/auto open',
|
self.generalSettingsSection + u'/auto open',
|
||||||
QtCore.QVariant(False)).toBool():
|
QtCore.QVariant(False)).toBool():
|
||||||
self.ServiceManagerContents.onLoadService(True)
|
self.ServiceManagerContents.onLoadService(True)
|
||||||
|
view_mode = QtCore.QSettings().value(u'%s/view mode' % \
|
||||||
|
self.generalSettingsSection, u'default')
|
||||||
|
if view_mode == u'default':
|
||||||
|
self.ModeDefaultItem.setChecked(True)
|
||||||
|
elif view_mode == u'setup':
|
||||||
|
self.setViewMode(True, True, False, True, False)
|
||||||
|
self.ModeSetupItem.setChecked(True)
|
||||||
|
elif view_mode == u'live':
|
||||||
|
self.setViewMode(False, True, False, False, True)
|
||||||
|
self.ModeLiveItem.setChecked(True)
|
||||||
|
|
||||||
def blankCheck(self):
|
def blankCheck(self):
|
||||||
"""
|
"""
|
||||||
@ -677,8 +687,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
Triggered by delay thread.
|
Triggered by delay thread.
|
||||||
"""
|
"""
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(self.generalSettingsSection)
|
if settings.value(u'%s/screen blank' % self.generalSettingsSection,
|
||||||
if settings.value(u'screen blank', QtCore.QVariant(False)).toBool():
|
QtCore.QVariant(False)).toBool():
|
||||||
self.LiveController.mainDisplaySetBackground()
|
self.LiveController.mainDisplaySetBackground()
|
||||||
if settings.value(u'blank warning',
|
if settings.value(u'blank warning',
|
||||||
QtCore.QVariant(False)).toBool():
|
QtCore.QVariant(False)).toBool():
|
||||||
@ -687,7 +697,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
'OpenLP Main Display Blanked'),
|
'OpenLP Main Display Blanked'),
|
||||||
translate('OpenLP.MainWindow',
|
translate('OpenLP.MainWindow',
|
||||||
'The Main Display has been blanked out'))
|
'The Main Display has been blanked out'))
|
||||||
settings.endGroup()
|
|
||||||
|
|
||||||
def onHelpWebSiteClicked(self):
|
def onHelpWebSiteClicked(self):
|
||||||
"""
|
"""
|
||||||
@ -716,16 +725,31 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
self.settingsForm.exec_()
|
self.settingsForm.exec_()
|
||||||
|
|
||||||
|
def onModeDefaultItemClicked(self):
|
||||||
|
"""
|
||||||
|
Put OpenLP into "Default" view mode.
|
||||||
|
"""
|
||||||
|
settings = QtCore.QSettings()
|
||||||
|
settings.setValue(u'%s/view mode' % self.generalSettingsSection,
|
||||||
|
u'default')
|
||||||
|
self.setViewMode(True, True, True, True, True)
|
||||||
|
|
||||||
def onModeSetupItemClicked(self):
|
def onModeSetupItemClicked(self):
|
||||||
"""
|
"""
|
||||||
Put OpenLP into "Setup" view mode.
|
Put OpenLP into "Setup" view mode.
|
||||||
"""
|
"""
|
||||||
|
settings = QtCore.QSettings()
|
||||||
|
settings.setValue(u'%s/view mode' % self.generalSettingsSection,
|
||||||
|
u'setup')
|
||||||
self.setViewMode(True, True, False, True, False)
|
self.setViewMode(True, True, False, True, False)
|
||||||
|
|
||||||
def onModeLiveItemClicked(self):
|
def onModeLiveItemClicked(self):
|
||||||
"""
|
"""
|
||||||
Put OpenLP into "Live" view mode.
|
Put OpenLP into "Live" view mode.
|
||||||
"""
|
"""
|
||||||
|
settings = QtCore.QSettings()
|
||||||
|
settings.setValue(u'%s/view mode' % self.generalSettingsSection,
|
||||||
|
u'live')
|
||||||
self.setViewMode(False, True, False, False, True)
|
self.setViewMode(False, True, False, False, True)
|
||||||
|
|
||||||
def setViewMode(self, media=True, service=True, theme=True, preview=True,
|
def setViewMode(self, media=True, service=True, theme=True, preview=True,
|
||||||
|
@ -884,7 +884,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
|
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
|
||||||
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
translate('OpenLP.ServiceManager', 'Your item cannot be '
|
||||||
'displayed as there is no handler to display it'))
|
'displayed as the plugin required to display it is missing '
|
||||||
|
'or inactive'))
|
||||||
|
|
||||||
def remoteEdit(self):
|
def remoteEdit(self):
|
||||||
"""
|
"""
|
||||||
|
@ -209,7 +209,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.Toolbar.addToolbarButton(
|
self.Toolbar.addToolbarButton(
|
||||||
u'Edit Song', u':/general/general_edit.png',
|
u'Edit Song', u':/general/general_edit.png',
|
||||||
translate('OpenLP.SlideController', 'Edit and re-preview song'),
|
translate('OpenLP.SlideController',
|
||||||
|
'Edit and reload song preview'),
|
||||||
self.onEditSong)
|
self.onEditSong)
|
||||||
if isLive:
|
if isLive:
|
||||||
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
||||||
|
@ -242,14 +242,14 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('OpenLP.ThemeManager', 'Error'),
|
translate('OpenLP.ThemeManager', 'Error'),
|
||||||
unicode(translate('OpenLP.ThemeManager',
|
unicode(translate('OpenLP.ThemeManager',
|
||||||
'Theme %s is use in %s plugin.')) % \
|
'Theme %s is used in the %s plugin.')) % \
|
||||||
(theme, plugin.name))
|
(theme, plugin.name))
|
||||||
return
|
return
|
||||||
if unicode(self.serviceComboBox.currentText()) == theme:
|
if unicode(self.serviceComboBox.currentText()) == theme:
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('OpenLP.ThemeManager', 'Error'),
|
translate('OpenLP.ThemeManager', 'Error'),
|
||||||
unicode(translate('OpenLP.ThemeManager',
|
unicode(translate('OpenLP.ThemeManager',
|
||||||
'Theme %s is use by the service manager.')) % theme)
|
'Theme %s is used by the service manager.')) % theme)
|
||||||
return
|
return
|
||||||
row = self.themeListWidget.row(item)
|
row = self.themeListWidget.row(item)
|
||||||
self.themeListWidget.takeItem(row)
|
self.themeListWidget.takeItem(row)
|
||||||
|
@ -182,7 +182,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Empty Copyright'),
|
'Empty Copyright'),
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to set a copyright for your Bible! '
|
'You need to set a copyright for your Bible. '
|
||||||
'Bibles in the Public Domain need to be marked as '
|
'Bibles in the Public Domain need to be marked as '
|
||||||
'such.'))
|
'such.'))
|
||||||
self.CopyrightEdit.setFocus()
|
self.CopyrightEdit.setFocus()
|
||||||
@ -192,7 +192,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Bible Exists'),
|
'Bible Exists'),
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'This Bible already exists! Please import '
|
'This Bible already exists. Please import '
|
||||||
'a different Bible or first delete the existing one.'))
|
'a different Bible or first delete the existing one.'))
|
||||||
self.VersionNameEdit.setFocus()
|
self.VersionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
|
@ -246,7 +246,7 @@ class BibleManager(object):
|
|||||||
translate('BiblesPlugin.BibleManager',
|
translate('BiblesPlugin.BibleManager',
|
||||||
'Scripture Reference Error'),
|
'Scripture Reference Error'),
|
||||||
translate('BiblesPlugin.BibleManager', 'Your scripture '
|
translate('BiblesPlugin.BibleManager', 'Your scripture '
|
||||||
'reference is either not supported by OpenLP or invalid. '
|
'reference is either not supported by OpenLP or is invalid. '
|
||||||
'Please make sure your reference conforms to one of the '
|
'Please make sure your reference conforms to one of the '
|
||||||
'following patterns:\n\n'
|
'following patterns:\n\n'
|
||||||
'Book Chapter\n'
|
'Book Chapter\n'
|
||||||
|
@ -97,8 +97,7 @@ class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
|
|||||||
self, translate('SongsPlugin.AuthorsForm', 'Error'),
|
self, translate('SongsPlugin.AuthorsForm', 'Error'),
|
||||||
translate('SongsPlugin.AuthorsForm',
|
translate('SongsPlugin.AuthorsForm',
|
||||||
'You have not set a display name for the '
|
'You have not set a display name for the '
|
||||||
'author, would you like me to combine the first and '
|
'author, combine the first and last names?'),
|
||||||
'last names for you?'),
|
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||||
) == QtGui.QMessageBox.Yes:
|
) == QtGui.QMessageBox.Yes:
|
||||||
|
@ -51,7 +51,7 @@ class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
|
|||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate('SongsPlugin.TopicsForm', 'Error'),
|
self, translate('SongsPlugin.TopicsForm', 'Error'),
|
||||||
translate('SongsPlugin.TopicsForm',
|
translate('SongsPlugin.TopicsForm',
|
||||||
'You need to type in a topic name!'))
|
'You need to type in a topic name.'))
|
||||||
self.NameEdit.setFocus()
|
self.NameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
@ -127,6 +127,8 @@ def import_bible():
|
|||||||
for row in rows:
|
for row in rows:
|
||||||
key = unicode(row[0], u'cp1252')
|
key = unicode(row[0], u'cp1252')
|
||||||
value = unicode(row[1], u'cp1252')
|
value = unicode(row[1], u'cp1252')
|
||||||
|
if key == u'Permission':
|
||||||
|
key = u'Permissions'
|
||||||
sql_insert = u'INSERT INTO metadata '\
|
sql_insert = u'INSERT INTO metadata '\
|
||||||
'("key", "value") '\
|
'("key", "value") '\
|
||||||
'VALUES (?, ?)'
|
'VALUES (?, ?)'
|
||||||
|
Loading…
Reference in New Issue
Block a user