summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/leap_app.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-05 04:10:50 +0900
committerkali <kali@leap.se>2012-10-05 04:10:50 +0900
commit51dee24be94567334dfb8765cbd3bb23dcae9ee3 (patch)
tree353978aa2f7fb3b51791ffbcf62bacea8e9c947a /src/leap/baseapp/leap_app.py
parentc06d7e25649cc76dfe7418a520dc823270a3191f (diff)
init QSettings - save window geometry
Diffstat (limited to 'src/leap/baseapp/leap_app.py')
-rw-r--r--src/leap/baseapp/leap_app.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py
index 98ca292e..49f7ceda 100644
--- a/src/leap/baseapp/leap_app.py
+++ b/src/leap/baseapp/leap_app.py
@@ -1,5 +1,9 @@
import logging
+import sip
+sip.setapi('QVariant', 2)
+
+from PyQt4 import QtCore
from PyQt4 import QtGui
from leap.gui import mainwindow_rc
@@ -35,7 +39,7 @@ class MainWindowMixin(object):
self.setWindowTitle("LEAP Client")
self.set_app_icon()
- self.resize(400, 300)
+ #self.resize(400, 300)
self.set_statusbarMessage('ready')
logger.debug('set ready.........')
@@ -88,6 +92,10 @@ class MainWindowMixin(object):
"""
cleans state before shutting down app.
"""
+ # save geometry for restoring
+ settings = QtCore.QSettings()
+ settings.setValue("Geometry", self.saveGeometry())
+
# TODO:make sure to shutdown all child process / threads
# in conductor
# XXX send signal instead?