summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--data/data.h.in2
-rw-r--r--src/Makefile.am23
-rw-r--r--src/sbmanager.c8
4 files changed, 24 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 8e09c86..c0082b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,6 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_OUTPUT([
Makefile
-data/data.h
data/Makefile
src/Makefile
])
diff --git a/data/data.h.in b/data/data.h.in
deleted file mode 100644
index 9faaea0..0000000
--- a/data/data.h.in
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BGPIC "@prefix@/share/sbmanager/background.png"
-#define PAGE_DOT "@prefix@/share/sbmanager/dot.png"
diff --git a/src/Makefile.am b/src/Makefile.am
index 7529a0e..90fab74 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,24 @@
-AM_CFLAGS = $(GLOBAL_CFLAGS) $(libiphone_CFLAGS) $(libglib2_CFLAGS) $(libgthread2_CFLAGS) $(libplist_CFLAGS) $(libclutter_CFLAGS) $(libcluttergtk_CFLAGS) $(libgtk_CFLAGS) $(libgdkpixbuf_CFLAGS)
-AM_LDFLAGS = $(libiphone_LIBS) $(libglib2_LIBS) $(libgthread2_LIBS) $(libplist_LIBS) $(libclutter_LIBS) $(libcluttergtk_LIBS) $(libgtk_LIBS) $(libgdkpixbuf_LIBS)
+AM_CFLAGS = \
+ $(GLOBAL_CFLAGS) \
+ $(libiphone_CFLAGS) \
+ $(libglib2_CFLAGS) \
+ $(libgthread2_CFLAGS) \
+ $(libplist_CFLAGS) \
+ $(libclutter_CFLAGS) \
+ $(libcluttergtk_CFLAGS) \
+ $(libgtk_CFLAGS) \
+ $(libgdkpixbuf_CFLAGS) \
+ -DSBMGR_DATA=\"$(pkgdatadir)\"
+
+AM_LDFLAGS = \
+ $(libiphone_LIBS) \
+ $(libglib2_LIBS) \
+ $(libgthread2_LIBS) \
+ $(libplist_LIBS) \
+ $(libclutter_LIBS) \
+ $(libcluttergtk_LIBS) \
+ $(libgtk_LIBS) \
+ $(libgdkpixbuf_LIBS)
bin_PROGRAMS = sbmanager
diff --git a/src/sbmanager.c b/src/sbmanager.c
index a13c9bb..6edb89f 100644
--- a/src/sbmanager.c
+++ b/src/sbmanager.c
@@ -35,8 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <clutter-gtk/clutter-gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include "../data/data.h"
-
#define STAGE_WIDTH 320
#define STAGE_HEIGHT 480
#define DOCK_HEIGHT 90
@@ -1234,7 +1232,7 @@ int main(int argc, char **argv)
GError *err = NULL;
actor = clutter_texture_new();
clutter_texture_set_load_async(CLUTTER_TEXTURE(actor), TRUE);
- clutter_texture_set_from_file(CLUTTER_TEXTURE(actor), BGPIC, &err);
+ clutter_texture_set_from_file(CLUTTER_TEXTURE(actor), SBMGR_DATA "/background.png", &err);
if (err) {
g_error_free(err);
err = NULL;
@@ -1266,9 +1264,9 @@ int main(int argc, char **argv)
/* page indicator (dummy), will be cloned when the pages are created */
page_indicator = clutter_texture_new();
clutter_texture_set_load_async(CLUTTER_TEXTURE(page_indicator), TRUE);
- clutter_texture_set_from_file(CLUTTER_TEXTURE(page_indicator), PAGE_DOT, &err);
+ clutter_texture_set_from_file(CLUTTER_TEXTURE(page_indicator), SBMGR_DATA "/dot.png", &err);
if (err) {
- fprintf(stderr, "Could not load texture " PAGE_DOT ": %s\n", err->message);
+ fprintf(stderr, "Could not load texture " SBMGR_DATA "/dot.png" ": %s\n", err->message);
g_error_free(err);
err = NULL;
}