RE: [gtk-list] Re: Detecting window from button




> On Mon, 19 Oct 1998, Martin Schulze wrote:
> > 
> > The new dialog has a Close button.  However the signal handler doesn't
> > know which window to close.  Storing one global variable for this very
> > windows isn't a solution but a bad workaround.
> >
> 
> Why not pass the dialog as callback data? i.e.
> 
> gtk_signal_connect(button, "clicked", callback_func, dialog);

You can also use gtk_widget_get_toplevel (button) to get the dialog.


Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]