I have two GtkWindows, when a button is clicked the window1 must free all object inside on it and close, but calling the associated-function with the destroy event. gtk_main_quit() can’t be used, it doesn’t call associated-function with destroy event. I have tried gtk_widget_destroy() but I get the error message(at run-time) from gtk:
Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET
(widget)’ failed
Googling I found gtk_signal_emit_by_name() looks like be really what I need, but isn’t available on GTK3+, that I’m using.
Try
g_signal_emit_by_name(G_OBJECT(window),"destroy");It works?