Ethereal-dev: Re: [Ethereal-dev] Help with a scoping problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Fri, 10 Sep 2004 17:37:45 +0200
Palmer Thomas J Civ HQ SSG/ENEP wrote:

Hi List,


I am trying to implement a pick list for the capture filter (capture_dlg.c) and I've run into a problem.

1) I have the following functions that exist in a new file within the gtk directory (both are linked into libui.lib):

extern void  cfilter_combo_remove_from_list(gchar *s);
extern gboolean cfilter_combo_add_recent(gchar *s);

2) I add the capture filter to a GList within capture_prep_ok_cb() by calling cfilter_combo_add_recent() 3) If the filter syntax is incorrect, which is determined within capture.c, I want to call cfilter_combo_remove_from_list(cfile.cfilter) to remove the incorrect entry from the list

Wouldn't it be better to not insert the value until verified?

4) When I call cfilter_combo_remove_from_list(cfile.cfilter) from capture.c, I get the following GTK assertions:

You didn't included capture.c in the diff, so it's hard to get the point.

BTW: another thing I've noticed: the files in gtk/Makefile.common are sorted in alphabetical order, but you simply appended it

Regards, ULFL