diff options
author | kali <kali@leap.se> | 2012-10-08 09:32:34 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-10-08 09:32:34 +0900 |
commit | 479710e977327774b9ba9e1839f75b4a38b51e5f (patch) | |
tree | 120019de26461534c32c39f19777ed3be5084082 /src/leap/baseapp/mainwindow.py | |
parent | bf8c6b19b05e73a6e59b8884e1d26a730df6188b (diff) |
add leap-status to main window in non-debug mode
not very DRY but just to have it ready for rc cut.
Diffstat (limited to 'src/leap/baseapp/mainwindow.py')
-rw-r--r-- | src/leap/baseapp/mainwindow.py | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index 09e0c0bb..bf42f0e7 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -10,7 +10,6 @@ from leap.baseapp.log import LogPaneMixin from leap.baseapp.systray import StatusAwareTrayIconMixin from leap.baseapp.network import NetworkCheckerAppMixin from leap.baseapp.leap_app import MainWindowMixin -from leap.baseapp import dialogs logger = logging.getLogger(name=__name__) @@ -28,11 +27,16 @@ class LeapWindow(QtGui.QMainWindow, """ newLogLine = QtCore.pyqtSignal([str]) - statusChange = QtCore.pyqtSignal([object]) mainappReady = QtCore.pyqtSignal([]) initReady = QtCore.pyqtSignal([]) networkError = QtCore.pyqtSignal([object]) + # XXX fix nomenclature here + # this is eip status change got from vpn management + statusChange = QtCore.pyqtSignal([object]) + # this is global leap status + changeLeapStatus = QtCore.pyqtSignal([str]) + def __init__(self, opts): logger.debug('init leap window') self.debugmode = getattr(opts, 'debug', False) @@ -59,13 +63,18 @@ class LeapWindow(QtGui.QMainWindow, self.trayIcon.activated.connect(self.iconActivated) self.newLogLine.connect( lambda line: self.onLoggerNewLine(line)) - self.statusChange.connect( - lambda status: self.onStatusChange(status)) self.timer.timeout.connect( lambda: self.onTimerTick()) self.networkError.connect( lambda exc: self.onNetworkError(exc)) + # status change. + # TODO unify + self.statusChange.connect( + lambda status: self.onStatusChange(status)) + self.changeLeapStatus.connect( + lambda newstatus: self.onChangeLeapConnStatus(newstatus)) + # do frwizard and init signals self.mainappReady.connect(self.do_first_run_wizard_check) self.initReady.connect(self.runchecks_and_eipconnect) @@ -100,25 +109,5 @@ class InitChecksThread(QtCore.QThread): def run(self): self.fun() -#<<<<<<< HEAD def begin(self): self.start() -#======= - # could send "ready" signal instead - # eipapp should catch that - #if self.conductor.autostart: - #self.start_or_stopVPN() -# - #TODO: Put all Dialogs in one place - #@QtCore.pyqtSlot() - #def raise_Network_Error(self, exc): - #message = exc.message -# - # XXX - # check headless = False before - # launching dialog. - # (so Qt tests can assert stuff) -# - #dialog = dialogs.ErrorDialog() - #dialog.warningMessage(message, 'error') -#>>>>>>> feature/network_check |