Try quitting after downloading if there are no windows open

This commit is contained in:
Chris Young 2014-02-10 20:40:08 +00:00
parent 55a96a7eee
commit cbf423d4c6
3 changed files with 4 additions and 0 deletions

View File

@ -282,6 +282,7 @@ static void gui_download_window_done(struct gui_download_window *dw)
nsurl_unref(url);
}
}
ami_try_quit(); /* In case the only window open was this download */
}
static void gui_download_window_error(struct gui_download_window *dw,

View File

@ -2792,6 +2792,8 @@ void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL donotwai
void ami_try_quit(void)
{
if(!IsMinListEmpty(window_list)) return;
if(nsoption_bool(close_no_quit) == false)
{
netsurf_quit = true;

View File

@ -153,6 +153,7 @@ struct gui_window
void ami_get_msg(void);
void ami_close_all_tabs(struct gui_window_2 *gwin);
void ami_try_quit(void);
void ami_quit_netsurf(void);
void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw);
STRPTR ami_locale_langs(void);