Re: [PATCH] git-gui: allow closing console window with Escape

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

 



Hi,

On Sat, 7 Dec 2019, Pratyush Yadav wrote:

> It is often expected that popup windows like the console window be
> close-able with Esc.

Seeing as the console windows is not your regular popup window with an
"OK" button, I could see how it would be all too easy to close the window
via the Esc button all too easily, annoying users.

For windows like the console one, I would expect Ctrl+W a much more
natural keyboard shortcut to close it.

Ciao,
Dscho

>
> Signed-off-by: Pratyush Yadav <me@xxxxxxxxxxxxxxxxx>
> ---
> This was requested by https://github.com/prati0100/git-gui/issues/17
>
>  lib/console.tcl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/console.tcl b/lib/console.tcl
> index 1f3248f..8828f6f 100644
> --- a/lib/console.tcl
> +++ b/lib/console.tcl
> @@ -88,6 +88,7 @@ method _init {} {
>  	bind_button3 $w_t "tk_popup $w.ctxm %X %Y"
>  	bind $w_t <$M1B-Key-a> "$w_t tag add sel 0.0 end;break"
>  	bind $w_t <$M1B-Key-A> "$w_t tag add sel 0.0 end;break"
> +	bind $w <Key-Escape> [list destroy $w]
>  }
>
>  method exec {cmd {after {}}} {
> --
> 2.24.0
>
>




[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]

  Powered by Linux