Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2006-11-05 17:51:05 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2006-11-05 17:51:05 (GMT)
commitb9f75c14727b30b9cd07b18c2c15f15d71201bb4 (patch)
tree2fcea64a1f196b2dbaa436bc264b66686462a7e2
parent2ad31b35d1f5729fb14fb515529a8f3c1227cf42 (diff)
parent62ad1539c2650c0faf9542fd9e0a18287d3de7b3 (diff)
Merge branch 'master' of git://dev.laptop.org/sugar
-rw-r--r--configure.ac2
-rw-r--r--shell/model/ShellModel.py8
-rw-r--r--sugar/env.py7
3 files changed, 12 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 1895530..78ab43f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([Sugar],[0.48],[],[sugar])
+AC_INIT([Sugar],[0.49],[],[sugar])
AC_PREREQ([2.59])
diff --git a/shell/model/ShellModel.py b/shell/model/ShellModel.py
index e87dc12..54b7ebc 100644
--- a/shell/model/ShellModel.py
+++ b/shell/model/ShellModel.py
@@ -21,6 +21,7 @@ from sugar.activity.bundleregistry import BundleRegistry
from model.Friends import Friends
from model.MeshModel import MeshModel
from model.Owner import ShellOwner
+from sugar import env
class ShellModel:
def __init__(self):
@@ -40,10 +41,9 @@ class ShellModel:
path = os.path.expanduser('~/Activities')
self._bundle_registry.add_search_path(path)
- if os.environ.has_key('XDG_DATA_DIRS'):
- for path in os.environ['XDG_DATA_DIRS'].split(':'):
- bundles_path = os.path.join(path, 'activities')
- self._bundle_registry.add_search_path(bundles_path)
+ for path in env.get_data_dirs():
+ bundles_path = os.path.join(path, 'activities')
+ self._bundle_registry.add_search_path(bundles_path)
def get_bundle_registry(self):
return self._bundle_registry
diff --git a/sugar/env.py b/sugar/env.py
index 209f346..0c996b4 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -60,6 +60,13 @@ def get_dbus_config_094():
def get_shell_bin_dir():
return sugar_shell_bin_dir
+# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
+def get_data_dirs():
+ if os.environ.has_key('XDG_DATA_DIRS'):
+ return os.environ['XDG_DATA_DIRS'].split(':')
+ else:
+ return [ '/usr/local/share/', '/usr/share/' ]
+
_dbus_version = None
def get_dbus_version():
global _dbus_version