Ethereal-dev: Re: [Ethereal-dev] What is the trick to getting a filter button to work

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

From: Richard Sharpe <rsharpe@xxxxxxxxxxxxxxxxx>
Date: Sun, 26 Oct 2003 18:10:26 -0800 (PST)
On Sun, 26 Oct 2003, Guy Harris wrote:

> On Sun, Oct 26, 2003 at 03:45:18PM -0800, Richard Sharpe wrote:
> > I am creating a filter button in the SMB Service Response Time dialog box.
> > 
> > However, I can't get it to update the filter text string right next to it.
> > 
> > Is there a trick? Here is what I am doing?
> > 
> >         static construct_args_t args = {
> >           "Service Response Time Statistics Filter",
> >           TRUE,
> >           TRUE
> >         };
> > 
> > 	...
> > 
> >         /* Filter button */
> >         filter_bt = gtk_button_new_with_label("Filter:");
> >         SIGNAL_CONNECT(filter_bt, "clicked", display_filter_construct_cb, 
> > &args\);
> >         gtk_box_pack_start(GTK_BOX(filter_box), filter_bt, FALSE, TRUE, 
> > 0);
> >         gtk_widget_show(filter_bt);
> 
> After creating the entry for the filter text string, did you associate
> it with the filter button with
> 
> 	OBJECT_SET_DATA(filter_bt, E_FILT_TE_PTR_KEY, filter_text_box);
> 
> If not, the filter button doesn't know what the text entry field is.

I eventually found that that was needed, but thanks.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com