From 48792fa7c25530776b871098fd07b600bfc976ba Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 10 Oct 2012 05:03:31 +0900 Subject: fix connect/disconnect button in debug mode Closes #730 --- src/leap/baseapp/eip.py | 4 ---- src/leap/baseapp/mainwindow.py | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/leap') diff --git a/src/leap/baseapp/eip.py b/src/leap/baseapp/eip.py index 311470f2..22dc0dd7 100644 --- a/src/leap/baseapp/eip.py +++ b/src/leap/baseapp/eip.py @@ -55,10 +55,6 @@ class EIPConductorAppMixin(object): skip_verify=self.skip_verify) self.error_check() - if self.debugmode: - self.startStopButton.clicked.connect( - lambda: self.start_or_stopVPN()) - # XXX should send ready signal instead if self.conductor.autostart: self.start_or_stopVPN() diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index bf42f0e7..2348c27d 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -50,6 +50,9 @@ class LeapWindow(QtGui.QMainWindow, MainWindowMixin.__init__(self) settings = QtCore.QSettings() + # XXX geom_key = "DebugGeometry" if self.debugmode else "Geometry" + #geom = settings.value(geom_key) + geom = settings.value("Geometry") if geom: self.restoreGeometry(geom) @@ -68,6 +71,10 @@ class LeapWindow(QtGui.QMainWindow, self.networkError.connect( lambda exc: self.onNetworkError(exc)) + if self.debugmode: + self.startStopButton.clicked.connect( + lambda: self.start_or_stopVPN()) + # status change. # TODO unify self.statusChange.connect( -- cgit v1.2.3