[empathy] CallWindow: don't add calls to searches if they don't match
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] CallWindow: don't add calls to searches if they don't match
- Date: Mon, 11 Jul 2011 17:59:11 +0000 (UTC)
commit 342a4344f7f62d7b55e64f6f708b4b696b0765c3
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Mon Jul 11 10:32:40 2011 +0100
CallWindow: don't add calls to searches if they don't match
libempathy-gtk/empathy-log-window.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index f80dfbd..8d3fcd8 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]