[Glade-users] Signal question.

On Mon, 2008-10-13 at 15:34 -0500, Peter Keller wrote:
On Mon, Oct 13, 2008 at 03:29:30PM -0500, Alexey Kurochkin wrote:
I do not think GtkObject's "destroy" is the right signal. You might want
to try connecting gtk_widget_hide_on_delete() to "delete-event" signal
on the widget, or any custom function for that matter which would call
gtk_widget_hide() and return TRUE.

Ok, apparently I have found some bad info on the internet (really?), because
the examples I found for using glade-3 implied that the signal functions
had this prototype:
void some_func(GTKWidget *widget, gpointer user_data);

Is that not correct? If not, then what is the type and meaning of the
return value for these handler functions?

Nope. All are different. In this particular case it is:
gboolean user_function (GtkWidget *widget, GdkEvent *event, gpointer user_data);
Return TRUE to stop further propagation of the event (which would destroy the widget otherwise).
As described in the manual:

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