diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-12-12 17:40:24 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-12-12 17:40:24 +0800 |
commit | c29b376f15e610018da2349b5f2a786df62d5737 (patch) | |
tree | b7823ca046dbfa516807abc0f1c18f174962c1a2 /libempathy-gtk | |
parent | a5bbfafd202f1d2e2019650481075c798cab9bfd (diff) | |
download | gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar.gz gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar.bz2 gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar.lz gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar.xz gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.tar.zst gsoc2013-empathy-c29b376f15e610018da2349b5f2a786df62d5737.zip |
can_add_contact_to_account: use empathy_contact_manager_can_add (Guillaume Desmottes)
svn path=/trunk/; revision=1963
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index 7aae812a4..49746bafc 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -239,31 +239,14 @@ static gboolean 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 |