[cluttermm] BehaviourEllipse: Fix the constructor.



commit 8cb6004f09fbbe6d78fc71e637758c19f1d182ac
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 2 14:50:52 2010 +0200

    BehaviourEllipse: Fix the constructor.
    
    * clutter/src/behaviour-ellipse.[hg|ccg]: Correct the constructor, because
      it tried to use property names that did not exist.
      This fixes bug #615151 (Jonatan).

 ChangeLog                         |   18 +++++++++++++-----
 clutter/src/behaviour-ellipse.ccg |   12 +++++++++++-
 clutter/src/behaviour-ellipse.hg  |    6 ++++--
 3 files changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6b27a0a..8322cbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-02  Murray Cumming  <murrayc murrayc com>
+
+	BehaviourEllipse: Fix the constructor.
+
+	* clutter/src/behaviour-ellipse.[hg|ccg]: Correct the constructor, because
+  it tried to use property names that did not exist.
+  This fixes bug #615151 (Jonatan).
+
 2010-09-02  Chris Kühl  <chrisk openismus com>
 
 	Added custom default ctor to Knot class.
@@ -24,16 +32,16 @@
 	Wrapped some new functions.
 
 	* configure.ac: Depend on atkmm, so we can use Atk::Object in the API.
-	(This could be optional at configure time if anybody needs that, as it is 
+	(This could be optional at configure time if anybody needs that, as it is
 	in gtkmm.)
 	* clutter/src/clutter_methods.defs: Regenerated with h2defs.py.
 	* clutter/src/filelist.am:
 	* clutter/src/actor-meta.[hg|ccg]:
 	* clutter/src/action.[hg|ccg]: Added new ActorMeta and Action classes.
-	* clutter/src/actor.[hg|ccg]: Added get/set_clip_to_allocation(), contains(), 
-	get_has_allocation(), get_accessible(), add_action(), remove_action(), 
+	* clutter/src/actor.[hg|ccg]: Added get/set_clip_to_allocation(), contains(),
+	get_has_allocation(), get_accessible(), add_action(), remove_action(),
 	get_action(), clear_actions().
-	* clutter/src/animation.hg: set_duration(): Correct the parameter type to 
+	* clutter/src/animation.hg: set_duration(): Correct the parameter type to
 	guint, as corrected in the C API.
 	* clutter/src/path.hg: Added foreach().
 	* clutter/src/stage.hg: Addef get/set_no_clear_hint().
@@ -52,7 +60,7 @@
 2010-05-05  Murray Cumming  <murrayc murrayc com>
 
 	Small API additions.
-	
+
 	* clutter/src/stage.hg: Added delete_event signal.
 	* clutter/src/text.hg: Added font_description property.
 
diff --git a/clutter/src/behaviour-ellipse.ccg b/clutter/src/behaviour-ellipse.ccg
index d53eef8..c7f53a7 100644
--- a/clutter/src/behaviour-ellipse.ccg
+++ b/clutter/src/behaviour-ellipse.ccg
@@ -20,5 +20,15 @@
 namespace Clutter
 {
 
-} //namespace Clutter
+BehaviourEllipse::BehaviourEllipse(const Glib::RefPtr<Alpha>& alpha, int x, int y, int width, int height, RotateDirection direction, double angle_start, double angle_end)
+:
+  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+  Glib::ObjectBase(0),
+  Behaviour(Glib::ConstructParams(behaviourellipse_class_.init(), "alpha", Glib::unwrap(alpha), /* "center", ClutterKnot(x, y), */ "width", width, "height", height, "direction", ((ClutterRotateDirection)(direction)), "angle-start", angle_start, "angle-end", angle_end, static_cast<char*>(0)))
+{
+  //Hopefully it's OK to set this later:
+  Knot knot(x, y);
+  property_center() = knot;
+}
 
+} //namespace Clutter
diff --git a/clutter/src/behaviour-ellipse.hg b/clutter/src/behaviour-ellipse.hg
index 0f4afa1..7580686 100644
--- a/clutter/src/behaviour-ellipse.hg
+++ b/clutter/src/behaviour-ellipse.hg
@@ -18,7 +18,7 @@
 #include <cluttermm/behaviour.h>
 #include <cluttermm/alpha.h>
 #include <cluttermm/types.h>
- 
+
 _DEFS(cluttermm,clutter)
 _PINCLUDE(cluttermm/private/behaviour_p.h)
 
@@ -31,7 +31,9 @@ class BehaviourEllipse : public Behaviour
   _CLASS_GOBJECT(BehaviourEllipse, ClutterBehaviourEllipse, CLUTTER_BEHAVIOUR_ELLIPSE, Behaviour, ClutterBehaviour)
 
 protected:
-  _WRAP_CTOR(BehaviourEllipse(const Glib::RefPtr<Alpha>& alpha, int x, int y, int width, int height, RotateDirection direction, double begin, double end), clutter_behaviour_ellipse_new)
+  //Hand-coded because x and y must be combined into one ClutterKnot center parameter.
+  BehaviourEllipse(const Glib::RefPtr<Alpha>& alpha, int x, int y, int width, int height, RotateDirection direction, double angle_start, double angle_end);
+  _IGNORE(clutter_behaviour_ellipse_new)
 
 public:
   _WRAP_CREATE(const Glib::RefPtr<Alpha>& alpha, int x, int y, int width, int height, RotateDirection direction, double begin, double end)



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