[gtranslator] Have GtrMessageTableModel keep a ref to the GtrMessageContainer
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator] Have GtrMessageTableModel keep a ref to the GtrMessageContainer
- Date: Tue, 1 May 2012 17:59:21 +0000 (UTC)
commit d1ac9f9cc4a51901a6dfeb4447fd60f3394f9c76
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue May 1 19:48:06 2012 +0200
Have GtrMessageTableModel keep a ref to the GtrMessageContainer
This fixes the critical messages when the GtrTab disposes the
GtrPo container before the treeview and the model being shown.
src/gtr-message-table-model.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gtr-message-table-model.c b/src/gtr-message-table-model.c
index b48ad66..6419dc6 100644
--- a/src/gtr-message-table-model.c
+++ b/src/gtr-message-table-model.c
@@ -329,6 +329,7 @@ gtr_message_table_model_init (GtrMessageTableModel * model)
static void
gtr_message_table_model_finalize (GObject * object)
{
+ g_object_unref (GTR_MESSAGE_TABLE_MODEL (object)->container);
parent_class->finalize (object);
}
@@ -343,7 +344,7 @@ gtr_message_table_set_property (GObject * object,
switch (prop_id)
{
case PROP_CONTAINER:
- model->container = g_value_get_object (value);
+ model->container = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]