Play sounds with "module-stream-restore.id" set to "x-maemo-system-sound"
[hildon] / hildon / hildon-animation-actor.c
index 0d623d8..834c437 100644 (file)
 
 /**
  * SECTION:hildon-animation-window
- * @short_description: Widget representing an animation actor for
+ * @short_description: Animation actor for
  * WM-assisted animation effects in the Hildon framework.
  *
- * The #HildonAnimationActor is a GTK+ widget which represents an
+ * The #HildonAnimationActor is an
  * animation actor for WM-assisted animation effects in the Hildon
  * framework. It derives from #GtkWindow and can host any widgets much
  * like a normal window. The special features available to the
@@ -277,10 +277,30 @@ hildon_animation_actor_hide                    (GtkWidget *widget)
 }
 
 static void
+hildon_animation_actor_finalize                (GObject *object)
+{
+    HildonAnimationActor        *self = HILDON_ANIMATION_ACTOR (object);
+    HildonAnimationActorPrivate
+                      *priv = HILDON_ANIMATION_ACTOR_GET_PRIVATE (self);
+
+    if (priv->parent)
+    {
+       if (priv->parent_map_event_cb_id)
+           g_signal_handler_disconnect (priv->parent,
+                                        priv->parent_map_event_cb_id);
+
+       g_object_unref (priv->parent);
+    }
+}
+
+static void
 hildon_animation_actor_class_init              (HildonAnimationActorClass *klass)
 {
+    GObjectClass      *gobject_class = G_OBJECT_CLASS (klass);
     GtkWidgetClass    *widget_class = GTK_WIDGET_CLASS (klass);
 
+    gobject_class->finalize         = hildon_animation_actor_finalize;
+
     widget_class->realize           = hildon_animation_actor_realize;
     widget_class->unrealize         = hildon_animation_actor_unrealize;
     widget_class->show              = hildon_animation_actor_show;