diff options
author | Travis Reitter <treitter@gmail.com> | 2010-06-16 09:29:03 +0800 |
---|---|---|
committer | Travis Reitter <treitter@gmail.com> | 2010-07-21 07:12:35 +0800 |
commit | c75319eb432d4d815bf07ee30396f958b021abed (patch) | |
tree | ccce09b121fa0924690606e2639e2b8b41f87820 /libempathy/empathy-individual-manager.c | |
parent | cdd2409d9048d1ffc7794713de52810ef0d18ebb (diff) | |
download | gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar.gz gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar.bz2 gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar.lz gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar.xz gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.tar.zst gsoc2013-empathy-c75319eb432d4d815bf07ee30396f958b021abed.zip |
Re-implement the context menu for Individuals
Diffstat (limited to 'libempathy/empathy-individual-manager.c')
-rw-r--r-- | libempathy/empathy-individual-manager.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index 4b27e74a0..0af191ad1 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -288,3 +288,33 @@ empathy_individual_manager_remove (EmpathyIndividualManager *self, /* TODO: implement */ DEBUG (G_STRLOC ": individual removal not implemented"); } + +EmpathyIndividualManagerFlags +empathy_individual_manager_get_flags_for_connection ( + EmpathyIndividualManager *self, + TpConnection *connection) +{ + EmpathyIndividualManagerPriv *priv; + EmpathyContactListFlags list_flags; + EmpathyIndividualManagerFlags flags; + + g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_MANAGER (self), + EMPATHY_INDIVIDUAL_MANAGER_NO_FLAGS); + + priv = GET_PRIV (self); + + list_flags = empathy_contact_manager_get_flags_for_connection ( + priv->contact_manager, connection); + + flags = EMPATHY_INDIVIDUAL_MANAGER_NO_FLAGS; + if (list_flags & EMPATHY_CONTACT_LIST_CAN_ADD) + flags |= EMPATHY_INDIVIDUAL_MANAGER_CAN_ADD; + if (list_flags & EMPATHY_CONTACT_LIST_CAN_REMOVE) + flags |= EMPATHY_INDIVIDUAL_MANAGER_CAN_REMOVE; + if (list_flags & EMPATHY_CONTACT_LIST_CAN_ALIAS) + flags |= EMPATHY_INDIVIDUAL_MANAGER_CAN_ALIAS; + if (list_flags & EMPATHY_CONTACT_LIST_CAN_GROUP) + flags |= EMPATHY_INDIVIDUAL_MANAGER_CAN_GROUP; + + return flags; +} |