diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index 0742a92b6..761ec0ceb 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -26,7 +26,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### - +""" +The First Time Wizard +""" import io import logging import os @@ -48,6 +50,7 @@ from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage log = logging.getLogger(__name__) + class ThemeScreenshotThread(QtCore.QThread): """ This thread downloads the theme screenshots. @@ -56,6 +59,9 @@ class ThemeScreenshotThread(QtCore.QThread): QtCore.QThread.__init__(self, parent) def run(self): + """ + Run the thread. + """ themes = self.parent().config.get(u'themes', u'files') themes = themes.split(u',') themes_dir = self.parent().config.get(u'themes', u'directory') @@ -189,6 +195,11 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): return -1 elif self.currentId() == FirstTimePage.NoInternet: return FirstTimePage.Progress + elif self.currentId() == FirstTimePage.Songs: + if self.bibleCheckBox.isChecked(): + return FirstTimePage.Bibles + else: + return FirstTimePage.Themes elif self.currentId() == FirstTimePage.Themes: Receiver.send_message(u'cursor_busy') Receiver.send_message(u'openlp_process_events') @@ -395,7 +406,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): self.max_progress += size if self.max_progress: # Add on 2 for plugins status setting plus a "finished" point. - self.max_progress = self.max_progress + 2 + self.max_progress += 2 self.progressBar.setValue(0) self.progressBar.setMinimum(0) self.progressBar.setMaximum(self.max_progress) diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py index 2ba0bda3c..d792c4f99 100644 --- a/openlp/core/ui/firsttimewizard.py +++ b/openlp/core/ui/firsttimewizard.py @@ -34,7 +34,11 @@ import sys from openlp.core.lib import translate from openlp.core.lib.ui import add_welcome_page + class FirstTimePage(object): + """ + An enumeration object to make it easy for a developer to determine which page is which by index + """ Welcome = 0 Plugins = 1 NoInternet = 2