1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 18:06:10 +02:00

git-gui: ssh-askpass: add a checkbox to show the input text

Hide the input text by default since the field is
commonly used for sensative informations such as passwords.

Add a "Show input" checkbox to conditionally show the input.

Helped-by: Miguel Boekhold <miguel.boekhold@osudio.com>
Signed-off-by: Efimov Vasily <laer.18@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
This commit is contained in:
David Aguilar 2020-11-07 14:20:39 -08:00 committed by Pratyush Yadav
parent 8222c75899
commit a4e1bc9971

View File

@ -26,8 +26,21 @@ pack .m -side top -fill x -padx 20 -pady 20 -expand 1
entry .e -textvariable answer -width 50
pack .e -side top -fill x -padx 10 -pady 10
proc on_show_input_changed {args} {
global show_input
if {$show_input} {
.e configure -show ""
} else {
.e configure -show "*"
}
}
trace add variable show_input write "on_show_input_changed"
set show_input 0
if {!$yesno} {
.e configure -show "*"
checkbutton .cb_show -text "Show input" -variable show_input
pack .cb_show -side top -anchor nw
}
frame .b