Merge branch 'master' of git://dev.laptop.org/sugar
This commit is contained in:
commit
b9f75c1472
@ -1,4 +1,4 @@
|
|||||||
AC_INIT([Sugar],[0.48],[],[sugar])
|
AC_INIT([Sugar],[0.49],[],[sugar])
|
||||||
|
|
||||||
AC_PREREQ([2.59])
|
AC_PREREQ([2.59])
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ from sugar.activity.bundleregistry import BundleRegistry
|
|||||||
from model.Friends import Friends
|
from model.Friends import Friends
|
||||||
from model.MeshModel import MeshModel
|
from model.MeshModel import MeshModel
|
||||||
from model.Owner import ShellOwner
|
from model.Owner import ShellOwner
|
||||||
|
from sugar import env
|
||||||
|
|
||||||
class ShellModel:
|
class ShellModel:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -40,10 +41,9 @@ class ShellModel:
|
|||||||
path = os.path.expanduser('~/Activities')
|
path = os.path.expanduser('~/Activities')
|
||||||
self._bundle_registry.add_search_path(path)
|
self._bundle_registry.add_search_path(path)
|
||||||
|
|
||||||
if os.environ.has_key('XDG_DATA_DIRS'):
|
for path in env.get_data_dirs():
|
||||||
for path in os.environ['XDG_DATA_DIRS'].split(':'):
|
bundles_path = os.path.join(path, 'activities')
|
||||||
bundles_path = os.path.join(path, 'activities')
|
self._bundle_registry.add_search_path(bundles_path)
|
||||||
self._bundle_registry.add_search_path(bundles_path)
|
|
||||||
|
|
||||||
def get_bundle_registry(self):
|
def get_bundle_registry(self):
|
||||||
return self._bundle_registry
|
return self._bundle_registry
|
||||||
|
@ -60,6 +60,13 @@ def get_dbus_config_094():
|
|||||||
def get_shell_bin_dir():
|
def get_shell_bin_dir():
|
||||||
return sugar_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
|
_dbus_version = None
|
||||||
def get_dbus_version():
|
def get_dbus_version():
|
||||||
global _dbus_version
|
global _dbus_version
|
||||||
|
Loading…
Reference in New Issue
Block a user