mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
fix menu and C-q gtk exiting (closes bug #2184)
This commit is contained in:
parent
a57278f574
commit
91deff3797
@ -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));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user