summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/mainwindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/baseapp/mainwindow.py')
-rw-r--r--src/leap/baseapp/mainwindow.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py
index bc84443..912a51b 100644
--- a/src/leap/baseapp/mainwindow.py
+++ b/src/leap/baseapp/mainwindow.py
@@ -11,6 +11,8 @@ from PyQt4.QtGui import (QMainWindow, QWidget, QVBoxLayout, QMessageBox,
QTextBrowser, qApp)
from PyQt4.QtCore import (pyqtSlot, pyqtSignal, QTimer)
+from leap.base.configuration import Configuration
+
from leap.baseapp.dialogs import ErrorDialog
from leap.eip import exceptions as eip_exceptions
@@ -18,6 +20,9 @@ from leap.eip.eipconnection import EIPConnection
from leap.gui import mainwindow_rc
+#TODO: Get rid of this and do something clever
+DEFAULT_PROVIDER_URL = "http://localhost/definition.json"
+
class LeapWindow(QMainWindow):
#XXX tbd: refactor into model / view / controller
@@ -30,6 +35,8 @@ class LeapWindow(QMainWindow):
super(LeapWindow, self).__init__()
self.debugmode = getattr(opts, 'debug', False)
+ self.configuration = Configuration()
+
self.vpn_service_started = False
self.createWindowHeader()
@@ -81,6 +88,12 @@ class LeapWindow(QMainWindow):
# bunch of self checks.
# XXX move somewhere else alltogether.
#
+ if self.configuration.error is True:
+ dialog = ErrorDialog()
+ dialog.criticalMessage(
+ 'There is a problem with the default '
+ 'definition.json file',
+ 'error')
if self.conductor.missing_provider is True:
dialog = ErrorDialog()