SF.net SVN: fclient:[864] trunk/fclient/fclient
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-08-02 13:21:20
|
Revision: 864
http://fclient.svn.sourceforge.net/fclient/?rev=864&view=rev
Author: jUrner
Date: 2008-08-02 13:21:29 +0000 (Sat, 02 Aug 2008)
Log Message:
-----------
save geometry of signle app error dlg
Modified Paths:
--------------
trunk/fclient/fclient/fclient.py
trunk/fclient/fclient/impl/config.py
Modified: trunk/fclient/fclient/fclient.py
===================================================================
--- trunk/fclient/fclient/fclient.py 2008-08-02 11:37:20 UTC (rev 863)
+++ trunk/fclient/fclient/fclient.py 2008-08-02 13:21:29 UTC (rev 864)
@@ -52,18 +52,22 @@
magicToRespond='{2e86f6f1-0707-415d-bfe6-6d485603a98c}'
)
try:
+ #raise singleapp.ErrorCanNotConnect() #<-- uncomment for testing DlgSingleAppError()
singleApp.start()
+
except singleapp.ErrorOtherAppIsRunning:
print 'looks like another %s application is already running' % config.FcAppName
print 'exit'
sys.exit(5)
+
except singleapp.ErrorCanNotConnect:
app = QtGui.QApplication(sys.argv)
dlg = DlgSingleAppError()
+ dlg.restoreGeometry(config.fcSettings.value('DlgSingleAppErrorGeometry'))
dlg.exec_()
-
- else:
- # start gui
+ config.fcSettings.setValues(DlgSingleAppErrorGeometry=dlg.saveGeometry())
+
+ else: # everything went well. start gui
app = QtGui.QApplication(sys.argv)
mainWindow = MainWindow()
singleApp.userData = mainWindow
Modified: trunk/fclient/fclient/impl/config.py
===================================================================
--- trunk/fclient/fclient/impl/config.py 2008-08-02 11:37:20 UTC (rev 863)
+++ trunk/fclient/fclient/impl/config.py 2008-08-02 13:21:29 UTC (rev 864)
@@ -103,6 +103,8 @@
class Settings(SettingsBase):
_key_ = 'ConfigSettings'
_settings_ = (
+ ('DlgSingleAppErrorGeometry', 'ByteArray', QtCore.QByteArray(), SettingScopePrivate),
+
('Version', 'String', QtCore.QString(FcVersion), SettingScopePrivate),
('SingleAppHost', 'String', QtCore.QString('localhost'), SettingScopeExpert),
('SingleAppPort', 'UInt', 45663, SettingScopeExpert),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|