aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-07-20 23:26:30 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-07-20 23:26:30 +0800
commit73a749cafbd78b45494aa5eba645ef2fe9c4e21a (patch)
treee6e17735f1c117203bf934ede853927a05201f92 /libempathy/empathy-utils.c
parentf2e322a3395fc21c533833cd5b9fffb0cc677e3f (diff)
downloadgsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.gz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.bz2
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.lz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.xz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.zst
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.zip
Initial room list support. It does not works yet.
2007-07-20 Xavier Claessens <xclaesse@gmail.com> * 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
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c25
1 files changed, 20 insertions, 5 deletions
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;
}
+