From ac67079632fb96d9da463e0cc9f2367b0ba6886e Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 24 Oct 2012 01:16:05 +0900 Subject: save geometry (was badly merged) --- src/leap/baseapp/leap_app.py | 4 ++-- src/leap/baseapp/mainwindow.py | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py index 6ffb08a8..d1acb8ba 100644 --- a/src/leap/baseapp/leap_app.py +++ b/src/leap/baseapp/leap_app.py @@ -127,8 +127,8 @@ class MainWindowMixin(object): "context menu of the system tray entry.") self.hide() event.ignore() - if self.debugmode: - self.cleanupAndQuit() + return + self.cleanupAndQuit() def cleanupAndQuit(self): """ diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index 3b6cb544..df7159ce 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -48,17 +48,18 @@ class LeapWindow(QtGui.QMainWindow, if self.debugmode: self.createLogBrowser() - EIPConductorAppMixin.__init__(self, opts=opts) + settings = QtCore.QSettings() + provider_domain = settings.value("provider_domain", None) + logger.debug('provider: %s', provider_domain) + + EIPConductorAppMixin.__init__( + self, opts=opts, provider=provider_domain) StatusAwareTrayIconMixin.__init__(self) NetworkCheckerAppMixin.__init__(self) MainWindowMixin.__init__(self) - settings = QtCore.QSettings() - geom_key = "DebugGeometry" if self.debugmode else "Geometry" geom = settings.value(geom_key) - - geom = settings.value("Geometry") if geom: self.restoreGeometry(geom) self.wizard_done = settings.value("FirstRunWizardDone") -- cgit v1.2.3