From 93b2d54c92c9bb6203ae734f93531f228faa3428 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Sat, 18 Sep 2010 16:24:39 +0100 Subject: [PATCH 1/4] String fixes --- openlp/core/ui/servicemanager.py | 3 ++- openlp/core/ui/slidecontroller.py | 3 ++- openlp/core/ui/thememanager.py | 4 ++-- openlp/plugins/bibles/forms/importwizardform.py | 4 ++-- openlp/plugins/bibles/lib/manager.py | 2 +- openlp/plugins/songs/forms/authorsform.py | 3 +-- openlp/plugins/songs/forms/topicsform.py | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index b2058a2e1..8db14956d 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -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): """ diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 9f9b4d433..7a2e3ccf0 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -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') diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 3ad6b5c8d..d8324f977 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -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) diff --git a/openlp/plugins/bibles/forms/importwizardform.py b/openlp/plugins/bibles/forms/importwizardform.py index 67f3756dc..84f0f41ee 100644 --- a/openlp/plugins/bibles/forms/importwizardform.py +++ b/openlp/plugins/bibles/forms/importwizardform.py @@ -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 diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 4f35556f1..fd2c2adff 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -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' diff --git a/openlp/plugins/songs/forms/authorsform.py b/openlp/plugins/songs/forms/authorsform.py index c7d1b0396..1dacd82cc 100644 --- a/openlp/plugins/songs/forms/authorsform.py +++ b/openlp/plugins/songs/forms/authorsform.py @@ -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: diff --git a/openlp/plugins/songs/forms/topicsform.py b/openlp/plugins/songs/forms/topicsform.py index a618dd9db..c45228527 100644 --- a/openlp/plugins/songs/forms/topicsform.py +++ b/openlp/plugins/songs/forms/topicsform.py @@ -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: From c8d3e3df232dcb44434934d1cf65350b3632f464 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 18 Sep 2010 18:11:37 +0200 Subject: [PATCH 2/4] fixed bug #641734 --- scripts/bible-1to2-converter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/bible-1to2-converter.py b/scripts/bible-1to2-converter.py index 111d22043..ebf246608 100755 --- a/scripts/bible-1to2-converter.py +++ b/scripts/bible-1to2-converter.py @@ -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 (?, ?)' From 7f5a6411d6c694f7a47ace9cebae3d423b50bf7a Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 18 Sep 2010 19:14:27 +0200 Subject: [PATCH 3/4] Fix for bug #640697 --- openlp/core/ui/mainwindow.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 60a6ae2b7..193d4ba0c 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -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.onModeDetaultItemClicked) 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 onModeDetaultItemClicked(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, From bf35338c990e6eccc439bb0a393df39d50db9da7 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 18 Sep 2010 20:15:54 +0200 Subject: [PATCH 4/4] Fix some typos. --- openlp/core/ui/mainwindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 193d4ba0c..0d158d042 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -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.onModeDetaultItemClicked) + QtCore.SIGNAL(u'triggered()'), self.onModeDefaultItemClicked) QtCore.QObject.connect(self.ModeSetupItem, QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked) QtCore.QObject.connect(self.ModeLiveItem, @@ -725,7 +725,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): """ self.settingsForm.exec_() - def onModeDetaultItemClicked(self): + def onModeDefaultItemClicked(self): """ Put OpenLP into "Default" view mode. """