diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2013-02-23 15:33:41 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2013-02-23 21:57:31 -0800 |
commit | 0172e9c4690a85ffa78255417c4b06c820c1131d (patch) | |
tree | df7786e84549f1bd6e4ec21d346aca007da52f10 /test/previewer.c | |
parent | 0199c621862e5037129cbe634e2920c90c04a55a (diff) |
previewer: Destroy window on quit to use same exit path
When the Quit button was clicked, the main loop was being quit
immediately without destroying the window. This makes sure the window is
destroyed like when it's deleted so the same cleanup code is exercised.
Diffstat (limited to 'test/previewer.c')
-rw-r--r-- | test/previewer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/previewer.c b/test/previewer.c index 3690357..a18c83c 100644 --- a/test/previewer.c +++ b/test/previewer.c @@ -152,7 +152,8 @@ main(int argc, char *argv[]) gtk_container_add(GTK_CONTAINER(window), box); button = gtk_button_new_with_label("Quit"); gtk_box_pack_end(GTK_BOX(box), button, FALSE, FALSE, 0); - g_signal_connect(button, "clicked", G_CALLBACK(gtk_main_quit), NULL); + g_signal_connect_swapped(button, "clicked", + G_CALLBACK(gtk_widget_destroy), window); /* create a socket to embed the viewer in */ socket = gtk_socket_new(); |