diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-03-11 20:23:20 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-03-11 20:23:20 +0800 |
commit | e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc (patch) | |
tree | 7700a9d4ae443dca4209f38d83f6c2ec30a93b15 /libempathy/empathy-tp-chat.c | |
parent | 6f381d4d80d8f6206e1eec527db5f7ddf55dd91c (diff) | |
download | gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar.gz gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar.bz2 gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar.lz gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar.xz gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.tar.zst gsoc2013-empathy-e9e7f2f2512cc53ff2392715653ff1c3b16ed4bc.zip |
Make use of tp-glib helpers func for GValue
svn path=/trunk/; revision=779
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r-- | libempathy/empathy-tp-chat.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); } |