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-utils.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-utils.c')
-rw-r--r-- | libempathy/empathy-utils.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 56da323b9..df2a41abd 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -569,6 +569,30 @@ empathy_folks_presence_type_to_tp (FolksPresenceType type) return (TpConnectionPresenceType) type; } +gboolean +empathy_folks_individual_contains_contact (FolksIndividual *individual) +{ + GList *personas, *l; + + g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), FALSE); + + personas = folks_individual_get_personas (individual); + for (l = personas; l != NULL; l = l->next) + { + TpfPersona *persona = l->data; + + if (TPF_IS_PERSONA (persona)) + { + TpContact *contact = tpf_persona_get_contact (persona); + + if (TP_IS_CONTACT (contact)) + return TRUE; + } + } + + return FALSE; +} + EmpathyContact * empathy_contact_from_folks_individual (FolksIndividual *individual) { |