aboutsummaryrefslogtreecommitdiffstats
path: root/filter.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>1998-10-12 01:40:57 +0000
committerGerald Combs <gerald@wireshark.org>1998-10-12 01:40:57 +0000
commit0758da11466778cbd377fade6142bbe7c19ceecd (patch)
treef57ee7de708d072038153022c1ccbd9afa448651 /filter.c
parent73e19611fdb5a6b70951c140c0831c72f04beb5c (diff)
- Added match_strval function to packet.c
- Separated display and capture filters; rearranged some of the look and feel - Lots of other miscellaneous fixes and updates svn path=/trunk/; revision=38
Diffstat (limited to 'filter.c')
-rw-r--r--filter.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/filter.c b/filter.c
index 3538839c03..2a1dcc0efb 100644
--- a/filter.c
+++ b/filter.c
@@ -1,7 +1,7 @@
/* filter.c
* Routines for managing filter sets
*
- * $Id: filter.c,v 1.4 1998/10/10 03:32:07 gerald Exp $
+ * $Id: filter.c,v 1.5 1998/10/12 01:40:50 gerald Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -39,8 +39,7 @@
#include "packet.h"
#include "file.h"
#include "menu.h"
-
-extern capture_file cf;
+#include "prefs.h"
const gchar *fn_key = "filter_name";
const gchar *fl_key = "filter_label";
@@ -182,9 +181,11 @@ filter_prefs_show() {
gtk_widget_show(nl_item);
gtk_object_set_data(GTK_OBJECT(nl_item), fl_key, nl_lb);
gtk_object_set_data(GTK_OBJECT(nl_item), fn_key, flp);
- if (cf.filter && filt->strval)
- if (strcmp(cf.filter, filt->strval) == 0)
+/*
+ if (cf.dfilter && filt->strval)
+ if (strcmp(cf.dfilter, filt->strval) == 0)
l_select = nl_item;
+ */
flp = flp->next;
}
@@ -371,19 +372,15 @@ filter_prefs_ok(GtkWidget *w) {
GList *flp, *sl;
GtkObject *l_item;
filter_def *filt;
+ GtkWidget *mw_filt = gtk_object_get_data(GTK_OBJECT(w), E_FILT_TE_PTR_KEY);
- if (cf.filter) {
- g_free(cf.filter);
- cf.filter = NULL;
- }
-
sl = GTK_LIST(filter_l)->selection;
- if (sl) { /* Something was selected */
+ if (sl && mw_filt) { /* Place something in the filter box. */
l_item = GTK_OBJECT(sl->data);
flp = (GList *) gtk_object_get_data(l_item, fn_key);
if (flp) {
filt = (filter_def *) flp->data;
- cf.filter = g_strdup(filt->strval);
+ gtk_entry_set_text(GTK_ENTRY(mw_filt), filt->strval);
}
}