1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-17 21:16:15 +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 bool visible;
static void destroy_help(GtkWidget *object, gpointer user_data)
{
gtk_widget_destroy(window);
window = NULL;
}
static void new_help_window(void) static void new_help_window(void)
{ {
GtkWidget *view; GtkWidget *view;
@ -41,8 +48,7 @@ static void new_help_window(void)
#include "../help.inc" #include "../help.inc"
, NULL); , NULL);
g_signal_connect(window, "destroy", g_signal_connect(window, "destroy", G_CALLBACK(destroy_help), NULL);
G_CALLBACK(gtk_main_quit), NULL);
gtk_widget_show_all(window); gtk_widget_show_all(window);
} }