openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #11142
[Merge] lp:~smpettit/openlp/ftw into lp:openlp
Stevan Pettit has proposed merging lp:~smpettit/openlp/ftw into lp:openlp.
Requested reviews:
Andreas Preikschat (googol)
Tim Bentley (trb143)
For more details, see:
https://code.launchpad.net/~smpettit/openlp/ftw/+merge/70344
Modified firsttimeform to include existing themes in the set default theme list, if the wizard is being re-run.
When these themes are added, a check is made to insure there are no duplicate names (which may occur if the user selects the sample themes again).
After the list is loaded, the current default theme is pre-selected.
Fixed some comments (commit message has a typo)
Fixed some comments. Removed need for "theme_list"
--
https://code.launchpad.net/~smpettit/openlp/ftw/+merge/70344
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py 2011-07-23 12:52:43 +0000
+++ openlp/core/ui/firsttimeform.py 2011-08-03 17:58:59 +0000
@@ -157,10 +157,27 @@
item = self.themesListWidget.item(iter)
if item.checkState() == QtCore.Qt.Checked:
self.themeComboBox.addItem(item.text())
+ # Check if this is a re-run of the wizard.
+ self.has_run_wizard = QtCore.QSettings().value(
+ u'general/has run wizard', QtCore.QVariant(False)).toBool()
+ if self.has_run_wizard:
+ # Add any existing themes to list.
+ for theme in self.parent().themeManagerContents.getThemes():
+ index = self.themeComboBox.findText(theme)
+ if index == -1:
+ self.themeComboBox.addItem(theme)
+ default_theme = unicode(QtCore.QSettings().value(
+ u'themes/global theme',
+ QtCore.QVariant(u'')).toString())
+ # Pre-select the current default theme.
+ index = self.themeComboBox.findText(default_theme)
+ self.themeComboBox.setCurrentIndex(index)
elif pageId == FirstTimePage.Progress:
+ Receiver.send_message(u'cursor_busy')
self._preWizard()
self._performWizard()
self._postWizard()
+ Receiver.send_message(u'cursor_normal')
def updateScreenListCombo(self):
"""
@@ -249,11 +266,21 @@
"""
if self.max_progress:
self.progressBar.setValue(self.progressBar.maximum())
- self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
- 'Download complete. Click the finish button to start OpenLP.'))
+ if self.has_run_wizard:
+ self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
+ 'Download complete.'
+ ' Click the finish button to return to OpenLP.'))
+ else:
+ self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
+ 'Download complete.'
+ ' Click the finish button to start OpenLP.'))
else:
- self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
- 'Click the finish button to start OpenLP.'))
+ if self.has_run_wizard:
+ self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
+ 'Click the finish button to return to OpenLP.'))
+ else:
+ self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
+ 'Click the finish button to start OpenLP.'))
self.finishButton.setVisible(True)
self.finishButton.setEnabled(True)
self.cancelButton.setVisible(False)
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2011-08-02 19:18:44 +0000
+++ openlp/core/ui/mainwindow.py 2011-08-03 17:58:59 +0000
@@ -749,7 +749,7 @@
return
Receiver.send_message(u'cursor_busy')
screens = ScreenList.get_instance()
- if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
+ if FirstTimeForm(screens, self).exec_() == QtGui.QDialog.Accepted:
self.firstTime()
for plugin in self.pluginManager.plugins:
self.activePlugin = plugin
Follow ups