Re: [PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx> writes:

>Signed-off-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
>---
> lib/tools.tcl |   10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
>diff --git a/lib/tools.tcl b/lib/tools.tcl
>index 95e6e55..39e08f0 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 %s on file \"%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
>+			}
> 		}
> 	}

This looks good. I modified the string there to use positional
parameters as sometimes translations need to re-order things and the
msgcat format can support this using [mc {%2$s and %1$d} $first $second]
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]