forked from openlp/openlp
added docstring to FTW section. changed menu text, changed default button to No
This commit is contained in:
parent
8800b41749
commit
c84c69645e
@ -476,7 +476,7 @@ class Ui_MainWindow(object):
|
|||||||
self.toolsOpenDataFolder.setText(
|
self.toolsOpenDataFolder.setText(
|
||||||
translate('OpenLP.MainWindow', 'Open &Data Folder...'))
|
translate('OpenLP.MainWindow', 'Open &Data Folder...'))
|
||||||
self.toolsFirstTimeWizard.setText(
|
self.toolsFirstTimeWizard.setText(
|
||||||
translate('OpenLP.MainWindow', 'Run First Time Wizard'))
|
translate('OpenLP.MainWindow', 'Re-run First Time Wizard'))
|
||||||
self.toolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow',
|
self.toolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
'Open the folder where songs, bibles and other data resides.'))
|
'Open the folder where songs, bibles and other data resides.'))
|
||||||
self.updateThemeImages.setText(
|
self.updateThemeImages.setText(
|
||||||
@ -725,36 +725,43 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
os.removedirs(temp_dir)
|
os.removedirs(temp_dir)
|
||||||
|
|
||||||
def onFirstTimeWizardClicked(self):
|
def onFirstTimeWizardClicked(self):
|
||||||
ret = QtGui.QMessageBox.warning(self,
|
"""
|
||||||
translate('OpenLP.MainWindow', 'Re-Run First Time Wizard?'),
|
Re-run the first time wizard. Prompts the user for run confirmation
|
||||||
|
If wizard is run, songs, bibles and themes are imported. The default
|
||||||
|
theme is changed (if necessary). The plugins in pluginmanager are
|
||||||
|
set active/in-active to match the selection in the wizard.
|
||||||
|
"""
|
||||||
|
answer = QtGui.QMessageBox.warning(self,
|
||||||
|
translate('OpenLP.MainWindow', 'Re-run First Time Wizard?'),
|
||||||
translate('OpenLP.MainWindow',
|
translate('OpenLP.MainWindow',
|
||||||
'Are you sure you want to run the First Time Wizard?\n\n' + \
|
'Are you sure you want to re-run the First Time Wizard?\n\n' \
|
||||||
'Re-running this wizard will make changes to your current ' + \
|
'Re-running this wizard may make changes to your current ' \
|
||||||
'OpenLP configuration, possibly add songs to your ' + \
|
'OpenLP configuration and possibly add Songs to your ' \
|
||||||
'existing Songs list and change your Default Theme'),
|
'existing Songs list and change your Default Theme'),
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Yes |
|
QtGui.QMessageBox.Yes |
|
||||||
QtGui.QMessageBox.No),
|
QtGui.QMessageBox.No),
|
||||||
QtGui.QMessageBox.Yes)
|
QtGui.QMessageBox.No)
|
||||||
if ret == QtGui.QMessageBox.Yes:
|
if answer == QtGui.QMessageBox.No:
|
||||||
Receiver.send_message(u'cursor_busy')
|
return
|
||||||
screens = ScreenList.get_instance()
|
Receiver.send_message(u'cursor_busy')
|
||||||
if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
|
screens = ScreenList.get_instance()
|
||||||
self.firstTime()
|
if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
|
||||||
for plugin in self.pluginManager.plugins:
|
self.firstTime()
|
||||||
self.activePlugin = plugin
|
for plugin in self.pluginManager.plugins:
|
||||||
oldStatus = self.activePlugin.status
|
self.activePlugin = plugin
|
||||||
self.activePlugin.setStatus()
|
oldStatus = self.activePlugin.status
|
||||||
if oldStatus != self.activePlugin.status:
|
self.activePlugin.setStatus()
|
||||||
if self.activePlugin.status == PluginStatus.Active:
|
if oldStatus != self.activePlugin.status:
|
||||||
self.activePlugin.toggleStatus(PluginStatus.Active)
|
if self.activePlugin.status == PluginStatus.Active:
|
||||||
self.activePlugin.appStartup()
|
self.activePlugin.toggleStatus(PluginStatus.Active)
|
||||||
else:
|
self.activePlugin.appStartup()
|
||||||
self.activePlugin.toggleStatus(PluginStatus.Inactive)
|
else:
|
||||||
self.themeManagerContents.configUpdated()
|
self.activePlugin.toggleStatus(PluginStatus.Inactive)
|
||||||
self.themeManagerContents.loadThemes(True)
|
self.themeManagerContents.configUpdated()
|
||||||
Receiver.send_message(u'theme_update_global',
|
self.themeManagerContents.loadThemes(True)
|
||||||
self.themeManagerContents.global_theme)
|
Receiver.send_message(u'theme_update_global',
|
||||||
|
self.themeManagerContents.global_theme)
|
||||||
|
|
||||||
def blankCheck(self):
|
def blankCheck(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user