I am trying to build a gtk widget which will exists when Escape key is pressed. Here is my code.
gtk_signal_connect (GTK_OBJECT(window), "delete-event",
GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
/* FIXME */
GtkAccelGroup *accels = gtk_accel_group_new();
gtk_window_add_accel_group(GTK_WINDOW(window), accels);
gtk_widget_add_accelerator(window, "delete-event", accels,
GDK_Escape, 0, GTK_ACCEL_VISIBLE);
But it doesn't work saying widget `GtkWindow' has no activatable signal "delete-event" without arguments
what's wrong ? or Is there any other ways to achieve this ?