fix menu and C-q gtk exiting (closes bug #2184)

This commit is contained in:
Vincent Sanders 2014-08-23 17:10:39 -07:00
parent a57278f574
commit 91deff3797
3 changed files with 10 additions and 22 deletions

View File

@ -539,7 +539,6 @@ static void gui_quit(void)
LOG(("Quitting GUI"));
/* Ensure all scaffoldings are destroyed before we go into exit */
nsgtk_scaffolding_destroy();
nsgtk_download_destroy();
urldb_save_cookies(nsoption_charp(cookie_jar));
urldb_save(nsoption_charp(url_file));

View File

@ -265,20 +265,6 @@ static gboolean scaffolding_window_delete_event(GtkWidget *widget,
return TRUE;
}
/* exported interface documented in gtk_scaffold.h */
void nsgtk_scaffolding_destroy(void)
{
struct nsgtk_scaffolding *gs;
gs = scaf_list;
while (gs != NULL) {
LOG(("destroying scaffold: %p", gs));
if (gtk_widget_in_destruction(GTK_WIDGET(gs->window)) != TRUE) {
gtk_widget_destroy(GTK_WIDGET(gs->window));
}
}
}
/**
* Update the back and forward button sensitivity.
*/
@ -915,8 +901,16 @@ MULTIHANDLER(closewindow)
MULTIHANDLER(quit)
{
if (nsgtk_check_for_downloads(g->window) == false)
netsurf_quit = true;
struct nsgtk_scaffolding *gs;
if (nsgtk_check_for_downloads(g->window) == false) {
gs = scaf_list;
while (gs != NULL) {
gtk_widget_destroy(GTK_WIDGET(gs->window));
gs = gs->next;
}
}
return TRUE;
}

View File

@ -192,11 +192,6 @@ void nsgtk_scaffolding_toggle_search_bar_visibility(struct nsgtk_scaffolding *g)
*/
void nsgtk_scaffolding_set_top_level(struct gui_window *g);
/**
* Destroy all scaffolds.
*/
void nsgtk_scaffolding_destroy(void);
/**
* update the sensitivity of context sensitive UI elements
*