From 652df4bf518976132eda1e9fc6b3b06f6ec4ff04 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 4 Feb 2008 23:29:08 +0100 Subject: [PATCH] Remove env.get_shell_dir(), use config --- data/Makefile.am | 1 + {shell => data}/kbdconfig | 0 lib/sugar/env.py | 3 --- shell/Makefile.am | 3 --- shell/config.py.in | 2 +- shell/main.py | 2 +- 6 files changed, 3 insertions(+), 8 deletions(-) rename {shell => data}/kbdconfig (100%) diff --git a/data/Makefile.am b/data/Makefile.am index 887ed4ad..dcf20872 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -9,6 +9,7 @@ sugar-xo.gtkrc: gtkrc.em sugardir = $(pkgdatadir)/data sugar_DATA = \ activities.defaults \ + kbdconfig \ mime.defaults \ $(GTKRC_FILES) diff --git a/shell/kbdconfig b/data/kbdconfig similarity index 100% rename from shell/kbdconfig rename to data/kbdconfig diff --git a/lib/sugar/env.py b/lib/sugar/env.py index 3845a0f8..229b929c 100644 --- a/lib/sugar/env.py +++ b/lib/sugar/env.py @@ -80,8 +80,5 @@ def get_user_library_path(): def get_service_path(name): return _get_sugar_path('services', name) -def get_shell_path(path=None): - return _get_sugar_path('shell', path) - def get_data_path(path=None): return _get_sugar_path('data', path) diff --git a/shell/Makefile.am b/shell/Makefile.am index c1b7f786..7b459602 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -7,7 +7,4 @@ sugar_PYTHON = \ main.py \ shellservice.py -confdir = $(pkgdatadir)/shell -conf_DATA = kbdconfig - EXTRA_DIST = $(bin_SCRIPTS) $(conf_DATA) diff --git a/shell/config.py.in b/shell/config.py.in index ae243ded..c1a7a4ab 100644 --- a/shell/config.py.in +++ b/shell/config.py.in @@ -17,4 +17,4 @@ prefix = '@prefix@' bin_path = '@prefix@/bin' -data_path = '@prefix@/share/sugar' +data_path = '@prefix@/share/sugar/data' diff --git a/shell/main.py b/shell/main.py index 350ce467..f2f1a51e 100644 --- a/shell/main.py +++ b/shell/main.py @@ -45,7 +45,7 @@ def _start_matchbox(): cmd.extend(['-use_titlebar', 'no']) cmd.extend(['-theme', 'sugar']) - cmd.extend(['-kbdconfig', env.get_shell_path('kbdconfig')]) + cmd.extend(['-kbdconfig', os.path.join(config.data_path, 'kbdconfig')]) gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)