[telepathy-gabble/master] gabble_ft_manager_foreach_channel_class: use new tp_g_value_slice_new_* helpers

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Mar 30 08:25:24 PDT 2009


---
 src/ft-manager.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/ft-manager.c b/src/ft-manager.c
index a99d84c..2e601cf 100644
--- a/src/ft-manager.c
+++ b/src/ft-manager.c
@@ -440,19 +440,16 @@ gabble_ft_manager_foreach_channel_class (TpChannelManager *manager,
                                          gpointer user_data)
 {
   GHashTable *table;
-  GValue *value;
 
   /* general FT class */
   table = g_hash_table_new_full (g_str_hash, g_str_equal,
       NULL, (GDestroyNotify) tp_g_value_slice_free);
 
-  value = tp_g_value_slice_new (G_TYPE_STRING);
-  g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
-  g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType" , value);
+  g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType" ,
+      tp_g_value_slice_new_string (TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER));
 
-  value = tp_g_value_slice_new (G_TYPE_UINT);
-  g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT);
-  g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", value);
+  g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType",
+      tp_g_value_slice_new_uint (TP_HANDLE_TYPE_CONTACT));
 
   func (manager, table, file_transfer_channel_allowed_properties,
       user_data);
-- 
1.5.6.5




More information about the telepathy-commits mailing list