aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main_filter_toolbar.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-19 21:29:31 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-19 21:29:31 +0000
commitace4a357aa0016ff9b536fedfbcafed972e1cde5 (patch)
tree21f0719bf6e60a794ffba68f67d526d79f05641b /ui/gtk/main_filter_toolbar.c
parent300eb815141dfd850d2d6d99d5fd4221d12ca31e (diff)
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7731 :
Allow the configured number of dfilters to be added to the drop-down list (instead of limiting the list--on a freshly installed system with no recent dfilters--to just 2). Regression caused by r42439. svn path=/trunk/; revision=45012
Diffstat (limited to 'ui/gtk/main_filter_toolbar.c')
-rw-r--r--ui/gtk/main_filter_toolbar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gtk/main_filter_toolbar.c b/ui/gtk/main_filter_toolbar.c
index abb4b77ffb..591e0a7d39 100644
--- a/ui/gtk/main_filter_toolbar.c
+++ b/ui/gtk/main_filter_toolbar.c
@@ -314,7 +314,7 @@ dfilter_entry_match(GtkWidget *filter_cm, char *s, int *index)
g_value_unset (&value);
} while (gtk_tree_model_iter_next (model, &iter));
- *index = i;
+ *index = -1;
return FALSE;
}
@@ -397,10 +397,10 @@ main_filter_packets(capture_file *cf, const gchar *dftext, gboolean force)
if (cf_status == CF_OK && strlen(s) > 0) {
int index;
- if(!dfilter_entry_match(filter_cm,s, &index) || index != 0) {
+ if(!dfilter_entry_match(filter_cm,s, &index) || index > -1) {
/* If the filter is already there but not the first entry, remove it */
- if (index > 0) {
+ if (index > -1) {
gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(filter_cm), index);
index--;
}