]> git.0d.be Git - empathy.git/commitdiff
CallWindow: don't add calls to searches if they don't match
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Mon, 11 Jul 2011 09:32:40 +0000 (10:32 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Mon, 11 Jul 2011 17:45:59 +0000 (18:45 +0100)
libempathy-gtk/empathy-log-window.c

index f80dfbd464178b7635efd44451a57e35decc65de..8d3fcd83881d25b9ac5993bf439de8ee2f619630 100644 (file)
@@ -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));