empathy r1963 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1963 - trunk/libempathy-gtk
- Date: Fri, 12 Dec 2008 09:40:24 +0000 (UTC)
Author: xclaesse
Date: Fri Dec 12 09:40:24 2008
New Revision: 1963
URL: http://svn.gnome.org/viewvc/empathy?rev=1963&view=rev
Log:
can_add_contact_to_account: use empathy_contact_manager_can_add (Guillaume Desmottes)
Modified:
trunk/libempathy-gtk/empathy-contact-dialogs.c
Modified: trunk/libempathy-gtk/empathy-contact-dialogs.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-dialogs.c (original)
+++ trunk/libempathy-gtk/empathy-contact-dialogs.c Fri Dec 12 09:40:24 2008
@@ -239,31 +239,14 @@
can_add_contact_to_account (McAccount *account,
gpointer user_data)
{
- MissionControl *mc;
- TpConnectionStatus status;
- McProfile *profile;
- const gchar *protocol_name;
-
- mc = empathy_mission_control_new ();
- status = mission_control_get_connection_status (mc, account, NULL);
- g_object_unref (mc);
- if (status != TP_CONNECTION_STATUS_CONNECTED) {
- /* Account is disconnected */
- return FALSE;
- }
+ EmpathyContactManager *mgr;
+ gboolean result;
- profile = mc_account_get_profile (account);
- protocol_name = mc_profile_get_protocol_name (profile);
- if (strcmp (protocol_name, "local-xmpp") == 0) {
- /* We can't add accounts to a XMPP LL connection
- * FIXME: We should inspect the flags of the contact list group interface
- */
- g_object_unref (profile);
- return FALSE;
- }
+ mgr = empathy_contact_manager_new ();
+ result = empathy_contact_manager_can_add (mgr, account);
+ g_object_unref (mgr);
- g_object_unref (profile);
- return TRUE;
+ return result;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]