summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-02-23 15:33:41 -0800
committerDan Nicholson <dbn.lists@gmail.com>2013-02-23 21:57:31 -0800
commit0172e9c4690a85ffa78255417c4b06c820c1131d (patch)
treedf7786e84549f1bd6e4ec21d346aca007da52f10
parent0199c621862e5037129cbe634e2920c90c04a55a (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.
-rw-r--r--test/previewer.c3
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();