[gnome-todo] task-row: own a reference to the task
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-row: own a reference to the task
- Date: Thu, 29 Sep 2016 22:21:35 +0000 (UTC)
commit e20a447de4b73bac37976de5b4adbe2fe8d0e09a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Sep 28 12:21:12 2016 -0300
task-row: own a reference to the task
src/gtd-task-row.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gtd-task-row.c b/src/gtd-task-row.c
index 7195d11..25db7f6 100644
--- a/src/gtd-task-row.c
+++ b/src/gtd-task-row.c
@@ -288,6 +288,10 @@ gtd_task_row__entry_activated (GtkEntry *entry,
static void
gtd_task_row_finalize (GObject *object)
{
+ GtdTaskRow *self = GTD_TASK_ROW (object);
+
+ g_clear_object (&self->task);
+
G_OBJECT_CLASS (gtd_task_row_parent_class)->finalize (object);
}
@@ -580,10 +584,8 @@ gtd_task_row_set_task (GtdTaskRow *row,
{
g_return_if_fail (GTD_IS_TASK_ROW (row));
- if (row->task != task)
+ if (g_set_object (&row->task, task))
{
- row->task = task;
-
if (task)
{
gtk_label_set_label (row->task_list_label, gtd_task_list_get_name (gtd_task_get_list (task)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]