summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun/last.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-24 02:39:34 +0900
committerkali <kali@leap.se>2013-01-24 02:39:34 +0900
commitfea677bb0e3c9ec43353f644879636b9a63a3634 (patch)
treeb53baf5046ed0bd996967bf5d332fb6f83de1f92 /src/leap/gui/firstrun/last.py
parent8226d6032b6db0c15ff70e377f87f4acfdd21787 (diff)
parentff59da55ef9a176b36cef19d67e7ec363bf5d739 (diff)
Merge branch 'feature/fix-connect-page' into develop
Diffstat (limited to 'src/leap/gui/firstrun/last.py')
-rw-r--r--src/leap/gui/firstrun/last.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/leap/gui/firstrun/last.py b/src/leap/gui/firstrun/last.py
index e097b2ae..32d98acc 100644
--- a/src/leap/gui/firstrun/last.py
+++ b/src/leap/gui/firstrun/last.py
@@ -15,7 +15,8 @@ class LastPage(QtGui.QWizardPage):
def __init__(self, parent=None):
super(LastPage, self).__init__(parent)
- self.setTitle(self.tr("Connecting to Encrypted Internet Proxy service..."))
+ self.setTitle(self.tr(
+ "Connecting to Encrypted Internet Proxy service..."))
self.setPixmap(
QtGui.QWizard.LogoPixmap,
@@ -33,6 +34,7 @@ class LastPage(QtGui.QWizardPage):
self.status_line_2 = QtGui.QLabel()
self.status_line_3 = QtGui.QLabel()
self.status_line_4 = QtGui.QLabel()
+ self.status_line_5 = QtGui.QLabel()
layout = QtGui.QVBoxLayout()
layout.addWidget(self.label)
@@ -42,6 +44,7 @@ class LastPage(QtGui.QWizardPage):
layout.addWidget(self.status_line_2)
layout.addWidget(self.status_line_3)
layout.addWidget(self.status_line_4)
+ layout.addWidget(self.status_line_5)
self.setLayout(layout)
@@ -67,7 +70,7 @@ class LastPage(QtGui.QWizardPage):
# signals. See progress.py
logger.debug('logging status in last page')
self.validation_done = False
- status_count = 0
+ status_count = 1
try:
while True:
status = (yield)
@@ -84,11 +87,23 @@ class LastPage(QtGui.QWizardPage):
pass
def initializePage(self):
+ super(LastPage, self).initializePage()
wizard = self.wizard()
- if not wizard:
- return
- eip_status_handler = self.eip_status_handler()
+ handler = self.eip_status_handler()
+
+ # get statuses done in prev page
+ for st in wizard.openvpn_status:
+ self.send_status(handler.send, st)
+
+ # bind signal for events yet to come
eip_statuschange_signal = wizard.eip_statuschange_signal
if eip_statuschange_signal:
eip_statuschange_signal.connect(
- lambda status: eip_status_handler.send(status))
+ lambda status: self.send_status(
+ handler.send, status))
+
+ def send_status(self, cb, status):
+ try:
+ cb(status)
+ except StopIteration:
+ pass