diff options
author | Bert Wesarg <bert.wesarg@googlemail.com> | 2011-10-20 21:32:30 +0200 |
---|---|---|
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | 2011-10-21 23:15:10 +0100 |
commit | 95fa862b577711918fe17cadc3b18851cd077a2b (patch) | |
tree | f575ef2c838de2fb35674ea5e6e3d394b2410d59 | |
parent | ff3f01bba9d67a6f7194bbcf2716e55cc596cce1 (diff) | |
download | git-95fa862b577711918fe17cadc3b18851cd077a2b.tar.gz git-95fa862b577711918fe17cadc3b18851cd077a2b.tar.xz |
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 <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r-- | lib/tools.tcl | 10 |
1 files 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 + } } } |