summaryrefslogtreecommitdiff
path: root/src/leap/baseapp
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-12 04:26:16 +0900
committerkali <kali@leap.se>2012-12-12 04:26:16 +0900
commitb262ac8bae66c391aa249e93268db9935f1c475f (patch)
tree3d39b48495fbcfbfeab776af07558c345f4161cb /src/leap/baseapp
parentcd78d9d552977e8f8fb12b6a2ff56fda9c37bf35 (diff)
parent04d423e2a89034dfb86fe305108162fd2a696079 (diff)
Merge branch 'feature/openvpn-ciphers' into develop
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r--src/leap/baseapp/leap_app.py2
-rw-r--r--src/leap/baseapp/mainwindow.py9
-rw-r--r--src/leap/baseapp/network.py7
-rw-r--r--src/leap/baseapp/systray.py2
4 files changed, 15 insertions, 5 deletions
diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py
index e41cff40..4d3aebd6 100644
--- a/src/leap/baseapp/leap_app.py
+++ b/src/leap/baseapp/leap_app.py
@@ -148,6 +148,6 @@ class MainWindowMixin(object):
# in conductor
# XXX send signal instead?
logger.info('Shutting down')
- self.conductor.cleanup(shutdown=True)
+ self.conductor.disconnect(shutdown=True)
logger.info('Exiting. Bye.')
QtGui.qApp.quit()
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py
index 8d61bf5c..65c30bff 100644
--- a/src/leap/baseapp/mainwindow.py
+++ b/src/leap/baseapp/mainwindow.py
@@ -61,10 +61,15 @@ class LeapWindow(QtGui.QMainWindow,
logger.debug('provider: %s', self.provider_domain)
logger.debug('eip_username: %s', self.eip_username)
+ provider = self.provider_domain
EIPConductorAppMixin.__init__(
- self, opts=opts, provider=self.provider_domain)
+ self, opts=opts, provider=provider)
StatusAwareTrayIconMixin.__init__(self)
- NetworkCheckerAppMixin.__init__(self)
+
+ # XXX network checker should probably not
+ # trigger run_checks on init... but wait
+ # for ready signal instead...
+ NetworkCheckerAppMixin.__init__(self, provider=provider)
MainWindowMixin.__init__(self)
geom_key = "DebugGeometry" if self.debugmode else "Geometry"
diff --git a/src/leap/baseapp/network.py b/src/leap/baseapp/network.py
index 077d5164..3e57490d 100644
--- a/src/leap/baseapp/network.py
+++ b/src/leap/baseapp/network.py
@@ -17,11 +17,14 @@ class NetworkCheckerAppMixin(object):
"""
def __init__(self, *args, **kwargs):
+ provider = kwargs.pop('provider', None)
self.network_checker = NetworkCheckerThread(
error_cb=self.networkError.emit,
- debug=self.debugmode)
+ debug=self.debugmode,
+ provider=provider)
- # XXX move run_checks to slot
+ # XXX move run_checks to slot -- this definitely
+ # cannot start on init!!!
self.network_checker.run_checks()
@QtCore.pyqtSlot(object)
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index 49f044aa..52060ae2 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -217,6 +217,8 @@ class StatusAwareTrayIconMixin(object):
updates icon, according to the openvpn status change.
"""
icon_name = self.conductor.get_icon_name()
+ if not icon_name:
+ return
# XXX refactor. Use QStateMachine