diff --git a/doc/geany.txt b/doc/geany.txt index 998a0bed4d..938916d669 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -2586,6 +2586,8 @@ msgwin_messages_visible Whether to show the Messages tab in the t Messages Window msgwin_scribble_visible Whether to show the Scribble tab in the true immediately Messages Window +project_ask_close Whether to show the confirmation dialog true immediately + when closing the current project **VTE related** send_selection_unsafe By default, Geany strips any trailing false immediately newline characters from the current diff --git a/src/project.c b/src/project.c index 19eef0f26b..f53f976dea 100644 --- a/src/project.c +++ b/src/project.c @@ -654,17 +654,16 @@ gboolean project_ask_close(void) { if (app->project != NULL) { - if (dialogs_show_question_full(NULL, GTK_STOCK_CLOSE, GTK_STOCK_CANCEL, + if (!project_prefs.project_ask_close || + dialogs_show_question_full(NULL, GTK_STOCK_CLOSE, GTK_STOCK_CANCEL, _("Do you want to close it before proceeding?"), _("The '%s' project is open."), app->project->name)) { return project_close(FALSE); } - else - return FALSE; + return FALSE; } - else - return TRUE; + return TRUE; } diff --git a/src/project.h b/src/project.h index 4fdacb65bb..3a54c5e8b3 100644 --- a/src/project.h +++ b/src/project.h @@ -57,6 +57,7 @@ typedef struct ProjectPrefs gchar *session_file; gboolean project_session; gboolean project_file_in_basedir; + gboolean project_ask_close; } ProjectPrefs; extern ProjectPrefs project_prefs; diff --git a/src/ui_utils.c b/src/ui_utils.c index 92a0d3565e..f969694671 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2335,6 +2335,8 @@ void ui_init_prefs(void) "statusbar_template", _(DEFAULT_STATUSBAR_TEMPLATE)); stash_group_add_boolean(group, &ui_prefs.new_document_after_close, "new_document_after_close", FALSE); + stash_group_add_boolean(group, &project_prefs.project_ask_close, + "project_ask_close", TRUE); stash_group_add_boolean(group, &interface_prefs.msgwin_status_visible, "msgwin_status_visible", TRUE); stash_group_add_boolean(group, &interface_prefs.msgwin_compiler_visible,