[clutter/wip/apocalypses/apocalypse-1] actor: Default to a fixed layout manager
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/apocalypses/apocalypse-1] actor: Default to a fixed layout manager
- Date: Wed, 7 Dec 2011 18:24:16 +0000 (UTC)
commit 26cc8d7358eb91a6aca0506d598fe6e8a4045d69
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Wed Dec 7 18:23:36 2011 +0000
actor: Default to a fixed layout manager
If not layout manager was defined during construction, use a fixed
layout manager to fall back to a sensible default.
clutter/clutter-actor.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 9c04e8b..b6f9c8b 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -313,6 +313,7 @@
#include "clutter-debug.h"
#include "clutter-effect-private.h"
#include "clutter-enum-types.h"
+#include "clutter-fixed-layout.h"
#include "clutter-main.h"
#include "clutter-marshal.h"
#include "clutter-flatten-effect.h"
@@ -4196,6 +4197,18 @@ clutter_actor_real_has_overlaps (ClutterActor *self)
}
static void
+clutter_actor_constructed (GObject *gobject)
+{
+ ClutterActor *self = CLUTTER_ACTOR (gobject);
+
+ /* default to a fixed layout if we didn't get a layout manager */
+ if (self->priv->layout_manager == NULL)
+ clutter_actor_set_layout_manager (self, clutter_fixed_layout_new ());
+
+ G_OBJECT_CLASS (clutter_actor_parent_class)->constructed (gobject);
+}
+
+static void
clutter_actor_class_init (ClutterActorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -4203,6 +4216,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
quark_shader_data = g_quark_from_static_string ("-clutter-actor-shader-data");
quark_actor_layout_info = g_quark_from_static_string ("-clutter-actor-layout-info");
+ object_class->constructed = clutter_actor_constructed;
object_class->set_property = clutter_actor_set_property;
object_class->get_property = clutter_actor_get_property;
object_class->dispose = clutter_actor_dispose;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]