telepathy-idle: RoomlistManager: use tp_asv_new()
Will Thompson
wjt at kemper.freedesktop.org
Mon Oct 29 05:39:12 PDT 2012
Module: telepathy-idle
Branch: master
Commit: 7b7f61a8dae3f8de7436378ef3ae569a5323fcef
URL: http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=7b7f61a8dae3f8de7436378ef3ae569a5323fcef
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Sun Apr 8 11:01:50 2012 +0100
RoomlistManager: use tp_asv_new()
---
src/idle-roomlist-manager.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/idle-roomlist-manager.c b/src/idle-roomlist-manager.c
index ced4be9..ed536b6 100644
--- a/src/idle-roomlist-manager.c
+++ b/src/idle-roomlist-manager.c
@@ -241,19 +241,12 @@ _roomlist_manager_foreach_class (TpChannelManager *self,
TpChannelManagerChannelClassFunc func,
gpointer user_data)
{
- GHashTable *table;
- GValue *value;
-
- 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_ROOM_LIST);
- g_hash_table_insert (table, (gpointer) roomlist_channel_fixed_properties[0], value);
-
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (value, TP_HANDLE_TYPE_NONE);
- g_hash_table_insert (table, (gpointer) roomlist_channel_fixed_properties[1], value);
+ GHashTable *table = tp_asv_new (
+ roomlist_channel_fixed_properties[0], G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
+ roomlist_channel_fixed_properties[1], G_TYPE_UINT,
+ TP_HANDLE_TYPE_NONE,
+ NULL);
func (self, table, roomlist_channel_allowed_properties, user_data);
More information about the telepathy-commits
mailing list