[gnome-todo/wip/gbsneto/subtasks: 26/27] task-row: properly disconnect from the task
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/gbsneto/subtasks: 26/27] task-row: properly disconnect from the task
- Date: Fri, 14 Oct 2016 14:43:20 +0000 (UTC)
commit cd3413126f142a7f5c452cc49bc36de731dbcd25
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Oct 14 11:41:05 2016 -0300
task-row: properly disconnect from the task
src/gtd-task-row.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-task-row.c b/src/gtd-task-row.c
index 4cfcc6a..b88c96a 100644
--- a/src/gtd-task-row.c
+++ b/src/gtd-task-row.c
@@ -459,6 +459,33 @@ gtd_task_row_finalize (GObject *object)
}
static void
+gtd_task_row_dispose (GObject *object)
+{
+ GtdTaskRow *self;
+ GtdTask *task;
+
+ self = GTD_TASK_ROW (object);
+ task = self->task;
+
+ if (task)
+ {
+ g_signal_handlers_disconnect_by_func (task,
+ depth_changed_cb,
+ self);
+
+ g_signal_handlers_disconnect_by_func (task,
+ complete_changed_cb,
+ self);
+
+ g_signal_handlers_disconnect_by_func (task,
+ gtd_task_row__priority_changed_cb,
+ self);
+ }
+
+ G_OBJECT_CLASS (gtd_task_row_parent_class)->dispose (object);
+}
+
+static void
gtd_task_row_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -519,6 +546,7 @@ gtd_task_row_class_init (GtdTaskRowClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkListBoxRowClass *row_class = GTK_LIST_BOX_ROW_CLASS (klass);
+ object_class->dispose = gtd_task_row_dispose;
object_class->finalize = gtd_task_row_finalize;
object_class->get_property = gtd_task_row_get_property;
object_class->set_property = gtd_task_row_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]