[empathy] Replace empathy_connection_get_protocol by tp_connection_parse_object_path
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Replace empathy_connection_get_protocol by tp_connection_parse_object_path
- Date: Wed, 22 Apr 2009 06:29:16 -0400 (EDT)
commit aa098bf904f8e85fa6aa44ffea99e1e027775d26
Author: Xavier Claessens <xclaesse gmail com>
Date: Tue Apr 21 01:14:34 2009 +0200
Replace empathy_connection_get_protocol by tp_connection_parse_object_path
---
configure.ac | 2 +-
libempathy/empathy-tp-contact-list.c | 5 ++---
libempathy/empathy-utils.c | 28 ----------------------------
libempathy/empathy-utils.h | 3 +--
4 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index a387b0e..0ff1739 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ GLIB_REQUIRED=2.16.0
GTK_REQUIRED=2.16.0
GCONF_REQUIRED=1.2.0
LIBPANELAPPLET_REQUIRED=2.10.0
-TELEPATHY_GLIB_REQUIRED=0.7.26
+TELEPATHY_GLIB_REQUIRED=0.7.27
MISSION_CONTROL_REQUIRED=4.61
ENCHANT_REQUIRED=1.2.0
ISO_CODES_REQUIRED=0.35
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index 1e4ea5f..6868e84 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -759,9 +759,8 @@ tp_contact_list_constructed (GObject *list)
/* Check for protocols that does not support contact groups. We can
* put all contacts into a special group in that case.
- * FIXME: Default group should be an information in the profile
- * FIXME: replace with tp_connection_parse_object_path once released */
- protocol_name = empathy_connection_get_protocol (priv->connection, NULL);
+ * FIXME: Default group should be an information in the profile */
+ tp_connection_parse_object_path (priv->connection, &protocol_name, NULL);
if (!tp_strdiff (protocol_name, "local-xmpp")) {
priv->protocol_group = _("People nearby");
}
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 8b140ad..210c350 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -379,31 +379,3 @@ empathy_check_available_state (void)
return TRUE;
}
-gchar *
-empathy_connection_get_protocol (TpConnection *connection,
- gchar **ret_cmname)
-{
- const gchar *object_path;
- const gchar *cmname;
- const gchar *proto;
- const gchar *account;
- gchar *ret;
-
- g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
-
- /* Object path is in the form:
- * /org/freedesktop/Telepathy/Connection/cmname/proto/account */
- object_path = tp_proxy_get_object_path (TP_PROXY (connection));
- cmname = object_path + strlen ("/org/freedesktop/Telepathy/Connection/");
- proto = strstr (cmname, "/") + 1;
- account = strstr (proto, "/") + 1;
-
- if (ret_cmname) {
- *ret_cmname = g_strndup (cmname, proto - cmname - 1);
- g_strdelimit (*ret_cmname, "_", '-');
- }
-
- ret = g_strndup (proto, account - proto - 1);
- return g_strdelimit (ret, "_", '-');
-}
-
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 090de9d..e6bcfeb 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -78,8 +78,7 @@ gboolean empathy_proxy_equal (gconstpointer a,
gconstpointer b);
guint empathy_proxy_hash (gconstpointer key);
gboolean empathy_check_available_state (void);
-gchar * empathy_connection_get_protocol (TpConnection *connection,
- gchar **cm_name);
+
G_END_DECLS
#endif /* __EMPATHY_UTILS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]