diff --git a/c/gtk-tutorial/helloworld/helloworld_with_box.c b/c/gtk-tutorial/helloworld/helloworld_with_box.c index 71f6389..d5d224d 100644 --- a/c/gtk-tutorial/helloworld/helloworld_with_box.c +++ b/c/gtk-tutorial/helloworld/helloworld_with_box.c @@ -82,6 +82,13 @@ int main( int argc, * recommend showing the window last, so it all pops up at once. */ gtk_widget_show (button); + /* Add quiet button */ + button = gtk_button_new_with_label ("Quit"); + g_signal_connect_swapped (G_OBJECT (button), "clicked", + G_CALLBACK (delete_event), G_OBJECT (window)); + gtk_box_pack_start (GTK_BOX (box1), button, TRUE, TRUE, 0); + gtk_widget_show (button); + gtk_widget_show (box1); gtk_widget_show (window);