Re: destroying a dialog



Maher Awamy wrote:


the signal_connect passes the button first, so you are destroying the button
NOT the dialog, the correct way to do this would be

gtk_signal_connect(GTK_OBJECT(cance_button), "clicked",
GTK_SIGNAL_FUNC(cancel_clicked_cb), dialog);

void cancel_clicked_cb(GtkWidget *button, GtkWidget *dialog)
{
        gtk_widget_destroy(dialog);
        return;
}


Thanks. Jon Trowbridge also passed on gtk_signal_connect_object() as a
solution.

-- 
Regards,
Greg Martin
gregm netidea com




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