aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-11 17:32:40 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 01:45:59 +0800
commit342a4344f7f62d7b55e64f6f708b4b696b0765c3 (patch)
tree28f0a1e4f2ee3a4fc4545d0e7840f910fe72f703
parent61b92614a738e8fefc9376aa66fe14b00167e30c (diff)
downloadgsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar.gz
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar.bz2
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar.lz
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar.xz
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.tar.zst
gsoc2013-empathy-342a4344f7f62d7b55e64f6f708b4b696b0765c3.zip
CallWindow: don't add calls to searches if they don't match
-rw-r--r--libempathy-gtk/empathy-log-window.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index f80dfbd46..8d3fcd838 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -1147,6 +1147,21 @@ log_window_append_call (TplEvent *event,
GDateTime *started_date, *finished_date;
GTimeSpan span;
+ /* If searching, only add the call if the search string appears anywhere */
+ if (!EMP_STR_EMPTY (log_window->priv->last_find))
+ {
+ if (strstr (tpl_entity_get_identifier (tpl_event_get_sender (event)),
+ log_window->priv->last_find) == NULL &&
+ strstr (tpl_entity_get_identifier (tpl_event_get_receiver (event)),
+ log_window->priv->last_find) == NULL &&
+ strstr (tpl_call_event_get_detailed_end_reason (call),
+ log_window->priv->last_find) == NULL)
+ {
+ DEBUG ("TplCallEvent doesn't match search string, ignoring");
+ return;
+ }
+ }
+
started_date = g_date_time_new_from_unix_utc (
tpl_event_get_timestamp (event));