[GRASS-SVN] r49711 - grass/branches/develbranch_6/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 13 08:02:37 EST 2011
Author: martinl
Date: 2011-12-13 05:02:36 -0800 (Tue, 13 Dec 2011)
New Revision: 49711
Modified:
grass/branches/develbranch_6/gui/wxpython/core/settings.py
Log:
wxGUI/settings: clean up Settings constructor
Modified: grass/branches/develbranch_6/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/core/settings.py 2011-12-13 12:58:29 UTC (rev 49710)
+++ grass/branches/develbranch_6/gui/wxpython/core/settings.py 2011-12-13 13:02:36 UTC (rev 49711)
@@ -36,14 +36,27 @@
# key/value separator
self.sep = ';'
+ # define default settings
+ self._defaultSettings() # -> self.defaultSettings
+
+ # read settings from the file
+ self.userSettings = copy.deepcopy(self.defaultSettings)
try:
+ self.ReadSettingsFile()
+ except GException, e:
+ print >> sys.stderr, e.value
+
+ # define internal settings
+ self._internalSettings() # -> self.internalSettings
+
+ def _defaultSettings(self):
+ """!Define default settings
+ """
+ try:
projFile = PathJoin(os.environ["GRASS_PROJSHARE"], 'epsg')
except KeyError:
projFile = ''
- #
- # default settings
- #
self.defaultSettings = {
#
# general
@@ -633,19 +646,10 @@
# TODO
if sys.platform == 'darwin':
self.defaultSettings['general']['defWindowPos']['enabled'] = False
-
- #
- # user settings
- #
- self.userSettings = copy.deepcopy(self.defaultSettings)
- try:
- self.ReadSettingsFile()
- except GException, e:
- print >> sys.stderr, e.value
- #
- # internal settings (based on user settings)
- #
+ def _internalSettings(self):
+ """!Define internal settings (based on user settings)
+ """
self.internalSettings = {}
for group in self.userSettings.keys():
self.internalSettings[group] = {}
More information about the grass-commit
mailing list