diff options
Diffstat (limited to 'src/leap/baseapp/mainwindow.py')
-rw-r--r-- | src/leap/baseapp/mainwindow.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index 10b23d9a..55be55f7 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -38,8 +38,11 @@ class LeapWindow(QtGui.QMainWindow, StatusAwareTrayIconMixin.__init__(self) MainWindowMixin.__init__(self) + self.initchecks = InitChecksThread(self.run_eip_checks) + # bind signals - # XXX move to parent classes init?? + self.initchecks.finished.connect( + lambda: logger.debug('Initial checks finished')) self.trayIcon.activated.connect(self.iconActivated) self.newLogLine.connect( lambda line: self.onLoggerNewLine(line)) @@ -50,7 +53,17 @@ class LeapWindow(QtGui.QMainWindow, # ... all ready. go! - # could send "ready" signal instead - # eipapp should catch that - if self.conductor.autostart: - self.start_or_stopVPN() + self.initchecks.begin() + + +class InitChecksThread(QtCore.QThread): + + def __init__(self, fun, parent=None): + QtCore.QThread.__init__(self, parent) + self.fun = fun + + def run(self): + self.fun() + + def begin(self): + self.start() |