[gnome-games] [same-gnome-clutter] Reorganize into directories



commit da26f7b74db6e7a9e1fdf5790bc03b99437d1a15
Author: Tim Horton <hortont424 gmail com>
Date:   Sun Jul 5 20:24:36 2009 -0400

    [same-gnome-clutter] Reorganize into directories

 configure.in                                       |    4 ++-
 same-gnome-clutter/Makefile.am                     |   35 ++++++++------------
 .../{same-seed.ui => data/same-gnome.ui}           |    0
 same-gnome-clutter/data/themes/Makefile.am         |    1 +
 same-gnome-clutter/data/themes/tango/Makefile.am   |   17 +++++++++
 same-gnome-clutter/{ => data/themes/tango}/bkg.svg |    0
 .../{ => data/themes/tango}/blue.svg               |    0
 .../{ => data/themes/tango}/green.svg              |    0
 same-gnome-clutter/{ => data/themes/tango}/red.svg |    0
 .../{ => data/themes/tango}/yellow.svg             |    0
 same-gnome-clutter/{ => src}/board.js              |    1 +
 same-gnome-clutter/{light.js.in => src/light.js}   |    4 +-
 same-gnome-clutter/{ => src}/main.js               |    5 +--
 same-gnome-clutter/{ => src}/score.js              |    1 +
 same-gnome-clutter/src/settings.js.in              |    1 +
 15 files changed, 42 insertions(+), 27 deletions(-)
---
diff --git a/configure.in b/configure.in
index dfeb1f0..caa2fda 100644
--- a/configure.in
+++ b/configure.in
@@ -1251,10 +1251,12 @@ iagno/iagno.desktop.in
 gnect/data/gnect.desktop.in
 gnomine/gnomine.desktop.in
 same-gnome-clutter/Makefile
+same-gnome-clutter/data/themes/Makefile
+same-gnome-clutter/data/themes/tango/Makefile
 same-gnome-clutter/same-gnome-clutter
 same-gnome-clutter/same-gnome-clutter.desktop.in
 same-gnome-clutter/same-gnome-clutter-c.desktop.in
-same-gnome-clutter/light.js
+same-gnome-clutter/src/settings.js
 lightsoff/Makefile
 lightsoff/help/Makefile
 lightsoff/src/lightsoff
diff --git a/same-gnome-clutter/Makefile.am b/same-gnome-clutter/Makefile.am
index 6ffe29f..1607dd1 100644
--- a/same-gnome-clutter/Makefile.am
+++ b/same-gnome-clutter/Makefile.am
@@ -1,16 +1,14 @@
+SUBDIRS = data/themes
+
 samedir=$(pkgdatadir)/same-gnome-clutter
 
 same_DATA = \
-    bkg.svg \
-    blue.svg \
-    board.js \
-    green.svg \
-    light.js \
-    main.js \
-    red.svg \
-    same-seed.ui \
-    score.js \
-    yellow.svg
+    src/board.js \
+    src/light.js \
+    src/main.js \
+    data/same-gnome.ui \
+    src/score.js \
+    src/settings.js
 
 same_gnome_clutter_c_SOURCES = same.c
 same_gnome_clutter_c_CFLAGS = `pkg-config --cflags clutter-0.9 glib-2.0`
@@ -27,15 +25,10 @@ desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
 CLEANFILES = $(desktop_DATA)
 
 EXTRA_DIST = \
-    bkg.svg \
-    blue.svg \
-    board.js \
-    green.svg \
-    light.js.in \
-    main.js \
-    red.svg \
-    same-seed.ui \
-    score.js \
-    yellow.svg \
-    same.c
+    src/board.js \
+    src/light.js \
+    src/main.js \
+    data/same-gnome.ui \
+    src/score.js \
+    src/settings.js.in
 
