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>
Bert Wesarg committed
Oct 20, 2011 at 21:32 UTC
95fa862b577711918fe17cadc3b18851cd077a2b
1 file changed
+8
-2
lib/tools.tcl
+8
-2
@@ -87,8 +87,14 @@ proc tools_exec {fullname} {
87
return
88
}
89
} elseif {[is_config_true "guitool.$fullname.confirm"]} {
90
- if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
91
- return
90
+ if {[is_config_true "guitool.$fullname.needsfile"]} {
91
+ if {[ask_popup [mc "Are you sure you want to run %1\$s on file \"%2\$s\"?" $fullname $current_diff_path]] ne {yes}} {
92
+ return
93
+ }
94
+ } else {
95
+ if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
96
+ return
97
+ }
98
}
99
}
100