From a380b7f915ca32293315176027f835fb739bb86b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 9 Mar 2007 14:07:17 +0100 Subject: [PATCH] Move data to be relative to the code. --- shell/data/Makefile.am | 5 +---- shell/intro/Makefile.am | 4 ++++ shell/{data => intro}/default-picture.png | Bin shell/intro/intro.py | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) rename shell/{data => intro}/default-picture.png (100%) diff --git a/shell/data/Makefile.am b/shell/data/Makefile.am index 2709c921..1f0f9c05 100644 --- a/shell/data/Makefile.am +++ b/shell/data/Makefile.am @@ -1,7 +1,4 @@ confdir = $(pkgdatadir) conf_DATA = kbdconfig -imagedir = $(pkgdatadir) -image_DATA = default-picture.png - -EXTRA_DIST = $(conf_DATA) $(image_DATA) +EXTRA_DIST = $(conf_DATA) diff --git a/shell/intro/Makefile.am b/shell/intro/Makefile.am index cc11aa90..3b92ea0a 100644 --- a/shell/intro/Makefile.am +++ b/shell/intro/Makefile.am @@ -1,3 +1,7 @@ +imagedir = $(pkgdatadir)/shell/intro +image_DATA = default-picture.png + +EXTRA_DIST = $(conf_DATA) $(image_DATA) sugardir = $(pkgdatadir)/shell/intro sugar_PYTHON = \ __init__.py \ diff --git a/shell/data/default-picture.png b/shell/intro/default-picture.png similarity index 100% rename from shell/data/default-picture.png rename to shell/intro/default-picture.png diff --git a/shell/intro/intro.py b/shell/intro/intro.py index 55aa1354..cdcc2a3d 100644 --- a/shell/intro/intro.py +++ b/shell/intro/intro.py @@ -143,7 +143,8 @@ class VideoBox(hippo.CanvasBox, hippo.CanvasItem): self._img_widget.props.widget = self._img if not has_webcam: - path = os.path.join(env.get_data_dir(),'default-picture.png') + path = os.path.join(os.path.dirname(__file__), + 'default-picture.png') self._video.load_image(path) def _clear_image_cb(self, widget, event):