Re: Destroy Signal
- From: Helmethead <hoshem mel comcen com au>
- To: Sven Neumann <sven gimp org>
- Cc: Jeff Shipman <shippy nmt edu>, CyborgHead netscape net, gtk-list gnome org
- Subject: Re: Destroy Signal
- Date: Mon, 5 Mar 2001 16:04:16 +1100
On Sun, Mar 04, 2001 at 11:02:44PM +0100, Sven Neumann wrote:
> Hi,
>
> Jeff Shipman <shippy nmt edu> writes:
>
> > I think this should work:
> >
> > gtk_widget_connect_object(GTK_OBJECT(mydialog), "delete_event",
> > GTK_SIGNAL_FUNC(gtk_widget_hide),
> > GTK_OBJECT(mydialog));
> >
>
> It should work, but the simpler
>
> gtk_widget_connect (GTK_OBJECT (mydialog), "delete_event",
> GTK_SIGNAL_FUNC (gtk_widget_hide),
> NULL);
>
> should do as well since the signal handler is called with the
> emitting object as the first parameter which happens to be
> the correct pointer in this special case.
>
>
gtk_widget_hide returns void :-)
does C99 include anonymous functions? *g*
gtk_widget_connect (GTK_OBJECT (mydialog), "delete_event",
GTK_SIGNAL_FUNC ((gint (GtkWidget *widget)){gtk_widget_hide (widget);return TRUE;}),
NULL);
probably not
no shortcut for this one :(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]