forked from openlp/openlp
change layout of backup page
change some strings
This commit is contained in:
parent
9b9f47a5be
commit
81fca6bedb
@ -147,6 +147,13 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
||||||
filename, 1)
|
filename, 1)
|
||||||
|
|
||||||
|
def onNoBackupCheckBoxToggled(self, checked):
|
||||||
|
"""
|
||||||
|
Enable or disable the backup directory widgets.
|
||||||
|
"""
|
||||||
|
self.backupDirectoryEdit.setEnabled(not checked)
|
||||||
|
self.backupBrowseButton.setEnabled(not checked)
|
||||||
|
|
||||||
def backupOldBibles(self, backupdirectory):
|
def backupOldBibles(self, backupdirectory):
|
||||||
"""
|
"""
|
||||||
Backup old bible databases in a given folder.
|
Backup old bible databases in a given folder.
|
||||||
@ -174,6 +181,8 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
QtCore.SIGNAL(u'clicked()'), self.onFinishButton)
|
QtCore.SIGNAL(u'clicked()'), self.onFinishButton)
|
||||||
QtCore.QObject.connect(self.backupBrowseButton,
|
QtCore.QObject.connect(self.backupBrowseButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onBackupBrowseButtonClicked)
|
QtCore.SIGNAL(u'clicked()'), self.onBackupBrowseButtonClicked)
|
||||||
|
QtCore.QObject.connect(self.noBackupCheckBox,
|
||||||
|
QtCore.SIGNAL(u'toggled(bool)'), self.onNoBackupCheckBoxToggled)
|
||||||
|
|
||||||
def addCustomPages(self):
|
def addCustomPages(self):
|
||||||
"""
|
"""
|
||||||
@ -185,9 +194,14 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.backupLayout = QtGui.QVBoxLayout(self.backupPage)
|
self.backupLayout = QtGui.QVBoxLayout(self.backupPage)
|
||||||
self.backupLayout.setObjectName(u'BackupLayout')
|
self.backupLayout.setObjectName(u'BackupLayout')
|
||||||
self.backupInfoLabel = QtGui.QLabel(self.backupPage)
|
self.backupInfoLabel = QtGui.QLabel(self.backupPage)
|
||||||
self.backupInfoLabel.setObjectName(u'backupInfoLabel')
|
self.backupInfoLabel.setOpenExternalLinks(True)
|
||||||
|
self.backupInfoLabel.setTextFormat(QtCore.Qt.RichText)
|
||||||
self.backupInfoLabel.setWordWrap(True)
|
self.backupInfoLabel.setWordWrap(True)
|
||||||
|
self.backupInfoLabel.setObjectName(u'backupInfoLabel')
|
||||||
self.backupLayout.addWidget(self.backupInfoLabel)
|
self.backupLayout.addWidget(self.backupInfoLabel)
|
||||||
|
self.selectLabel = QtGui.QLabel(self.backupPage)
|
||||||
|
self.selectLabel.setObjectName(u'selectLabel')
|
||||||
|
self.backupLayout.addWidget(self.selectLabel)
|
||||||
self.formLayout = QtGui.QFormLayout()
|
self.formLayout = QtGui.QFormLayout()
|
||||||
self.formLayout.setMargin(0)
|
self.formLayout.setMargin(0)
|
||||||
self.formLayout.setObjectName(u'FormLayout')
|
self.formLayout.setObjectName(u'FormLayout')
|
||||||
@ -205,11 +219,6 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
self.formLayout.addRow(self.backupDirectoryLabel,
|
self.formLayout.addRow(self.backupDirectoryLabel,
|
||||||
self.backupDirectoryLayout)
|
self.backupDirectoryLayout)
|
||||||
self.backupLayout.addLayout(self.formLayout)
|
self.backupLayout.addLayout(self.formLayout)
|
||||||
self.backupAdditionalInfoLabel = QtGui.QLabel(self.backupPage)
|
|
||||||
self.backupAdditionalInfoLabel.setObjectName(
|
|
||||||
u'BackupAdditionalInfoLabel')
|
|
||||||
self.backupAdditionalInfoLabel.setWordWrap(True)
|
|
||||||
self.backupLayout.addWidget(self.backupAdditionalInfoLabel)
|
|
||||||
self.noBackupCheckBox = QtGui.QCheckBox(self.backupPage)
|
self.noBackupCheckBox = QtGui.QCheckBox(self.backupPage)
|
||||||
self.noBackupCheckBox.setObjectName('NoBackupCheckBox')
|
self.noBackupCheckBox.setObjectName('NoBackupCheckBox')
|
||||||
self.backupLayout.addWidget(self.noBackupCheckBox)
|
self.backupLayout.addWidget(self.noBackupCheckBox)
|
||||||
@ -356,25 +365,24 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'This wizard will help you to upgrade your existing Bibles from a '
|
'This wizard will help you to upgrade your existing Bibles from a '
|
||||||
'prior version of OpenLP 2. Click the next button below to start '
|
'prior version of OpenLP 2. Click the next button below to start '
|
||||||
'the process by selecting the Bibles to upgrade.'))
|
'the upgrade process.'))
|
||||||
self.backupPage.setTitle(
|
self.backupPage.setTitle(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'Select Backup Directory'))
|
'Select Backup Directory'))
|
||||||
self.backupPage.setSubTitle(
|
self.backupPage.setSubTitle(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'Please select a Directory for Backup your old Bibles'))
|
'Please select a backup directory for your Bibles'))
|
||||||
self.backupInfoLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
self.backupInfoLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'The Bible upgrade procedure will prevent you running older '
|
'Previous releases of OpenLP 2.0 are unable to use upgraded Bibles.'
|
||||||
'versions of OpenLP. \nPlease select a backup location for your '
|
' This will create a backup of your current Bibles so that you can '
|
||||||
'existing Bibles.'))
|
'simply copy the files back to your OpenLP data directory if you '
|
||||||
|
'need to revert to a previous release of OpenLP. Instructions on '
|
||||||
|
'how to restore the files can be found in our <a href="'
|
||||||
|
'http://wiki.openlp.org/faq">Frequently Asked Questions</a>.'))
|
||||||
|
self.selectLabel.setText(translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
|
'Please select a backup location for your Bibles.'))
|
||||||
self.backupDirectoryLabel.setText(
|
self.backupDirectoryLabel.setText(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Backup Directory:'))
|
translate('BiblesPlugin.UpgradeWizardForm', 'Backup Directory:'))
|
||||||
self.backupAdditionalInfoLabel.setText(
|
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
|
||||||
'These Bibles can copied back to your OpenLP data folder should '
|
|
||||||
'you need to revert to a previous version. Instructions on how '
|
|
||||||
'to restore the files can be found on our FAQ '
|
|
||||||
'at http://wiki.openlp.org/faq'))
|
|
||||||
self.noBackupCheckBox.setText(
|
self.noBackupCheckBox.setText(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'There is no need to backup my Bibles'))
|
'There is no need to backup my Bibles'))
|
||||||
@ -749,21 +757,21 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if failed_import > 0:
|
if failed_import > 0:
|
||||||
failed_import_text = unicode(translate(
|
failed_import_text = unicode(translate(
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'BiblesPlugin.UpgradeWizardForm',
|
||||||
' - %s upgrade fail')) % failed_import
|
', %s failed')) % failed_import
|
||||||
else:
|
else:
|
||||||
failed_import_text = u''
|
failed_import_text = u''
|
||||||
if successful_import > 0:
|
if successful_import > 0:
|
||||||
if include_webbible:
|
if include_webbible:
|
||||||
self.progressLabel.setText(unicode(
|
self.progressLabel.setText(unicode(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrade %s '
|
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
||||||
'Bible(s) successful%s.\nPlease note, that verses from '
|
'Bible(s): %s successful%s\nPlease note, that verses from '
|
||||||
'Web Bibles will be downloaded\non demand and so an '
|
'Web Bibles will be downloaded\non demand and so an '
|
||||||
'Internet connection is required.')) %
|
'Internet connection is required.')) %
|
||||||
(successful_import, failed_import_text))
|
(successful_import, failed_import_text))
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(unicode(
|
self.progressLabel.setText(unicode(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrade %s '
|
translate('BiblesPlugin.UpgradeWizardForm', 'Upgrading '
|
||||||
'Bible(s) successful.%s')) % (successful_import,
|
'Bible(s): %s successful%s')) % (successful_import,
|
||||||
failed_import_text))
|
failed_import_text))
|
||||||
else:
|
else:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(
|
||||||
|
Loading…
Reference in New Issue
Block a user