From e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 11 Mar 2008 12:23:20 +0000 Subject: Make use of tp-glib helpers func for GValue svn path=/trunk/; revision=779 --- libempathy/empathy-tp-chat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libempathy/empathy-tp-chat.c') diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 4d207c4e0..e9977cd93 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -450,12 +450,10 @@ tp_chat_properties_changed_cb (TpProxy *proxy, property = g_ptr_array_index (priv->properties, j); if (property->id == id) { if (property->value) { - g_value_unset (property->value); + g_value_copy (src_value, property->value); } else { - property->value = g_slice_new0 (GValue); + property->value = tp_g_value_slice_dup (src_value); } - g_value_init (property->value, G_VALUE_TYPE (src_value)); - g_value_copy (src_value, property->value); empathy_debug (DEBUG_DOMAIN, "property %s changed", property->name); @@ -661,8 +659,7 @@ tp_chat_finalize (GObject *object) property = g_ptr_array_index (priv->properties, i); g_free (property->name); if (property->value) { - g_value_unset (property->value); - g_slice_free (GValue, property->value); + tp_g_value_slice_free (property->value); } g_slice_free (TpChatProperty, property); } -- cgit v1.2.3