[clutter/clutter-1.16] click-action: disconnect signals and gsources on dispose
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.16] click-action: disconnect signals and gsources on dispose
- Date: Tue, 10 Sep 2013 20:52:35 +0000 (UTC)
commit 5c035f2107cda24a074246d6b083296da2526c07
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Mon Sep 9 07:52:55 2013 +0100
click-action: disconnect signals and gsources on dispose
https://bugzilla.gnome.org/show_bug.cgi?id=707774
clutter/clutter-click-action.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-click-action.c b/clutter/clutter-click-action.c
index 8e7963c..92aba0b 100644
--- a/clutter/clutter-click-action.c
+++ b/clutter/clutter-click-action.c
@@ -535,6 +535,34 @@ clutter_click_action_get_property (GObject *gobject,
}
static void
+clutter_click_action_dispose (GObject *gobject)
+{
+ ClutterClickActionPrivate *priv = CLUTTER_CLICK_ACTION (gobject)->priv;
+
+ if (priv->event_id)
+ {
+ g_signal_handler_disconnect (clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (gobject)),
+ priv->event_id);
+ priv->event_id = 0;
+ }
+
+ if (priv->capture_id)
+ {
+ g_signal_handler_disconnect (priv->stage, priv->capture_id);
+ priv->capture_id = 0;
+ }
+
+ if (priv->long_press_id)
+ {
+ g_source_remove (priv->long_press_id);
+ priv->long_press_id = 0;
+ }
+
+ G_OBJECT_CLASS (clutter_click_action_parent_class)->dispose (gobject);
+}
+
+
+static void
clutter_click_action_class_init (ClutterClickActionClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -542,6 +570,7 @@ clutter_click_action_class_init (ClutterClickActionClass *klass)
meta_class->set_actor = clutter_click_action_set_actor;
+ gobject_class->dispose = clutter_click_action_dispose;
gobject_class->set_property = clutter_click_action_set_property;
gobject_class->get_property = clutter_click_action_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]