From 95fa862b577711918fe17cadc3b18851cd077a2b Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Thu, 20 Oct 2011 21:32:30 +0200 Subject: [PATCH] git-gui: include the file path in guitools confirmation dialog For those guitools that require a filename, display this filename when asking the user to confirm the tool launch. [PT: modified to use positional parameters for i18n] Signed-off-by: Bert Wesarg Signed-off-by: Pat Thoyts --- lib/tools.tcl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/tools.tcl b/lib/tools.tcl index 95e6e5553..6ec94113d 100644 --- a/lib/tools.tcl +++ b/lib/tools.tcl @@ -87,8 +87,14 @@ proc tools_exec {fullname} { return } } elseif {[is_config_true "guitool.$fullname.confirm"]} { - if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} { - return + if {[is_config_true "guitool.$fullname.needsfile"]} { + if {[ask_popup [mc "Are you sure you want to run %1\$s on file \"%2\$s\"?" $fullname $current_diff_path]] ne {yes}} { + return + } + } else { + if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} { + return + } } } -- 2.26.2