summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-09-17 20:41:58 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-09-17 20:41:58 +0200
commit97f758a93015831db9c7ff0944840e5181434b2b (patch)
tree2f395367f95018a4aab0902030ec91c21694b59c /src
parente873640c4a9f15af4d46fa95236e60e7e5a219e9 (diff)
add show_quit_dialog dillorc option
Diffstat (limited to 'src')
-rw-r--r--src/prefs.c1
-rw-r--r--src/prefs.h1
-rw-r--r--src/prefsparser.cc1
-rw-r--r--src/uicmd.cc4
4 files changed, 5 insertions, 2 deletions
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)