summaryrefslogtreecommitdiff
path: root/src/leap/baseapp
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-24 06:49:51 +0900
committerkali <kali@leap.se>2012-10-24 06:49:51 +0900
commitff02a21ed6ef879c054b01134744068bdfeda664 (patch)
tree5c2a934139f980e7c5b331c0944ff6221cdc72c6 /src/leap/baseapp
parent691b40fd6d593d1b9af316d1108258f02a305a70 (diff)
last page of wizard displays the connection steps
Diffstat (limited to 'src/leap/baseapp')
-rw-r--r--src/leap/baseapp/eip.py4
-rw-r--r--src/leap/baseapp/mainwindow.py24
-rw-r--r--src/leap/baseapp/systray.py14
3 files changed, 20 insertions, 22 deletions
diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py
index 26a2a1fb..54acbc0e 100644
--- a/src/leap/baseapp/eip.py
+++ b/src/leap/baseapp/eip.py
@@ -37,8 +37,8 @@ class EIPConductorAppMixin(object):
self.conductor = EIPConnection(
watcher_cb=self.newLogLine.emit,
config_file=config_file,
- checker_signals=(self.changeLeapStatus.emit, ),
- status_signals=(self.statusChange.emit, ),
+ checker_signals=(self.eipStatusChange.emit, ),
+ status_signals=(self.openvpnStatusChange.emit, ),
debug=self.debugmode,
ovpn_verbosity=opts.openvpn_verb,
provider=provider)
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py
index 752dba51..c5f956fb 100644
--- a/src/leap/baseapp/mainwindow.py
+++ b/src/leap/baseapp/mainwindow.py
@@ -35,12 +35,10 @@ class LeapWindow(QtGui.QMainWindow,
triggerEIPError = QtCore.pyqtSignal([object])
start_eipconnection = QtCore.pyqtSignal([])
- # XXX fix nomenclature here:
- # eipStatusChange vs. leapStatusChange
- # this is eip status change got from vpn management
- statusChange = QtCore.pyqtSignal([object])
- # this is global leap status
- changeLeapStatus = QtCore.pyqtSignal([str])
+ # this is status change got from openvpn management
+ openvpnStatusChange = QtCore.pyqtSignal([object])
+ # this is global eip status
+ eipStatusChange = QtCore.pyqtSignal([str])
def __init__(self, opts):
logger.debug('init leap window')
@@ -93,10 +91,10 @@ class LeapWindow(QtGui.QMainWindow,
# status change.
# TODO unify
- self.statusChange.connect(
- lambda status: self.onStatusChange(status))
- self.changeLeapStatus.connect(
- lambda newstatus: self.onChangeLeapConnStatus(newstatus))
+ self.openvpnStatusChange.connect(
+ lambda status: self.onOpenVPNStatusChange(status))
+ self.eipStatusChange.connect(
+ lambda newstatus: self.onEIPConnStatusChange(newstatus))
# do first run wizard and init signals
self.mainappReady.connect(self.do_first_run_wizard_check)
@@ -109,10 +107,9 @@ class LeapWindow(QtGui.QMainWindow,
def do_first_run_wizard_check(self):
"""
checks whether first run wizard needs to be run
- launches it if needed (with initReady signal as a success callback)
+ launches it if needed
and emits initReady signal if not.
"""
- # XXX change DOC string after I remove the success callbac!!!
logger.debug('first run wizard check...')
need_wizard = False
@@ -130,7 +127,8 @@ class LeapWindow(QtGui.QMainWindow,
self.conductor,
parent=self,
eip_username=self.eip_username,
- start_eipconnection_signal=self.start_eipconnection)
+ start_eipconnection_signal=self.start_eipconnection,
+ eip_statuschange_signal=self.eipStatusChange)
wizard.show()
else: # no wizard needed
logger.debug('running first run wizard')
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index cc5d89df..061de98e 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -196,31 +196,31 @@ class StatusAwareTrayIconMixin(object):
self.statusUpdate()
@QtCore.pyqtSlot(object)
- def onStatusChange(self, status):
+ def onOpenVPNStatusChange(self, status):
"""
- updates icon
+ updates icon, according to the openvpn status change.
"""
icon_name = self.conductor.get_icon_name()
# XXX refactor. Use QStateMachine
if icon_name in ("disconnected", "connected"):
- self.changeLeapStatus.emit(icon_name)
+ self.eipStatusChange.emit(icon_name)
if icon_name in ("connecting"):
# let's see how it matches
leap_status_name = self.conductor.get_leap_status()
- self.changeLeapStatus.emit(leap_status_name)
+ self.eipStatusChange.emit(leap_status_name)
self.setIcon(icon_name)
# change connection pixmap widget
self.setConnWidget(icon_name)
@QtCore.pyqtSlot(str)
- def onChangeLeapConnStatus(self, newstatus):
+ def onEIPConnStatusChange(self, newstatus):
"""
- slot for LEAP status changes
- not to be confused with onStatusChange.
+ slot for EIP status changes
+ not to be confused with onOpenVPNStatusChange.
this only updates the non-debug LEAP Status line
next to the connection icon.
"""