[geany/geany] da1253: Merge pull request #3033 from eht16/add_confirmation_on_session_replace

Enrico Tröger git-noreply at xxxxx
Sun Feb 13 16:41:40 UTC 2022


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   GitHub <noreply at github.com>
Date:        Sun, 13 Feb 2022 16:41:40 UTC
Commit:      da125332f779eb367ffaea8569259940c1e8803a
             https://github.com/geany/geany/commit/da125332f779eb367ffaea8569259940c1e8803a

Log Message:
-----------
Merge pull request #3033 from eht16/add_confirmation_on_session_replace

Add a confirmation dialog on search & replace for the whole session


Modified Paths:
--------------
    src/search.c

Modified: src/search.c
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -30,6 +30,7 @@
 #include "search.h"
 
 #include "app.h"
+#include "dialogs.h"
 #include "document.h"
 #include "encodings.h"
 #include "encodingsprivate.h"
@@ -1455,6 +1456,14 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
 		return;
 	}
 
+	if (response == GEANY_RESPONSE_REPLACE_IN_SESSION) {
+		if (! dialogs_show_question_full(replace_dlg.dialog, NULL, NULL,
+			_("This operation will modify all open files which contain the text to replace."),
+			_("Are you sure to replace in the whole session?"))) {
+			return;
+		}
+	}
+
 	search_backwards_re = settings.replace_search_backwards;
 	search_replace_escape_re = settings.replace_escape_sequences;
 	find = g_strdup(gtk_entry_get_text(GTK_ENTRY(replace_dlg.find_entry)));



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list