[ease/inspector] Favor Element.get over Element.data.get.



commit 16b31b73575e303efd912bfb2a86a8e7df46b370
Author: Nate Stedman <natesm gmail com>
Date:   Fri Jun 4 07:04:08 2010 -0400

    Favor Element.get over Element.data.get.

 src/ImageActor.vala |    2 +-
 src/Slide.vala      |    8 ++++----
 src/SlideActor.vala |    2 +-
 src/TextActor.vala  |    2 +-
 src/VideoActor.vala |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/ImageActor.vala b/src/ImageActor.vala
index 454a5c6..226ce73 100644
--- a/src/ImageActor.vala
+++ b/src/ImageActor.vala
@@ -40,7 +40,7 @@ public class Ease.ImageActor : Actor
 		
 		try
 		{
-			contents = new Clutter.Texture.from_file(e.parent.parent.path + e.data.get("filename"));
+			contents = new Clutter.Texture.from_file(e.parent.parent.path + e.get("filename"));
 		}
 		catch (GLib.Error e)
 		{
diff --git a/src/Slide.vala b/src/Slide.vala
index 0cb76a7..ced3f0b 100644
--- a/src/Slide.vala
+++ b/src/Slide.vala
@@ -194,11 +194,11 @@ public class Ease.Slide
 			element.parent = this;
 			
 			// resize the Element to fit the Document
-			element.x = (int)(element.data.get("x").to_double() * width);
-			element.y = (int)(element.data.get("y").to_double() * height);
-			element.width = (int)(element.data.get("width").to_double() *
+			element.x = (int)(element.get("x").to_double() * width);
+			element.y = (int)(element.get("y").to_double() * height);
+			element.width = (int)(element.get("width").to_double() *
 			                      width);
-			element.height = (int)(element.data.get("height").to_double() *
+			element.height = (int)(element.get("height").to_double() *
 			                       height);
 			
 			// add the Element to the new Slide
diff --git a/src/SlideActor.vala b/src/SlideActor.vala
index d85e2a8..9a5ed15 100644
--- a/src/SlideActor.vala
+++ b/src/SlideActor.vala
@@ -94,7 +94,7 @@ public class Ease.SlideActor : Clutter.Group
 		foreach (var e in slide.elements)
 		{
 			// load the proper type of actor
-			switch (e.data.get("element_type"))
+			switch (e.get("element_type"))
 			{
 				case "image":
 					contents.add_actor(new ImageActor(e, context));
diff --git a/src/TextActor.vala b/src/TextActor.vala
index 9de6913..984deb4 100644
--- a/src/TextActor.vala
+++ b/src/TextActor.vala
@@ -41,7 +41,7 @@ public class Ease.TextActor : Actor
 		text.line_wrap = true;
 		text.line_wrap_mode = Pango.WrapMode.WORD_CHAR;
 		text.color = e.color;
-		text.set_markup(e.data.get("text"));
+		text.set_markup(e.get("text"));
 		text.font_name = e.font_description.to_string();
 		text.line_alignment = e.text_align;
 		
diff --git a/src/VideoActor.vala b/src/VideoActor.vala
index 8bca698..a1d97c6 100644
--- a/src/VideoActor.vala
+++ b/src/VideoActor.vala
@@ -40,7 +40,7 @@ public class Ease.VideoActor : Actor, Clutter.Media
 		base(e, c);
 
 		video = new ClutterGst.VideoTexture();
-		video.set_filename(e.parent.parent.path + e.data.get("filename"));
+		video.set_filename(e.parent.parent.path + e.get("filename"));
 
 		// play the video if it's in the presentation
 		if (c == ActorContext.PRESENTATION)



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