aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-22 20:54:56 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-25 16:48:29 +0800
commitb014019bb9303a17c5ca4d10ef25f3d60f71dab2 (patch)
treedbd6891f2dcaab326096cbc4dba1f17abcbacc57 /libempathy-gtk
parent7e5f89c6fb56ee812d4b90f02c0289b9e77bd0ae (diff)
downloadgsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar.gz
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar.bz2
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar.lz
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar.xz
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.tar.zst
gsoc2013-empathy-b014019bb9303a17c5ca4d10ef25f3d60f71dab2.zip
factor out empathy_individual_get_client_types()
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-store.c46
1 files changed, 2 insertions, 44 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index f27aad95c..06ef65a33 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -100,48 +100,6 @@ static void individual_store_contact_update (EmpathyIndividualStore *self,
G_DEFINE_TYPE (EmpathyIndividualStore, empathy_individual_store,
GTK_TYPE_TREE_STORE);
-static const gchar * const *
-individual_get_client_types (FolksIndividual *individual)
-{
- GeeSet *personas;
- GeeIterator *iter;
- const gchar * const *types = NULL;
- FolksPresenceType presence_type = FOLKS_PRESENCE_TYPE_UNSET;
-
- personas = folks_individual_get_personas (individual);
- iter = gee_iterable_iterator (GEE_ITERABLE (personas));
- while (gee_iterator_next (iter))
- {
- FolksPresenceDetails *presence;
- FolksPersona *persona = gee_iterator_get (iter);
-
- /* We only want personas which have presence and a TpContact */
- if (!empathy_folks_persona_is_interesting (persona))
- goto while_finish;
-
- presence = FOLKS_PRESENCE_DETAILS (persona);
-
- if (folks_presence_details_typecmp (
- folks_presence_details_get_presence_type (presence),
- presence_type) > 0)
- {
- TpContact *tp_contact;
-
- presence_type = folks_presence_details_get_presence_type (presence);
-
- tp_contact = tpf_persona_get_contact (TPF_PERSONA (persona));
- if (tp_contact != NULL)
- types = tp_contact_get_client_types (tp_contact);
- }
-
-while_finish:
- g_clear_object (&persona);
- }
- g_clear_object (&iter);
-
- return types;
-}
-
static void
add_individual_to_store (GtkTreeStore *store,
GtkTreeIter *iter,
@@ -156,7 +114,7 @@ add_individual_to_store (GtkTreeStore *store,
empathy_individual_can_audio_video_call (individual, &can_audio_call,
&can_video_call, NULL);
- types = individual_get_client_types (individual);
+ types = empathy_individual_get_client_types (individual);
gtk_tree_store_insert_with_values (store, iter, parent, 0,
EMPATHY_INDIVIDUAL_STORE_COL_NAME,
@@ -703,7 +661,7 @@ individual_store_contact_update (EmpathyIndividualStore *self,
empathy_individual_can_audio_video_call (individual, &can_audio_call,
&can_video_call, NULL);
- types = individual_get_client_types (individual);
+ types = empathy_individual_get_client_types (individual);
gtk_tree_store_set (GTK_TREE_STORE (self), l->data,
EMPATHY_INDIVIDUAL_STORE_COL_ICON_STATUS, pixbuf_status,