← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/bug-1194622-2.0 into lp:openlp/2.0

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-1194622-2.0 into lp:openlp/2.0.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1194622 in OpenLP: "[support-system] Traceback when importing bible with disabled bible plugin in FTW"
  https://bugs.launchpad.net/openlp/+bug/1194622

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-1194622-2.0/+merge/180948

Fix bug #1194622: skip the Bibles page if the Bibles plugin is not enabled.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-1194622-2.0/+merge/180948
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-1194622-2.0 into lp:openlp/2.0.
=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py	2013-04-09 09:53:42 +0000
+++ openlp/core/ui/firsttimeform.py	2013-08-19 21:14:43 +0000
@@ -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 @@
 
 log = logging.getLogger(__name__)
 
+
 class ThemeScreenshotThread(QtCore.QThread):
     """
     This thread downloads the theme screenshots.
@@ -56,6 +59,9 @@
         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 @@
             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 @@
                 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)

=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py	2012-12-30 19:41:24 +0000
+++ openlp/core/ui/firsttimewizard.py	2013-08-19 21:14:43 +0000
@@ -34,7 +34,11 @@
 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


Follow ups