{"thread":{"id":"54596","subject":"[PATCH] git-gui: ssh-askpass: add a checkbox to show the input text","startedAt":"2020-11-07T22:20:43Z","lastAt":"2020-12-01T19:42:08Z","messageCount":2,"participants":["David Aguilar","Pratyush Yadav"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"409325","messageId":"20201107222039.13900-1-davvid@gmail.com","threadId":"54596","inReplyTo":null,"subject":"[PATCH] git-gui: ssh-askpass: add a checkbox to show the input text","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2020-11-07T22:20:39Z","receivedAt":"2020-11-07T22:20:43Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Hide the input text by default since the field is\ncommonly used for sensative informations such as passwords.\n\nAdd a \"Show input\" checkbox to conditionally show the input.\n\nHelped-by: Miguel Boekhold <miguel.boekhold@osudio.com>\nSigned-off-by: Efimov Vasily <laer.18@gmail.com>\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-gui--askpass | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)\n\nThis patch gathers the submissions from the following sources:\n\nhttps://github.com/patthoyts/git-gui/issues/22\nhttps://github.com/prati0100/git-gui/pull/38\nhttps://github.com/git-cola/git-cola/issues/1004\nhttps://github.com/git-cola/git-cola/pull/1069\n\ndiff --git a/git-gui--askpass b/git-gui--askpass\nindex 1c99ee8..71a536d 100755\n--- a/git-gui--askpass\n+++ b/git-gui--askpass\n@@ -26,8 +26,21 @@ pack .m -side top -fill x -padx 20 -pady 20 -expand 1\n entry .e -textvariable answer -width 50\n pack .e -side top -fill x -padx 10 -pady 10\n \n+proc on_show_input_changed {args} {\n+\tglobal show_input\n+\tif {$show_input} {\n+\t\t.e configure -show \"\"\n+\t} else {\n+\t\t.e configure -show \"*\"\n+\t}\n+}\n+trace add variable show_input write \"on_show_input_changed\"\n+\n+set show_input 0\n+\n if {!$yesno} {\n-\t.e configure -show \"*\"\n+\tcheckbutton .cb_show -text \"Show input\" -variable show_input\n+\tpack .cb_show -side top -anchor nw\n }\n \n frame .b\n-- \n2.29.2.154.g7f7ebe054a\n\n"},{"id":"411089","messageId":"20201201194116.mvm7svakxzyruybx@yadavpratyush.com","threadId":"54596","inReplyTo":"20201107222039.13900-1-davvid@gmail.com","subject":"Re: [PATCH] git-gui: ssh-askpass: add a checkbox to show the input text","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-12-01T19:41:16Z","receivedAt":"2020-12-01T19:42:08Z","isPatch":true,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 07/11/20 02:20PM, David Aguilar wrote:\n> Hide the input text by default since the field is\n> commonly used for sensative informations such as passwords.\n> \n> Add a \"Show input\" checkbox to conditionally show the input.\n> \n> Helped-by: Miguel Boekhold <miguel.boekhold@osudio.com>\n> Signed-off-by: Efimov Vasily <laer.18@gmail.com>\n> Signed-off-by: David Aguilar <davvid@gmail.com>\n\nMerged to git-gui/master. Thanks.\n\n-- \nRegards,\nPratyush Yadav\n"}]}