diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | dillorc | 2 | ||||
-rw-r--r-- | src/prefs.c | 1 | ||||
-rw-r--r-- | src/prefs.h | 1 | ||||
-rw-r--r-- | src/prefsparser.cc | 1 | ||||
-rw-r--r-- | src/uicmd.cc | 4 |
6 files changed, 9 insertions, 2 deletions
@@ -9,6 +9,8 @@ dillo-3.0.1 [not released yet] - Privacy -- never send cookies when making third-party requests, and never accept cookies in the responses to these requests. Patches: corvid ++- Add show_quit_dialog dillorc option. + Patch: Johannes Hofmann ----------------------------------------------------------------------------- @@ -251,6 +251,8 @@ search_url="Google http://www.google.com/search?ie=UTF-8&oe=UTF-8&q=%s" # You can hold SHIFT to temporarily revert this behaviour. #focus_new_tab=YES +# Ask before quitting Dillo with more than one window or tab open. +#show_quit_dialog=YES #------------------------------------------------------------------------- # DEBUG MESSAGES SECTION diff --git a/src/prefs.c b/src/prefs.c index 234c9288..f243205a 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -90,6 +90,7 @@ void a_Prefs_init(void) prefs.show_home = TRUE; prefs.show_msg = TRUE; prefs.show_progress_box = TRUE; + prefs.show_quit_dialog = TRUE; prefs.show_reload = TRUE; prefs.show_save = TRUE; prefs.show_search = TRUE; diff --git a/src/prefs.h b/src/prefs.h index 0dd9ea81..f1a3d538 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -72,6 +72,7 @@ struct _DilloPrefs { bool_t show_search; bool_t show_help; bool_t show_progress_box; + bool_t show_quit_dialog; bool_t fullwindow_start; bool_t load_images; bool_t load_stylesheets; diff --git a/src/prefsparser.cc b/src/prefsparser.cc index abdc14b4..efe64a0e 100644 --- a/src/prefsparser.cc +++ b/src/prefsparser.cc @@ -98,6 +98,7 @@ int PrefsParser::parseOption(char *name, char *value) { "show_home", &prefs.show_home, PREFS_BOOL }, { "show_msg", &prefs.show_msg, PREFS_BOOL }, { "show_progress_box", &prefs.show_progress_box, PREFS_BOOL }, + { "show_quit_dialog", &prefs.show_quit_dialog, PREFS_BOOL }, { "show_reload", &prefs.show_reload, PREFS_BOOL }, { "show_save", &prefs.show_save, PREFS_BOOL }, { "show_search", &prefs.show_search, PREFS_BOOL }, diff --git a/src/uicmd.cc b/src/uicmd.cc index 5ce7afb4..38225047 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -433,7 +433,7 @@ static void win_cb (Fl_Widget *w, void *cb_data) { CustTabs *tabs = (CustTabs*) cb_data; int choice = 1, ntabs = tabs->num_tabs(); - if (ntabs > 1) + if (prefs.show_quit_dialog && ntabs > 1) choice = a_Dialog_choice5("Window contains more than one tab.", "Close", "Cancel", NULL, NULL, NULL); if (choice == 1) @@ -573,7 +573,7 @@ void a_UIcmd_close_all_bw(void *) BrowserWindow *bw; int choice = 1; - if (a_Bw_num() > 1) + if (prefs.show_quit_dialog && a_Bw_num() > 1) choice = a_Dialog_choice5("More than one open tab or window.", "Quit", "Cancel", NULL, NULL, NULL); if (choice == 1) |