Skip to content
Snippets Groups Projects
Commit 3933f5a0 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#961] Filter on the history type OK

parent 6c74e3f0
No related branches found
No related tags found
No related merge requests found
...@@ -98,8 +98,8 @@ static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpoi ...@@ -98,8 +98,8 @@ static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpoi
else else
{ {
// We need a match on the history_state_t and the current search type // 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 (history_entry->_history_state + 1) == (int)get_current_history_search_type () &&
return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0); g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
} }
} }
} }
......
...@@ -51,6 +51,8 @@ static void search_all (GtkWidget *item, GtkEntry *entry) ...@@ -51,6 +51,8 @@ static void search_all (GtkWidget *item, GtkEntry *entry)
gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY, gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
"Search all\n" "Search all\n"
"Click here to change the search type"); "Click here to change the search type");
history_search (HistorySearchType);
} }
static void search_by_missed (GtkWidget *item, GtkEntry *entry) static void search_by_missed (GtkWidget *item, GtkEntry *entry)
...@@ -62,6 +64,8 @@ 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, gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
"Search by missed call\n" "Search by missed call\n"
"Click here to change the search type"); "Click here to change the search type");
history_search (HistorySearchType);
} }
static void search_by_incoming (GtkWidget *item, GtkEntry *entry) static void search_by_incoming (GtkWidget *item, GtkEntry *entry)
...@@ -73,6 +77,8 @@ 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, gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
"Search by incoming call\n" "Search by incoming call\n"
"Click here to change the search type"); "Click here to change the search type");
history_search (HistorySearchType);
} }
static void search_by_outgoing (GtkWidget *item, GtkEntry *entry) static void search_by_outgoing (GtkWidget *item, GtkEntry *entry)
...@@ -84,6 +90,8 @@ 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, gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
"Search by outgoing call\n" "Search by outgoing call\n"
"Click here to change the search type"); "Click here to change the search type");
history_search (HistorySearchType);
} }
static void icon_press_cb (GtkEntry *entry, gint position, GdkEventButton *event, gpointer data) static void icon_press_cb (GtkEntry *entry, gint position, GdkEventButton *event, gpointer data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment