]> git.0d.be Git - empathy.git/commitdiff
Make use of tp-glib helpers func for GValue
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 11 Mar 2008 12:23:20 +0000 (12:23 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 11 Mar 2008 12:23:20 +0000 (12:23 +0000)
svn path=/trunk/; revision=779

libempathy/empathy-tp-chat.c

index 4d207c4e0298652f5d24ee7b46ca78e8ae787806..e9977cd93938bb81aebc2cf330a8acee2990ec77 100644 (file)
@@ -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);
                }