]> git.0d.be Git - empathy.git/commitdiff
Convert empathy_contact_manager_can_add() to empathy_contact_manager_get_flags_for_co...
authorDavyd Madeley <davyd@madeley.id.au>
Fri, 24 Apr 2009 06:36:23 +0000 (14:36 +0800)
committerDavyd Madeley <davyd@madeley.id.au>
Wed, 15 Jul 2009 10:12:15 +0000 (11:12 +0100)
libempathy-gtk/empathy-contact-dialogs.c
libempathy/empathy-contact-manager.c
libempathy/empathy-contact-manager.h

index d271cdd287589b20a3283d6e4e7dc545f124696a..0155f610e65e514a867222ca829baba8c3d7a540 100644 (file)
@@ -340,7 +340,7 @@ can_add_contact_to_account (EmpathyAccount *account,
                return FALSE;
 
        contact_manager = empathy_contact_manager_dup_singleton ();
-       result = empathy_contact_manager_can_add (contact_manager, connection);
+       result = empathy_contact_manager_get_flags_for_connection (contact_manager, connection) & EMPATHY_CONTACT_LIST_CAN_ADD;
        g_object_unref (contact_manager);
 
        return result;
index 49155c8c53ec16d2fc6815d4a67f35bae43283b4..5ce463c4ca75ad0d1aa572127559ec27fd971697 100644 (file)
@@ -527,9 +527,10 @@ contact_manager_iface_init (EmpathyContactListIface *iface)
        iface->remove_group      = contact_manager_remove_group;
 }
 
-gboolean
-empathy_contact_manager_can_add (EmpathyContactManager *manager,
-                                TpConnection          *connection)
+EmpathyContactListFlags
+empathy_contact_manager_get_flags_for_connection (
+                               EmpathyContactManager *manager,
+                               TpConnection          *connection)
 {
        EmpathyContactManagerPriv *priv = GET_PRIV (manager);
        EmpathyContactList        *list;
@@ -544,6 +545,6 @@ empathy_contact_manager_can_add (EmpathyContactManager *manager,
        }
        flags = empathy_contact_list_get_flags (list);
 
-       return (flags & EMPATHY_CONTACT_LIST_CAN_ADD);
+       return flags;
 }
 
index fbe9e2df01b58fffe41394204b03859308609e38..d68b4ea268d95ece29229c14bf201a7087ea6471 100644 (file)
@@ -53,7 +53,8 @@ GType                  empathy_contact_manager_get_type (void) G_GNUC_CONST;
 EmpathyContactManager *empathy_contact_manager_dup_singleton  (void);
 EmpathyTpContactList * empathy_contact_manager_get_list (EmpathyContactManager *manager,
                                                         TpConnection          *connection);
-gboolean               empathy_contact_manager_can_add  (EmpathyContactManager *manager,
+EmpathyContactListFlags empathy_contact_manager_get_flags_for_connection (
+                                                        EmpathyContactManager *manager,
                                                         TpConnection          *connection);
 
 G_END_DECLS