{"thread":{"id":"28730","subject":"[PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one","startedAt":"2011-10-20T19:32:30Z","lastAt":"2011-10-21T22:43:42Z","messageCount":3,"participants":["Bert Wesarg","Pat Thoyts","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178102","messageId":"2fef219736a0787ed864b5c18adf31f7a4e8acda.1319139139.git.bert.wesarg@googlemail.com","threadId":"28730","inReplyTo":null,"subject":"[PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2011-10-20T19:32:30Z","receivedAt":"2011-10-20T19:32:30Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n---\n lib/tools.tcl |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/lib/tools.tcl b/lib/tools.tcl\nindex 95e6e55..39e08f0 100644\n--- a/lib/tools.tcl\n+++ b/lib/tools.tcl\n@@ -87,8 +87,14 @@ proc tools_exec {fullname} {\n \t\t\treturn\n \t\t}\n \t} elseif {[is_config_true \"guitool.$fullname.confirm\"]} {\n-\t\tif {[ask_popup [mc \"Are you sure you want to run %s?\" $fullname]] ne {yes}} {\n-\t\t\treturn\n+\t\tif {[is_config_true \"guitool.$fullname.needsfile\"]} {\n+\t\t\tif {[ask_popup [mc \"Are you sure you want to run %s on file \\\"%s\\\"?\" $fullname $current_diff_path]] ne {yes}} {\n+\t\t\t\treturn\n+\t\t\t}\n+\t\t} else {\n+\t\t\tif {[ask_popup [mc \"Are you sure you want to run %s?\" $fullname]] ne {yes}} {\n+\t\t\t\treturn\n+\t\t\t}\n \t\t}\n \t}\n \n-- \n1.7.7.759.gfc8c6\n"},{"id":"178150","messageId":"87ipni3s3n.fsf@fox.patthoyts.tk","threadId":"28730","inReplyTo":"2fef219736a0787ed864b5c18adf31f7a4e8acda.1319139139.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2011-10-21T22:19:40Z","receivedAt":"2011-10-21T22:19:40Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n>Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n>---\n> lib/tools.tcl |   10 ++++++++--\n> 1 files changed, 8 insertions(+), 2 deletions(-)\n>\n>diff --git a/lib/tools.tcl b/lib/tools.tcl\n>index 95e6e55..39e08f0 100644\n>--- a/lib/tools.tcl\n>+++ b/lib/tools.tcl\n>@@ -87,8 +87,14 @@ proc tools_exec {fullname} {\n> \t\t\treturn\n> \t\t}\n> \t} elseif {[is_config_true \"guitool.$fullname.confirm\"]} {\n>-\t\tif {[ask_popup [mc \"Are you sure you want to run %s?\" $fullname]] ne {yes}} {\n>-\t\t\treturn\n>+\t\tif {[is_config_true \"guitool.$fullname.needsfile\"]} {\n>+\t\t\tif {[ask_popup [mc \"Are you sure you want to run %s on file \\\"%s\\\"?\" $fullname $current_diff_path]] ne {yes}} {\n>+\t\t\t\treturn\n>+\t\t\t}\n>+\t\t} else {\n>+\t\t\tif {[ask_popup [mc \"Are you sure you want to run %s?\" $fullname]] ne {yes}} {\n>+\t\t\t\treturn\n>+\t\t\t}\n> \t\t}\n> \t}\n\nThis looks good. I modified the string there to use positional\nparameters as sometimes translations need to re-order things and the\nmsgcat format can support this using [mc {%2$s and %1$d} $first $second]\n-- \nPat Thoyts                            http://www.patthoyts.tk/\nPGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD\n"},{"id":"178152","messageId":"7v62ji7yox.fsf@alter.siamese.dyndns.org","threadId":"28730","inReplyTo":"87ipni3s3n.fsf@fox.patthoyts.tk","subject":"Re: [PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-21T22:43:42Z","receivedAt":"2011-10-21T22:43:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n> .... I modified the string there to use positional\n> parameters as sometimes translations need to re-order things and the\n> msgcat format can support this using [mc {%2$s and %1$d} $first $second]\n\nGood catch.\n"}]}