From 3933f5a07a86c8dece3d4b17a02735f57cbfdb54 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emilou@emilou-desktop.(none)> Date: Fri, 12 Jun 2009 16:59:05 -0400 Subject: [PATCH] [#961] Filter on the history type OK --- sflphone-client-gnome/src/contacts/history.c | 4 ++-- sflphone-client-gnome/src/contacts/searchbar.c | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c index f76dd62589..c547ac0fca 100644 --- a/sflphone-client-gnome/src/contacts/history.c +++ b/sflphone-client-gnome/src/contacts/history.c @@ -98,8 +98,8 @@ static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpoi else { // We need a match on the history_state_t and the current search type - if ( (history_entry->_history_state + 1) == (int)get_current_history_search_type ()) - return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0); + return (history_entry->_history_state + 1) == (int)get_current_history_search_type () && + g_regex_match_simple(search, text, G_REGEX_CASELESS, 0); } } } diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index be8ad422b9..f9cf62c909 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -51,6 +51,8 @@ static void search_all (GtkWidget *item, GtkEntry *entry) gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, "Search all\n" "Click here to change the search type"); + + history_search (HistorySearchType); } static void search_by_missed (GtkWidget *item, GtkEntry *entry) @@ -62,6 +64,8 @@ static void search_by_missed (GtkWidget *item, GtkEntry *entry) gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, "Search by missed call\n" "Click here to change the search type"); + + history_search (HistorySearchType); } static void search_by_incoming (GtkWidget *item, GtkEntry *entry) @@ -73,6 +77,8 @@ static void search_by_incoming (GtkWidget *item, GtkEntry *entry) gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, "Search by incoming call\n" "Click here to change the search type"); + + history_search (HistorySearchType); } static void search_by_outgoing (GtkWidget *item, GtkEntry *entry) @@ -84,6 +90,8 @@ static void search_by_outgoing (GtkWidget *item, GtkEntry *entry) gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, "Search by outgoing call\n" "Click here to change the search type"); + + history_search (HistorySearchType); } static void icon_press_cb (GtkEntry *entry, gint position, GdkEventButton *event, gpointer data) -- GitLab