aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-31 21:24:28 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-31 21:36:45 +0800
commit5dc3feb4979804c710d4e872a1f05bc425fd9410 (patch)
tree56a8c25b388d10f9400aefa72a379d824806fa6b /libempathy-gtk/empathy-individual-view.c
parentd4e5a5295ff83f664c80fe3af61db0692829ea1b (diff)
downloadgsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar.gz
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar.bz2
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar.lz
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar.xz
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.tar.zst
gsoc2013-empathy-5dc3feb4979804c710d4e872a1f05bc425fd9410.zip
factor out empathy_individual_match_words()
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index eb41996f5..ec632989e 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1692,7 +1692,6 @@ individual_view_is_visible_individual (EmpathyIndividualView *self,
{
EmpathyIndividualViewPriv *priv = GET_PRIV (self);
EmpathyLiveSearch *live = EMPATHY_LIVE_SEARCH (priv->search_widget);
- const gchar *str;
GList *personas, *l;
gboolean is_favorite, contains_interesting_persona = FALSE;
@@ -1729,37 +1728,8 @@ individual_view_is_visible_individual (EmpathyIndividualView *self,
return (priv->show_offline || is_online);
}
- /* check alias name */
- str = folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual));
-
- if (empathy_live_search_match (live, str))
- return TRUE;
-
- /* check contact id, remove the @server.com part */
- for (l = personas; l; l = l->next)
- {
- const gchar *p;
- gchar *dup_str = NULL;
- gboolean visible;
-
- if (!empathy_folks_persona_is_interesting (FOLKS_PERSONA (l->data)))
- continue;
-
- str = folks_persona_get_display_id (l->data);
- p = strstr (str, "@");
- if (p != NULL)
- str = dup_str = g_strndup (str, p - str);
-
- visible = empathy_live_search_match (live, str);
- g_free (dup_str);
- if (visible)
- return TRUE;
- }
-
- /* FIXME: Add more rules here, we could check phone numbers in
- * contact's vCard for example. */
-
- return FALSE;
+ return empathy_individual_match_words (individual,
+ empathy_live_search_get_words (live));
}
static gchar *