Framework fine

This commit is contained in:
Tim Bentley 2011-02-26 15:19:43 +00:00
parent 36534f3496
commit d7a56667a4
2 changed files with 26 additions and 4 deletions

View File

@ -173,10 +173,13 @@ class OpenLP(QtGui.QApplication):
self.setApplicationVersion(app_version[u'version'])
if os.name == u'nt':
self.setStyleSheet(application_stylesheet)
print "1"
# First time checks in settings
if QtCore.QSettings().value(
u'general/first time', QtCore.QVariant(True)).toBool():
FirstTimeForm() #.exec_()
FirstTimeForm().exec_()
# make sure Qt really display the splash screen
self.processEvents()
show_splash = QtCore.QSettings().value(
u'general/show splash', QtCore.QVariant(True)).toBool()
if show_splash:
@ -207,13 +210,17 @@ class OpenLP(QtGui.QApplication):
return self.exec_()
def hookException(self, exctype, value, traceback):
print "a"
if not hasattr(self, u'mainWindow'):
log.exception(''.join(format_exception(exctype, value, traceback)))
return
print "b"
if not hasattr(self, u'exceptionForm'):
self.exceptionForm = ExceptionForm(self.mainWindow)
print "c"
self.exceptionForm.exceptionTextEdit.setPlainText(
''.join(format_exception(exctype, value, traceback)))
print "d"
self.setNormalCursor()
self.exceptionForm.exec_()

View File

@ -24,16 +24,31 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
import logging
from PyQt4 import QtGui
#from filerenamedialog import Ui_FileRenameDialog
from firsttimewizard import Ui_FirstTimeWizard
from openlp.core.lib import translate
from openlp.core.utils import get_web_page
class FirstTimeForm():#QtGui.QDialog, Ui_FileRenameDialog):
log = logging.getLogger(__name__)
def __init__(self):
class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
"""
This is the Theme Import Wizard, which allows easy creation and editing of
OpenLP themes.
"""
log.info(u'ThemeWizardForm loaded')
def __init__(self, parent=None):
# check to see if we have web access
self.WebAccess = get_web_page(u'http://openlp.org1')
print self.WebAccess
QtGui.QWizard.__init__(self, parent)
self.setupUi(self)
#self.registerFields()
def accept(self):
return QtGui.QWizard.accept(self)