Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2008-02-04 18:16:46 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2008-02-04 18:16:46 (GMT)
commit1c361ea5dd1349ddcb95e21de91a0aa036415ff7 (patch)
treec90860701e52f84d8a346ae58e3620f0662cd0f3
parentb3cc0bec550378fa5eb9b6b2983defdd1037be78 (diff)
Add a config module into the shell holding path informations.
Get rid of env.get_locale_path()
-rwxr-xr-xbin/sugar-shell5
-rw-r--r--configure.ac5
-rw-r--r--lib/sugar/env.py3
-rw-r--r--shell/Makefile.am1
4 files changed, 9 insertions, 5 deletions
diff --git a/bin/sugar-shell b/bin/sugar-shell
index ef69fc1..b8f44a3 100755
--- a/bin/sugar-shell
+++ b/bin/sugar-shell
@@ -41,6 +41,7 @@ from shellservice import ShellService
from hardware import hardwaremanager
from intro import intro
import logsmanager
+import config
def _start_matchbox():
cmd = ['matchbox-window-manager']
@@ -68,8 +69,10 @@ def _save_session_info():
f.close()
def _setup_translations():
+ locale_path = os.path.join(config.prefix, 'share', 'locale')
domain = 'sugar'
- gettext.bindtextdomain(domain, env.get_locale_path())
+
+ gettext.bindtextdomain(domain, locale_path)
gettext.textdomain(domain)
def check_cm(bus_name):
diff --git a/configure.ac b/configure.ac
index 930f6b6..b8d9828 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,10 @@ AC_ARG_ENABLE(update-mimedb,
enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
-AC_CONFIG_FILES([bin/sugar], [chmod +x sugar])
+AC_CONFIG_FILES([
+bin/sugar
+shell/config.py
+], [chmod +x sugar])
AC_OUTPUT([
Makefile
diff --git a/lib/sugar/env.py b/lib/sugar/env.py
index a067cb8..3845a0f 100644
--- a/lib/sugar/env.py
+++ b/lib/sugar/env.py
@@ -77,9 +77,6 @@ def get_user_activities_path():
def get_user_library_path():
return os.path.expanduser('~/Library')
-def get_locale_path(path=None):
- return get_prefix_path('share/locale', path)
-
def get_service_path(name):
return _get_sugar_path('services', name)
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 4c9eac9..e3e9710 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -2,6 +2,7 @@ SUBDIRS = controlpanel hardware model view intro
sugardir = $(pkgdatadir)/shell
sugar_PYTHON = \
+ config.py \
logsmanager.py \
shellservice.py