From: Bert Wesarg Date: Thu, 20 Oct 2011 19:32:30 +0000 (+0200) Subject: git-gui: include the file path in guitools confirmation dialog X-Git-Tag: gitgui-0.16.0~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95fa862b577711918fe17cadc3b18851cd077a2b;p=git.git 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 --- 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 + } } }