From 73a749cafbd78b45494aa5eba645ef2fe9c4e21a Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 20 Jul 2007 15:26:30 +0000 Subject: Initial room list support. It does not works yet. 2007-07-20 Xavier Claessens * libempathy/Makefile.am: * libempathy/empathy-tp-roomlist.h: * libempathy/empathy-tp-roomlist.c: * libempathy-gtk/empathy-chatrooms-window.c: * libempathy-gtk/empathy-new-chatroom-dialog.c: Initial room list support. It does not works yet. * libempathy-gtk/empathy-account-widget-generic.c: Add support for all types of integer and float. Fixes bug #457740 (Jamey Hicks). * libempathy/empathy-tp-chat.c: * libempathy-gtk/empathy-chat.c: If there is an error sending a message, show an error message to the user. * libempathy-gtk/empathy-accounts-dialog.c: Fix a leak, profile should be unrefed after mc_account_get_profile. * libempathy/empathy-utils.c: * libempathy/empathy-utils.h: * libempathy/empathy-tp-chatroom.c: * libempathy/empathy-tp-group.h: * libempathy/empathy-tp-group.c: * src/empathy.c: Rename empathy_get_channel_id() to empathy_inspect_channel(). We now have empathy_inspect_handle(). * po/POTFILES.in: * libempathy/empathy-tp-contact-list.c: Set all contacts from salut protocol to the "Local Network" group. * libempathy/empathy-idle.c: Fix NetworkManager support. * libempathy/empathy-chatroom.h: Fix indentation. * libempathy-gtk/empathy-status-icon.c: * libempathy-gtk/empathy-ui-utils.c: * libempathy-gtk/empathy-ui-utils.h: - Iconify main window to the status icon like in rhythmbox. Fixes bug #458106 (Jaap A. Haitsma). - Rounded avatars. Fixes bug #457992 (Raphael Slinckx) * Makefile.am: Fix distcheck for gtkdoc (Vincent Untz) * data/empathy.desktop.in.in: Change application description (Jaap A. Haitsma). svn path=/trunk/; revision=190 --- libempathy/empathy-utils.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'libempathy/empathy-utils.c') diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 74a6bc076..2bb171976 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -446,8 +446,21 @@ empathy_mission_control_new (void) } gchar * -empathy_get_channel_id (McAccount *account, - TpChan *tp_chan) +empathy_inspect_channel (McAccount *account, + TpChan *tp_chan) +{ + g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL); + g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL); + + return empathy_inspect_handle (account, + tp_chan->handle, + tp_chan->handle_type); +} + +gchar * +empathy_inspect_handle (McAccount *account, + guint handle, + guint handle_type) { MissionControl *mc; TpConn *tp_conn; @@ -457,7 +470,8 @@ empathy_get_channel_id (McAccount *account, GError *error; g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL); - g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL); + g_return_val_if_fail (handle != 0, NULL); + g_return_val_if_fail (handle_type != 0, NULL); mc = empathy_mission_control_new (); tp_conn = mission_control_get_connection (mc, account, NULL); @@ -469,9 +483,9 @@ empathy_get_channel_id (McAccount *account, /* Get the handle's name */ handles = g_array_new (FALSE, FALSE, sizeof (guint)); - g_array_append_val (handles, tp_chan->handle); + g_array_append_val (handles, handle); if (!tp_conn_inspect_handles (DBUS_G_PROXY (tp_conn), - tp_chan->handle_type, + handle_type, handles, &names, &error)) { @@ -493,3 +507,4 @@ empathy_get_channel_id (McAccount *account, return name; } + -- cgit v1.2.3