forked from openlp/openlp
Fix bug #1194622: skip the Bibles page if the Bibles plugin is not enabled.
bzr-revno: 2155
This commit is contained in:
commit
24a94c0478
@ -26,7 +26,9 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The First Time Wizard
|
||||||
|
"""
|
||||||
import io
|
import io
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -48,6 +50,7 @@ from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
|
|||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ThemeScreenshotThread(QtCore.QThread):
|
class ThemeScreenshotThread(QtCore.QThread):
|
||||||
"""
|
"""
|
||||||
This thread downloads the theme screenshots.
|
This thread downloads the theme screenshots.
|
||||||
@ -56,6 +59,9 @@ class ThemeScreenshotThread(QtCore.QThread):
|
|||||||
QtCore.QThread.__init__(self, parent)
|
QtCore.QThread.__init__(self, parent)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
"""
|
||||||
|
Run the thread.
|
||||||
|
"""
|
||||||
themes = self.parent().config.get(u'themes', u'files')
|
themes = self.parent().config.get(u'themes', u'files')
|
||||||
themes = themes.split(u',')
|
themes = themes.split(u',')
|
||||||
themes_dir = self.parent().config.get(u'themes', u'directory')
|
themes_dir = self.parent().config.get(u'themes', u'directory')
|
||||||
@ -189,6 +195,11 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
return -1
|
return -1
|
||||||
elif self.currentId() == FirstTimePage.NoInternet:
|
elif self.currentId() == FirstTimePage.NoInternet:
|
||||||
return FirstTimePage.Progress
|
return FirstTimePage.Progress
|
||||||
|
elif self.currentId() == FirstTimePage.Songs:
|
||||||
|
if self.bibleCheckBox.isChecked():
|
||||||
|
return FirstTimePage.Bibles
|
||||||
|
else:
|
||||||
|
return FirstTimePage.Themes
|
||||||
elif self.currentId() == FirstTimePage.Themes:
|
elif self.currentId() == FirstTimePage.Themes:
|
||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
@ -395,7 +406,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
self.max_progress += size
|
self.max_progress += size
|
||||||
if self.max_progress:
|
if self.max_progress:
|
||||||
# Add on 2 for plugins status setting plus a "finished" point.
|
# 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.setValue(0)
|
||||||
self.progressBar.setMinimum(0)
|
self.progressBar.setMinimum(0)
|
||||||
self.progressBar.setMaximum(self.max_progress)
|
self.progressBar.setMaximum(self.max_progress)
|
||||||
|
@ -34,7 +34,11 @@ import sys
|
|||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import add_welcome_page
|
from openlp.core.lib.ui import add_welcome_page
|
||||||
|
|
||||||
|
|
||||||
class FirstTimePage(object):
|
class FirstTimePage(object):
|
||||||
|
"""
|
||||||
|
An enumeration object to make it easy for a developer to determine which page is which by index
|
||||||
|
"""
|
||||||
Welcome = 0
|
Welcome = 0
|
||||||
Plugins = 1
|
Plugins = 1
|
||||||
NoInternet = 2
|
NoInternet = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user