1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-22 20:14:04 +02:00

eeshow/gui/help.c: properly support the "destroy" event

This commit is contained in:
Werner Almesberger 2016-08-19 14:47:11 -03:00
parent f8c00fb6a2
commit 35bc584767

View File

@ -22,6 +22,13 @@ static GtkWidget *window = NULL;
static bool visible;
static void destroy_help(GtkWidget *object, gpointer user_data)
{
gtk_widget_destroy(window);
window = NULL;
}
static void new_help_window(void)
{
GtkWidget *view;
@ -41,8 +48,7 @@ static void new_help_window(void)
#include "../help.inc"
, NULL);
g_signal_connect(window, "destroy",
G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(window, "destroy", G_CALLBACK(destroy_help), NULL);
gtk_widget_show_all(window);
}