git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitk: Add shortcut Ctrl-W for closing the active window
@ 2010-02-02 22:11 Jens Lehmann
  2010-02-02 17:50 ` Jacob Todd
  2010-02-02 23:51 ` Chris Frey
  0 siblings, 2 replies; 3+ messages in thread
From: Jens Lehmann @ 2010-02-02 22:11 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Git Mailing List

To make the user experience between git gui and gitk more homogeneous, use
Ctrl-W in gitk too for closing the active window. When closing the main
window doquit is called for proper cleanup.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---

Found myself hitting Ctrl-W in gitk with no effect once too often ;-)

 gitk-git/gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 03dd0f4..9629394 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2383,6 +2383,8 @@ proc makewindow {} {
     }
     bindall <$::BM> "canvscan mark %W %x %y"
     bindall <B$::BM-Motion> "canvscan dragto %W %x %y"
+    bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
+    bind . <$M1B-Key-w> doquit
     bindkey <Home> selfirstline
     bindkey <End> sellastline
     bind . <Key-Up> "selnextline -1"
@@ -2814,6 +2816,7 @@ proc keys {} {
 [mc "Gitk key bindings:"]

 [mc "<%s-Q>		Quit" $M1T]
+[mc "<%s-W>		Close window" $M1T]
 [mc "<Home>		Move to first commit"]
 [mc "<End>		Move to last commit"]
 [mc "<Up>, p, i	Move up one commit"]
-- 
1.7.0.rc1.173.gc7c5.dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-03  0:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 22:11 [PATCH] gitk: Add shortcut Ctrl-W for closing the active window Jens Lehmann
2010-02-02 17:50 ` Jacob Todd
2010-02-02 23:51 ` Chris Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).