[gnome-games] [lightsoff] Reduce the number of templated javascript files



commit a58d26f523aa32013480133ef7344fbb6779442c
Author: Tim Horton <hortont424 gmail com>
Date:   Sat Jul 11 22:00:03 2009 -0400

    [lightsoff] Reduce the number of templated javascript files

 configure.in                                       |    4 +---
 lightsoff/Makefile.am                              |    4 +++-
 lightsoff/data/themes/tango/Makefile.am            |    2 +-
 .../data/themes/tango/{theme.js.in => theme.js}    |    2 +-
 lightsoff/data/themes/up/Makefile.am               |    4 +---
 lightsoff/data/themes/up/{theme.js.in => theme.js} |    2 +-
 lightsoff/src/About.js                             |    2 +-
 lightsoff/src/Settings.js                          |    2 +-
 lightsoff/src/{main.js.in => main.js}              |    4 ++--
 9 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/configure.in b/configure.in
index caa2fda..31db02f 100644
--- a/configure.in
+++ b/configure.in
@@ -1261,12 +1261,10 @@ lightsoff/Makefile
 lightsoff/help/Makefile
 lightsoff/src/lightsoff
 lightsoff/lightsoff.desktop.in
-lightsoff/src/main.js
+lightsoff/src/path.js
 lightsoff/data/themes/Makefile
 lightsoff/data/themes/tango/Makefile
-lightsoff/data/themes/tango/theme.js
 lightsoff/data/themes/up/Makefile
-lightsoff/data/themes/up/theme.js
 tests/Makefile
 tests/libgames-support/Makefile
 shave
diff --git a/lightsoff/Makefile.am b/lightsoff/Makefile.am
index 37ef86a..f8bbd52 100644
--- a/lightsoff/Makefile.am
+++ b/lightsoff/Makefile.am
@@ -7,6 +7,7 @@ lightsoff_DATA = \
 	src/Board.js \
 	src/Light.js \
 	src/main.js \
+	src/path.js \
 	src/Game.js \
 	src/LED.js \
 	src/Settings.js \
@@ -32,7 +33,8 @@ EXTRA_DIST = \
 	src/Arrow.js \
 	src/Board.js \
 	src/Light.js \
-	src/main.js.in \
+	src/main.js \
+	src/path.js.in \
 	src/Game.js \
 	src/LED.js \
 	src/Settings.js \
diff --git a/lightsoff/data/themes/tango/Makefile.am b/lightsoff/data/themes/tango/Makefile.am
index ae90a06..3efd759 100644
--- a/lightsoff/data/themes/tango/Makefile.am
+++ b/lightsoff/data/themes/tango/Makefile.am
@@ -15,7 +15,7 @@ EXTRA_DIST = \
 	off.svg \
 	on.svg \
 	highlight.svg \
-	theme.js.in
+	theme.js
 
 CLEANFILES = theme.js
 
diff --git a/lightsoff/data/themes/tango/theme.js.in b/lightsoff/data/themes/tango/theme.js
similarity index 93%
rename from lightsoff/data/themes/tango/theme.js.in
rename to lightsoff/data/themes/tango/theme.js
index 6b2e821..1e88916 100644
--- a/lightsoff/data/themes/tango/theme.js.in
+++ b/lightsoff/data/themes/tango/theme.js
@@ -1,4 +1,4 @@
-file_prefix = '@prefix@' + "/share/gnome-games/lightsoff/";
+file_prefix = imports.path.file_prefix;
 
 Clutter = imports.gi.Clutter;
 
diff --git a/lightsoff/data/themes/up/Makefile.am b/lightsoff/data/themes/up/Makefile.am
index 19856e8..cfdee4d 100644
--- a/lightsoff/data/themes/up/Makefile.am
+++ b/lightsoff/data/themes/up/Makefile.am
@@ -15,7 +15,5 @@ EXTRA_DIST = \
 	off.svg \
 	on.svg \
 	highlight.svg \
-	theme.js.in
-
-CLEANFILES = theme.js
+	theme.js
 
diff --git a/lightsoff/data/themes/up/theme.js.in b/lightsoff/data/themes/up/theme.js
similarity index 93%
rename from lightsoff/data/themes/up/theme.js.in
rename to lightsoff/data/themes/up/theme.js
index 3091fa5..3b416bb 100644
--- a/lightsoff/data/themes/up/theme.js.in
+++ b/lightsoff/data/themes/up/theme.js
@@ -1,4 +1,4 @@
-file_prefix = '@prefix@' + "/share/gnome-games/lightsoff/";
+file_prefix = imports.path.file_prefix;
 
 Clutter = imports.gi.Clutter;
 
diff --git a/lightsoff/src/About.js b/lightsoff/src/About.js
index 177d494..330a200 100644
--- a/lightsoff/src/About.js
+++ b/lightsoff/src/About.js
@@ -3,7 +3,7 @@ GnomeGamesSupport = imports.gi.GnomeGamesSupport;
 
 main = imports.main;
 
-var _ = imports.gettext.gettext;
+_ = imports.gettext.gettext;
 
 function show_about_dialog()
 {
diff --git a/lightsoff/src/Settings.js b/lightsoff/src/Settings.js
index 70f863e..346af5d 100644
--- a/lightsoff/src/Settings.js
+++ b/lightsoff/src/Settings.js
@@ -88,7 +88,7 @@ handlers = {
 function show_settings()
 {
 	b = new Gtk.Builder();
-	b.add_from_file(main.file_prefix+"/settings.ui");
+	b.add_from_file(main.file_prefix + "/settings.ui");
 	b.connect_signals(handlers);
 
 	populate_theme_selector(b.get_object("theme-selector"));
diff --git a/lightsoff/src/main.js.in b/lightsoff/src/main.js
similarity index 94%
rename from lightsoff/src/main.js.in
rename to lightsoff/src/main.js
index 4f5770e..372cb16 100755
--- a/lightsoff/src/main.js.in
+++ b/lightsoff/src/main.js
@@ -1,13 +1,13 @@
 #!/usr/bin/env seed
 
-file_prefix = '@prefix@' + "/share/gnome-games/lightsoff/";
+file_prefix = imports.path.file_prefix;
 
 GtkClutter = imports.gi.GtkClutter;
 Clutter = imports.gi.Clutter;
 Gtk = imports.gi.Gtk;
 GtkBuilder = imports.gtkbuilder;
 GnomeGamesSupport = imports.gi.GnomeGamesSupport;
-var _ = imports.gettext.gettext;
+_ = imports.gettext.gettext;
 
 GtkClutter.init(Seed.argv);
 GnomeGamesSupport.runtime_init("lightsoff");



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