[gnome-games/gsoc-seed-games] [same-gnome-clutter] Use settings for number of colors and theme
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gsoc-seed-games] [same-gnome-clutter] Use settings for number of colors and theme
- Date: Mon, 13 Jul 2009 01:44:13 +0000 (UTC)
commit 3e69d20cf1633037913cf41d2286744c18ac7f43
Author: Tim Horton <hortont424 gmail com>
Date: Sun Jul 12 21:05:44 2009 -0400
[same-gnome-clutter] Use settings for number of colors and theme
same-gnome-clutter/src/Light.js | 5 +++--
same-gnome-clutter/src/main.js | 9 ++-------
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/same-gnome-clutter/src/Light.js b/same-gnome-clutter/src/Light.js
index d660f4c..b8f24c7 100644
--- a/same-gnome-clutter/src/Light.js
+++ b/same-gnome-clutter/src/Light.js
@@ -1,6 +1,7 @@
Clutter = imports.gi.Clutter;
GLib = imports.gi.GLib;
main = imports.main;
+Settings = imports.Settings;
Light = new GType({
parent: Clutter.Group.type,
@@ -10,12 +11,12 @@ Light = new GType({
// Private
var closed = false;
var light_x, light_y;
- var state = Math.floor(Math.random() * main.max_colors);
+ var state = Math.floor(Math.random() * Settings.colors);
// Public
this.visited = false;
- this.on = new Clutter.Clone({source: main.theme.colors[state]});
+ this.on = new Clutter.Clone({source: Settings.theme.colors[state]});
this.get_state = function ()
{
diff --git a/same-gnome-clutter/src/main.js b/same-gnome-clutter/src/main.js
index a66326f..2a1cc39 100755
--- a/same-gnome-clutter/src/main.js
+++ b/same-gnome-clutter/src/main.js
@@ -16,13 +16,8 @@ Gtk = imports.gi.Gtk;
GtkClutter = imports.gi.GtkClutter;
GtkBuilder = imports.gtkbuilder;
Clutter = imports.gi.Clutter;
-GdkPixbuf = imports.gi.GdkPixbuf;
GConf = imports.gi.GConf;
-GLib = imports.gi.GLib;
-Pango = imports.gi.Pango;
-GObject = imports.gi.GObject;
GnomeGamesSupport = imports.gi.GnomeGamesSupport;
-ThemeLoader = imports.ThemeLoader;
GtkClutter.init(Seed.argv);
GnomeGamesSupport.runtime_init("same-gnome");
@@ -35,6 +30,7 @@ Board = imports.Board;
Score = imports.Score;
About = imports.About;
Settings = imports.Settings;
+ThemeLoader = imports.ThemeLoader;
handlers = {
show_settings: function(selector, ud)
@@ -81,8 +77,7 @@ clutter_embed.set_size_request((tiles_w * tile_size),(tiles_h * tile_size));
window.show_all();
stage.show_all();
-theme = ThemeLoader.load_themes().Tango;
-ThemeLoader.load_theme(stage, theme);
+ThemeLoader.load_theme(stage, Settings.theme);
var board = new Board.Board();
stage.add_actor(board);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]