I'm new to gtkD and for learning purposes I try to translate this code to D:

gtkforums.com - link

Now I'm stuck at this line in main:

g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);

My guess was this:

window.addOnDestroy(&Main.quit);

In gtkc.gobjecttypes I found gsignalconnect as a TODO but without a hint, how it is replaced.

But this doesn' work. Can someone please hint me to how these signals are handled in gtkD.