summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/mainwindow.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-24 01:01:06 +0900
committerkali <kali@leap.se>2012-08-24 01:01:06 +0900
commitc2955d9655e3e7ccb3c5fc9e7d00a0d493d48a40 (patch)
treeff21bf162a97b0cc448775d597b619226f191dfc /src/leap/baseapp/mainwindow.py
parentbd154da54eb022d12d225a84cea1053f868eab56 (diff)
parentdc10833bedcdecf081a7c79678614c5521445164 (diff)
Merge branch 'get-definition.json' into providers-static
adjusted some loose ends to make tests pass again. this merge is still half-baked regarding functionality: I've left in place old Configuration class used by some tests antialias did on his branch. I plan to merge that functionality with the more recent JSONConfig and Spec classes. Conflicts: src/leap/base/configuration.py src/leap/eip/config.py src/leap/eip/tests/test_config.py
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 bc844437..912a51b6 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()