SF.net SVN: fclient:[678] trunk/fclient/src/fclient/config.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-19 08:59:28
|
Revision: 678
http://fclient.svn.sourceforge.net/fclient/?rev=678&view=rev
Author: jUrner
Date: 2008-07-19 08:59:28 +0000 (Sat, 19 Jul 2008)
Log Message:
-----------
added icon theme support
Modified Paths:
--------------
trunk/fclient/src/fclient/config.py
Modified: trunk/fclient/src/fclient/config.py
===================================================================
--- trunk/fclient/src/fclient/config.py 2008-07-19 07:49:30 UTC (rev 677)
+++ trunk/fclient/src/fclient/config.py 2008-07-19 08:59:28 UTC (rev 678)
@@ -10,7 +10,7 @@
from PyQt4 import QtCore
from .lib import fcp2
-from .lib.qt4ex.lib import actions, settings
+from .lib.qt4ex.lib import actions, settings, resources
#**********************************************************************************
#
#**********************************************************************************
@@ -22,7 +22,10 @@
FclientCopyright = '(c) 2008 Juergen Urner'
FclientHomepage = 'http://fclient.sourceforge.net/'
-SettingsDir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'settings')
+FclientDir = os.path.dirname(os.path.abspath(__file__))
+FclientDocDir = os.path.join(FclientDir, 'doc')
+FclientResDir = os.path.join(FclientDir, 'res')
+FclientSettingsDir = os.path.join(FclientDir, 'settings')
#**********************************************************************************
# looks like QObject.findChild() does not always work. docs mention troubles
# with MSVC 6 where you should use qFindChild(). can not test this. so keep
@@ -88,8 +91,9 @@
class Settings(SettingsBase):
_key_ = 'ConfigSettings'
_settings_ = (
- ('SettingsDir', 'String', QtCore.QString(SettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
- ('SettingsAllUsers', 'Bool', False, SettingScopeUser), # store settings for all users?
+ ('SettingsDir', 'String', QtCore.QString(FclientSettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
+ ('SettingsAllUsers', 'Bool', False, SettingScopeUser), # store settings for all users?
+ ('IconTheme', 'String', 'crystal', SettingScopeUser),
)
SettingsBase._config_settings_ = Settings()
@@ -98,6 +102,7 @@
#**********************************************************************************
fcpClient = fcp2.Client() # global fcp client
settings = Settings(None) # global settings class
+resources = resources.Resources([FclientResDir, ], )
#**********************************************************************************
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|