diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-07-08 14:57:36 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-07-08 14:57:36 -0300 |
commit | d136315bb987b7624c2fb6883635f8c5f2512270 (patch) | |
tree | dd50706df83e2210f0aea677b24deaa5ea40bebd /src/leap/gui/mainwindow.py | |
parent | 7cba5ebdb8fa4b6c53e7f7d08cfcb9a032e7ac5b (diff) | |
parent | c9c126b67f1a13483075aae680b30813117fbb05 (diff) |
Merge remote-tracking branch 'kali/bug/wizard-hangs' into develop
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r-- | src/leap/gui/mainwindow.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 7180139a..52caf08e 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -310,12 +310,22 @@ class MainWindow(QtGui.QMainWindow): if self._wizard is None: self._wizard = Wizard(bypass_checks=self._bypass_checks) self._wizard.accepted.connect(self._finish_init) + self._wizard.rejected.connect(self._wizard.close) self.setVisible(False) - self._wizard.exec_() - # We need this to process any wizard related event - QtCore.QCoreApplication.processEvents() - self._wizard = None + # Do NOT use exec_, it will use a child event loop! + # Refer to http://www.themacaque.com/?p=1067 for funny details. + self._wizard.show() + self._wizard.finished.connect(self._wizard_finished) + + def _wizard_finished(self): + """ + SLOT + TRIGGERS + self._wizard.finished + + Called when the wizard has finished. + """ self.setVisible(True) def _get_leap_logging_handler(self): |