diff --git a/same-gnome-clutter/same-seed.ui b/same-gnome-clutter/data/same-gnome.ui
similarity index 100%
rename from same-gnome-clutter/same-seed.ui
rename to same-gnome-clutter/data/same-gnome.ui
diff --git a/same-gnome-clutter/data/themes/Makefile.am b/same-gnome-clutter/data/themes/Makefile.am
new file mode 100644
index 0000000..4ac00c0
--- /dev/null
+++ b/same-gnome-clutter/data/themes/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = tango
diff --git a/same-gnome-clutter/data/themes/tango/Makefile.am b/same-gnome-clutter/data/themes/tango/Makefile.am
new file mode 100644
index 0000000..fa1efd4
--- /dev/null
+++ b/same-gnome-clutter/data/themes/tango/Makefile.am
@@ -0,0 +1,17 @@
+themedir = $(pkgdatadir)/same-gnome-clutter/themes/tango
+theme_DATA = \
+	bkg.svg \
+	blue.svg \
+	green.svg \
+	red.svg \
+	yellow.svg
+
+EXTRA_DIST = \
+	bkg.svg \
+	blue.svg \
+	green.svg \
+	red.svg \
+	yellow.svg
+
+CLEANFILES = theme.js
+
diff --git a/same-gnome-clutter/bkg.svg b/same-gnome-clutter/data/themes/tango/bkg.svg
similarity index 100%
rename from same-gnome-clutter/bkg.svg
rename to same-gnome-clutter/data/themes/tango/bkg.svg
diff --git a/same-gnome-clutter/blue.svg b/same-gnome-clutter/data/themes/tango/blue.svg
similarity index 100%
rename from same-gnome-clutter/blue.svg
rename to same-gnome-clutter/data/themes/tango/blue.svg
diff --git a/same-gnome-clutter/green.svg b/same-gnome-clutter/data/themes/tango/green.svg
similarity index 100%
rename from same-gnome-clutter/green.svg
rename to same-gnome-clutter/data/themes/tango/green.svg
diff --git a/same-gnome-clutter/red.svg b/same-gnome-clutter/data/themes/tango/red.svg
similarity index 100%
rename from same-gnome-clutter/red.svg
rename to same-gnome-clutter/data/themes/tango/red.svg
diff --git a/same-gnome-clutter/yellow.svg b/same-gnome-clutter/data/themes/tango/yellow.svg
similarity index 100%
rename from same-gnome-clutter/yellow.svg
rename to same-gnome-clutter/data/themes/tango/yellow.svg
diff --git a/same-gnome-clutter/board.js b/same-gnome-clutter/src/board.js
similarity index 99%
rename from same-gnome-clutter/board.js
rename to same-gnome-clutter/src/board.js
index 975c006..15b0856 100644
--- a/same-gnome-clutter/board.js
+++ b/same-gnome-clutter/src/board.js
@@ -3,6 +3,7 @@ GLib = imports.gi.GLib;
 light = imports.light;
 score = imports.score;
 main = imports.main;
+settings = imports.settings;
 
 Board = new GType({
 	parent: Clutter.Group.type,
diff --git a/same-gnome-clutter/light.js.in b/same-gnome-clutter/src/light.js
similarity index 94%
rename from same-gnome-clutter/light.js.in
rename to same-gnome-clutter/src/light.js
index d983f95..b6706df 100644
--- a/same-gnome-clutter/light.js.in
+++ b/same-gnome-clutter/src/light.js
@@ -1,13 +1,13 @@
 Clutter = imports.gi.Clutter;
 GLib = imports.gi.GLib;
 main = imports.main;
+settings = imports.settings;
 
 var tile_svg_size = 50;
-var file_prefix = '@prefix@' + "/share/gnome-games/same-gnome-clutter/";
 
 function load_svg(file)
 {
-    var tx = new Clutter.Texture({filename: file_prefix+file});
+    var tx = new Clutter.Texture({filename: settings.file_prefix+"/themes/tango/" + file});
     tx.filter_quality = Clutter.TextureQuality.HIGH;
     return tx;
 }
diff --git a/same-gnome-clutter/main.js b/same-gnome-clutter/src/main.js
similarity index 92%
rename from same-gnome-clutter/main.js
rename to same-gnome-clutter/src/main.js
index 555702e..b328866 100755
--- a/same-gnome-clutter/main.js
+++ b/same-gnome-clutter/src/main.js
@@ -2,8 +2,6 @@
 
 // Configuration
 
-var file_prefix = "/usr/local/share/gnome-games/same-gnome-clutter";
-
 var tiles_w = 15;
 var tiles_h = 10;
 var tile_size = 50;
@@ -33,9 +31,10 @@ GConf.init(Seed.argv);
 light = imports.light;
 board = imports.board;
 score = imports.score;
+settings = imports.settings;
 
 b = new Gtk.Builder();
-b.add_from_file(file_prefix + "/same-seed.ui");
+b.add_from_file(settings.file_prefix + "/same-gnome.ui");
 //b.connect_signals(handlers);
 
 var window = b.get_object("main_window");
diff --git a/same-gnome-clutter/score.js b/same-gnome-clutter/src/score.js
similarity index 98%
rename from same-gnome-clutter/score.js
rename to same-gnome-clutter/src/score.js
index f7f6ad5..38b53fa 100644
--- a/same-gnome-clutter/score.js
+++ b/same-gnome-clutter/src/score.js
@@ -1,6 +1,7 @@
 Clutter = imports.gi.Clutter;
 Pango = imports.gi.Pango;
 main = imports.main;
+settings = imports.settings;
 
 Score = new GType({
 	parent: Clutter.Group.type,
diff --git a/same-gnome-clutter/src/settings.js.in b/same-gnome-clutter/src/settings.js.in
new file mode 100644
index 0000000..876c78e
--- /dev/null
+++ b/same-gnome-clutter/src/settings.js.in
@@ -0,0 +1 @@
+var file_prefix = '@prefix@' + "/share/gnome-games/same-gnome-clutter/";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]