seed r638 - in trunk: examples examples/lightsoff libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r638 - in trunk: examples examples/lightsoff libseed
- Date: Sun, 4 Jan 2009 07:07:13 +0000 (UTC)
Author: racarr
Date: Sun Jan 4 07:07:13 2009
New Revision: 638
URL: http://svn.gnome.org/viewvc/seed?rev=638&view=rev
Log:
Update examples to the new constructor stuff, etc...
Modified:
trunk/examples/lightsoff/arrow.js
trunk/examples/lightsoff/board.js
trunk/examples/lightsoff/light.js
trunk/examples/lightsoff/score.js
trunk/examples/poppler.js
trunk/libseed/seed-engine.c
Modified: trunk/examples/lightsoff/arrow.js
==============================================================================
--- trunk/examples/lightsoff/arrow.js (original)
+++ trunk/examples/lightsoff/arrow.js Sun Jan 4 07:07:13 2009
@@ -22,7 +22,7 @@
{
direction = dir ? 1 : -1;
- var bkg = Clutter.Texture.new_from_file("./arrow-" +
+ var bkg = new Clutter.Texture.from_file("./arrow-" +
(dir ? "r" : "l") + ".svg");
bkg.filter_quality = Clutter.TextureQuality.High;
Modified: trunk/examples/lightsoff/board.js
==============================================================================
--- trunk/examples/lightsoff/board.js (original)
+++ trunk/examples/lightsoff/board.js Sun Jan 4 07:07:13 2009
@@ -51,7 +51,7 @@
new_board.lower_bottom();
var fadeline = new Clutter.Timeline({num_frames:80});
- var effect = Clutter.EffectTemplate._new(fadeline, alpha_func);
+ var effect = new Clutter.EffectTemplate.c_new(fadeline, alpha_func);
Clutter.effect_move(effect, new_board, 0, 0);
var remove_timeline = Clutter.effect_move(effect, board,
@@ -75,7 +75,7 @@
new_board.set_depth(direction * -250);
var fadeline = new Clutter.Timeline({num_frames:40});
- var effect = Clutter.EffectTemplate._new(fadeline, Clutter.sine_inc_func);
+ var effect = new Clutter.EffectTemplate.c_new(fadeline, Clutter.sine_inc_func);
Clutter.effect_depth(effect, new_board, 0);
Clutter.effect_depth(effect, board, direction * 250);
Modified: trunk/examples/lightsoff/light.js
==============================================================================
--- trunk/examples/lightsoff/light.js (original)
+++ trunk/examples/lightsoff/light.js Sun Jan 4 07:07:13 2009
@@ -1,9 +1,9 @@
var tile_svg_size = 100;
-var on_pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("./light-on.svg",
+var on_pixbuf = new GdkPixbuf.Pixbuf.from_file_at_size("./light-on.svg",
tile_svg_size,
tile_svg_size);
-var off_pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size("./light-off.svg",
+var off_pixbuf = new GdkPixbuf.Pixbuf.from_file_at_size("./light-off.svg",
tile_svg_size,
tile_svg_size);
@@ -49,8 +49,9 @@
return;
}
- var effect = Clutter.EffectTemplate._new(fadeline,
- Clutter.sine_inc_func);
+ var effect =
+ new Clutter.EffectTemplate.c_new(fadeline,
+ Clutter.sine_inc_func);
Clutter.effect_fade(effect, this.on, state * 255);
Clutter.effect_scale(effect, this, new_scale, new_scale);
Modified: trunk/examples/lightsoff/score.js
==============================================================================
--- trunk/examples/lightsoff/score.js (original)
+++ trunk/examples/lightsoff/score.js Sun Jan 4 07:07:13 2009
@@ -1,5 +1,5 @@
-var bkg_top = Clutter.Texture.new_from_file("./lcd-front.svg");
-var bkg = Clutter.Texture.new_from_file("./lcd-back.svg");
+var bkg_top = new Clutter.Texture.from_file("./lcd-front.svg");
+var bkg = new Clutter.Texture.from_file("./lcd-back.svg");
bkg_top.filter_quality = bkg.filter_quality = Clutter.TextureQuality.High;
@@ -20,7 +20,7 @@
var num_textures = new Array();
- var off_svg = Clutter.Texture.new_from_file("./lcd-off.svg");
+ var off_svg = new Clutter.Texture.from_file("./lcd-off.svg");
off_svg.filter_quality = Clutter.TextureQuality.High;
// Public
@@ -89,7 +89,7 @@
for(var i = 0; i <= 9; i++)
{
- num_textures[i] = Clutter.Texture.new_from_file("./"+i+".svg");
+ num_textures[i] = new Clutter.Texture.from_file("./"+i+".svg");
num_textures[i].filter_quality = Clutter.TextureQuality.High;
}
Modified: trunk/examples/poppler.js
==============================================================================
--- trunk/examples/poppler.js (original)
+++ trunk/examples/poppler.js Sun Jan 4 07:07:13 2009
@@ -65,8 +65,8 @@
{
// Poppler.Document will not take a uri as a construction property,
// use this:
- current_document =
- Poppler.Document.new_from_file(file_chooser.get_uri());
+ current_document = new
+ Poppler.Document.from_file(file_chooser.get_uri());
num_pages = current_document.get_n_pages();
set_page(0);
Modified: trunk/libseed/seed-engine.c
==============================================================================
--- trunk/libseed/seed-engine.c (original)
+++ trunk/libseed/seed-engine.c Sun Jan 4 07:07:13 2009
@@ -1006,6 +1006,8 @@
finfo);
if (strstr(fname, "new_") == fname)
fname += 4;
+ else if (!strcmp(fname, "new"))
+ fname ="c_new";
seed_object_set_property(ctx,
constructor_ref,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]