From: Ed Page Date: Sat, 16 Oct 2010 20:42:43 +0000 (-0500) Subject: Delaying the login so the screen can at least showing, improving the perceived perfor... X-Git-Url: http://git.maemo.org/git/?a=commitdiff_plain;h=9c235a7397f7b55a1698e718f0687f028447fd59;p=gc-dialer Delaying the login so the screen can at least showing, improving the perceived performance --- diff --git a/src/dialcentral_qt.py b/src/dialcentral_qt.py index a0bdb7f..148732a 100755 --- a/src/dialcentral_qt.py +++ b/src/dialcentral_qt.py @@ -54,8 +54,15 @@ class Dialcentral(object): self._app.lastWindowClosed.connect(self._on_app_quit) self._mainWindow = MainWindow(None, self) self._mainWindow.window.destroyed.connect(self._on_child_close) + self.load_settings() - self._mainWindow.start() + + self._mainWindow.show() + self._idleDelay = QtCore.QTimer() + self._idleDelay.setSingleShot(True) + self._idleDelay.setInterval(0) + self._idleDelay.timeout.connect(lambda: self._mainWindow.start()) + self._idleDelay.start() def load_settings(self): try: @@ -399,7 +406,6 @@ class MainWindow(object): def start(self): assert self._session.state == self._session.LOGGEDOUT_STATE - self.show() if self._defaultCredentials != ("", ""): username, password = self._defaultCredentials[0], self._defaultCredentials[1] self._curentCredentials = username, password