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)
|
||||
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
|
||||
QtCore.QObject.connect(self.ModeDefaultItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.setViewMode)
|
||||
QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked)
|
||||
QtCore.QObject.connect(self.ModeSetupItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
|
||||
QtCore.QObject.connect(self.ModeLiveItem,
|
||||
@ -670,6 +670,16 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.generalSettingsSection + u'/auto open',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
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):
|
||||
"""
|
||||
@ -677,8 +687,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
Triggered by delay thread.
|
||||
"""
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.generalSettingsSection)
|
||||
if settings.value(u'screen blank', QtCore.QVariant(False)).toBool():
|
||||
if settings.value(u'%s/screen blank' % self.generalSettingsSection,
|
||||
QtCore.QVariant(False)).toBool():
|
||||
self.LiveController.mainDisplaySetBackground()
|
||||
if settings.value(u'blank warning',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
@ -687,7 +697,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
'OpenLP Main Display Blanked'),
|
||||
translate('OpenLP.MainWindow',
|
||||
'The Main Display has been blanked out'))
|
||||
settings.endGroup()
|
||||
|
||||
def onHelpWebSiteClicked(self):
|
||||
"""
|
||||
@ -716,16 +725,31 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
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)
|
||||
|
||||
def onModeLiveItemClicked(self):
|
||||
"""
|
||||
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)
|
||||
|
||||
def setViewMode(self, media=True, service=True, theme=True, preview=True,
|
||||
|
@ -884,7 +884,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('OpenLP.ServiceManager', 'Missing Display Handler'),
|
||||
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):
|
||||
"""
|
||||
|
@ -209,7 +209,8 @@ class SlideController(QtGui.QWidget):
|
||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.Toolbar.addToolbarButton(
|
||||
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)
|
||||
if isLive:
|
||||
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
||||
|
@ -242,14 +242,14 @@ class ThemeManager(QtGui.QWidget):
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('OpenLP.ThemeManager', 'Error'),
|
||||
unicode(translate('OpenLP.ThemeManager',
|
||||
'Theme %s is use in %s plugin.')) % \
|
||||
'Theme %s is used in the %s plugin.')) % \
|
||||
(theme, plugin.name))
|
||||
return
|
||||
if unicode(self.serviceComboBox.currentText()) == theme:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('OpenLP.ThemeManager', 'Error'),
|
||||
unicode(translate('OpenLP.ThemeManager',
|
||||
'Theme %s is use by the service manager.')) % theme)
|
||||
'Theme %s is used by the service manager.')) % theme)
|
||||
return
|
||||
row = self.themeListWidget.row(item)
|
||||
self.themeListWidget.takeItem(row)
|
||||
|
@ -182,7 +182,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'Empty Copyright'),
|
||||
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 '
|
||||
'such.'))
|
||||
self.CopyrightEdit.setFocus()
|
||||
@ -192,7 +192,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'Bible Exists'),
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'This Bible already exists! Please import '
|
||||
'This Bible already exists. Please import '
|
||||
'a different Bible or first delete the existing one.'))
|
||||
self.VersionNameEdit.setFocus()
|
||||
return False
|
||||
|
@ -246,7 +246,7 @@ class BibleManager(object):
|
||||
translate('BiblesPlugin.BibleManager',
|
||||
'Scripture Reference Error'),
|
||||
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 '
|
||||
'following patterns:\n\n'
|
||||
'Book Chapter\n'
|
||||
|
@ -97,8 +97,7 @@ class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
|
||||
self, translate('SongsPlugin.AuthorsForm', 'Error'),
|
||||
translate('SongsPlugin.AuthorsForm',
|
||||
'You have not set a display name for the '
|
||||
'author, would you like me to combine the first and '
|
||||
'last names for you?'),
|
||||
'author, combine the first and last names?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||
) == QtGui.QMessageBox.Yes:
|
||||
|
@ -51,7 +51,7 @@ class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
|
||||
QtGui.QMessageBox.critical(
|
||||
self, translate('SongsPlugin.TopicsForm', 'Error'),
|
||||
translate('SongsPlugin.TopicsForm',
|
||||
'You need to type in a topic name!'))
|
||||
'You need to type in a topic name.'))
|
||||
self.NameEdit.setFocus()
|
||||
return False
|
||||
else:
|
||||
|
@ -127,6 +127,8 @@ def import_bible():
|
||||
for row in rows:
|
||||
key = unicode(row[0], u'cp1252')
|
||||
value = unicode(row[1], u'cp1252')
|
||||
if key == u'Permission':
|
||||
key = u'Permissions'
|
||||
sql_insert = u'INSERT INTO metadata '\
|
||||
'("key", "value") '\
|
||||
'VALUES (?, ?)'
|
||||
|
Loading…
Reference in New Issue
Block a user