Index: trunk/doc-rnd/TODO =================================================================== --- trunk/doc-rnd/TODO (revision 3646) +++ trunk/doc-rnd/TODO (revision 3647) @@ -7,7 +7,7 @@ - drawing a lot of rats is slow - does it redraw/flush after each rat? [report:Chris] - Display(cycleclip) [or line_refraction] while DRC enforce settings toggled 'on' can cause isolated trace crossing, violating DRC + xy format export is under 'bom' in export menu, but is of use in of itself [gtk, core] - - gui window quit (destroy) queues and doesn't work whenever action command mode is active [report:miloh] + + gtk: gui window quit (destroy) queues and doesn't work whenever action command mode is active [report:miloh] - dir rename trunk/pcblib/tru-hole should handle make correctly and not walk on existing web services or user installs - replace settings with lihata (conf_*) Index: trunk/src_plugins/hid_gtk/gui-command-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-command-window.c (revision 3646) +++ trunk/src_plugins/hid_gtk/gui-command-window.c (revision 3647) @@ -40,7 +40,7 @@ static GtkWidget *combo_vbox; static GList *history_list; static gchar *command_entered; -static GMainLoop *loop; +GMainLoop *ghid_entry_loop; /* gui-command-window.c provides two interfaces for getting user input @@ -196,8 +196,8 @@ g_free(command); } else { - if (loop && g_main_loop_is_running(loop)) /* should always be */ - g_main_loop_quit(loop); + if (ghid_entry_loop && g_main_loop_is_running(ghid_entry_loop)) /* should always be */ + g_main_loop_quit(ghid_entry_loop); command_entered = command; /* Caller will free it */ } } @@ -327,8 +327,8 @@ if (ksym != GDK_Escape) return FALSE; - if (loop && g_main_loop_is_running(loop)) /* should always be */ - g_main_loop_quit(loop); + if (ghid_entry_loop && g_main_loop_is_running(ghid_entry_loop)) /* should always be */ + g_main_loop_quit(ghid_entry_loop); command_entered = NULL; /* We are aborting */ return TRUE; @@ -380,11 +380,11 @@ gtk_widget_grab_focus(GTK_WIDGET(ghidgui->command_entry)); escape_sig_id = g_signal_connect(G_OBJECT(ghidgui->command_entry), "key_press_event", G_CALLBACK(command_escape_cb), NULL); - loop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(loop); + ghid_entry_loop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(ghid_entry_loop); - g_main_loop_unref(loop); - loop = NULL; + g_main_loop_unref(ghid_entry_loop); + ghid_entry_loop = NULL; ghidgui->command_entry_status_line_active = FALSE; Index: trunk/src_plugins/hid_gtk/gui-top-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-top-window.c (revision 3646) +++ trunk/src_plugins/hid_gtk/gui-top-window.c (revision 3647) @@ -934,6 +934,9 @@ static gint delete_chart_cb(GtkWidget * widget, GdkEvent * event, GHidPort * port) { + if (ghid_entry_loop != NULL) + g_main_loop_quit(ghid_entry_loop); + hid_action("Quit"); /* Index: trunk/src_plugins/hid_gtk/gui.h =================================================================== --- trunk/src_plugins/hid_gtk/gui.h (revision 3646) +++ trunk/src_plugins/hid_gtk/gui.h (revision 3647) @@ -520,4 +520,6 @@ void ghid_fullscreen_apply(void); +GMainLoop *ghid_entry_loop; + #endif /* PCB_HID_GTK_GHID_GUI_H */