summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun/last.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-24 01:57:28 +0900
committerkali <kali@leap.se>2013-01-24 01:57:28 +0900
commit407b030bb7d27b797fb27254710a358c9c69f8be (patch)
treeeb600cb7c6cfe33c4f991fb0929e017a0882dd93 /src/leap/gui/firstrun/last.py
parent8226d6032b6db0c15ff70e377f87f4acfdd21787 (diff)
catch missing messages on last page of wizard
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