This commit is contained in:
Andreas Preikschat 2011-03-09 18:19:49 +01:00
commit 42740f4b28
2 changed files with 10 additions and 5 deletions

View File

@ -66,6 +66,9 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
'Starting Updates') 'Starting Updates')
self.downloading = unicode(translate('OpenLP.FirstTimeWizard', self.downloading = unicode(translate('OpenLP.FirstTimeWizard',
'Downloading %s')) 'Downloading %s'))
QtCore.QObject.connect(self,
QtCore.SIGNAL(u'currentIdChanged(int)'),
self.onCurrentIdChanged)
def exec_(self, edit=False): def exec_(self, edit=False):
""" """
@ -116,12 +119,12 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
child.setFlags(QtCore.Qt.ItemIsUserCheckable | child.setFlags(QtCore.Qt.ItemIsUserCheckable |
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
def initializePage(self, id): def onCurrentIdChanged(self, pageId):
""" """
Set up the pages for Initial run through dialog Detects Page changes and updates as approprate.
""" """
wizardPage = self.page(id) if self.page(pageId) == self.DefaultsPage:
if wizardPage == self.DefaultsPage: self.themeSelectionComboBox.clear()
listIterator = QtGui.QTreeWidgetItemIterator( listIterator = QtGui.QTreeWidgetItemIterator(
self.selectionTreeWidget) self.selectionTreeWidget)
while listIterator.value(): while listIterator.value():
@ -134,6 +137,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
listIterator += 1 listIterator += 1
def accept(self): def accept(self):
Receiver.send_message(u'cursor_busy')
self._updateMessage(self.startUpdates) self._updateMessage(self.startUpdates)
# Set up the Plugin status's # Set up the Plugin status's
self._pluginStatus(self.songsCheckBox, u'songs/status') self._pluginStatus(self.songsCheckBox, u'songs/status')
@ -197,6 +201,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
QtCore.QVariant(self.themeSelectionComboBox.currentText())) QtCore.QVariant(self.themeSelectionComboBox.currentText()))
QtCore.QSettings().setValue(u'general/first time', QtCore.QSettings().setValue(u'general/first time',
QtCore.QVariant(False)) QtCore.QVariant(False))
Receiver.send_message(u'cursor_normal')
return QtGui.QWizard.accept(self) return QtGui.QWizard.accept(self)
def _pluginStatus(self, field, tag): def _pluginStatus(self, field, tag):

View File

@ -224,4 +224,4 @@ class Ui_FirstTimeWizard(object):
self.themeSelectionLabel.setText(translate('OpenLP.FirstTimeWizard', self.themeSelectionLabel.setText(translate('OpenLP.FirstTimeWizard',
'Select the default Theme')) 'Select the default Theme'))
self.messageLabel.setText(translate('OpenLP.FirstTimeWizard', self.messageLabel.setText(translate('OpenLP.FirstTimeWizard',
'Press Finish to apply all you changes and start OpenLP')) 'Press finish to apply all your changes and start OpenLP'))