[empathy] Convert empathy_contact_manager_can_add() to empathy_contact_manager_get_flags_for_connection()
- From: Davyd Madeley <davyd src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Convert empathy_contact_manager_can_add() to empathy_contact_manager_get_flags_for_connection()
- Date: Wed, 15 Jul 2009 10:13:58 +0000 (UTC)
commit 98d43b78d70e1a2ff6a0b931ad1b8e11790daff0
Author: Davyd Madeley <davyd madeley id au>
Date: Fri Apr 24 14:36:23 2009 +0800
Convert empathy_contact_manager_can_add() to empathy_contact_manager_get_flags_for_connection()
libempathy-gtk/empathy-contact-dialogs.c | 2 +-
libempathy/empathy-contact-manager.c | 9 +++++----
libempathy/empathy-contact-manager.h | 3 ++-
3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index d271cdd..0155f61 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -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;
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 49155c8..5ce463c 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -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;
}
diff --git a/libempathy/empathy-contact-manager.h b/libempathy/empathy-contact-manager.h
index fbe9e2d..d68b4ea 100644
--- a/libempathy/empathy-contact-manager.h
+++ b/libempathy/empathy-contact-manager.h
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]