{"thread":{"id":"7429","subject":"[PATCH 2/2] Improve look-and-feel of the gitk tool.","startedAt":"2007-03-27T10:36:59Z","lastAt":"2007-03-27T10:36:59Z","messageCount":1,"participants":["Eygene Ryabinkin"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"38135","messageId":"20070327103659.GY14837@codelabs.ru","threadId":"7429","inReplyTo":null,"subject":"[PATCH 2/2] Improve look-and-feel of the gitk tool.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T10:36:59Z","receivedAt":"2007-03-27T10:36:59Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Made the default buttons on the dialog active and focused upon the\ndialog appearence.\n\nBound 'Escape' and 'Return' keys to the dialog dismissal where it\nwas appropriate: mainly for dialogs with only one button and no\neditable fields.\n\nUnified the look of the \"About gitk\" and \"Key bindings\" dialogs.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n gitk |   23 +++++++++++++++--------\n 1 files changed, 15 insertions(+), 8 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex f54ff27..0173660 100755\n--- a/gitk\n+++ b/gitk\n@@ -938,12 +938,15 @@ Gitk - a commit viewer for git\n Copyright ╘ 2005-2006 Paul Mackerras\n \n Use and redistribute under the terms of the GNU General Public License} \\\n-\t    -justify center -aspect 400\n-    pack $w.m -side top -fill x -padx 20 -pady 20\n+\t    -justify center -aspect 400 -border 2 -bg white -relief groove\n+    pack $w.m -side top -fill x -padx 2 -pady 2\n     $w.m configure -font $uifont\n-    button $w.ok -text Close -command \"destroy $w\"\n+    button $w.ok -text Close -command \"destroy $w\" -default active\n     pack $w.ok -side bottom\n     $w.ok configure -font $uifont\n+    bind $w <Visibility> \"focus $w.ok\"\n+    bind $w <Key-Escape> \"destroy $w\"\n+    bind $w <Key-Return> \"destroy $w\"\n }\n \n proc keys {} {\n@@ -994,12 +997,15 @@ f\t\tScroll diff view to next file\n <Ctrl-minus>\tDecrease font size\n <F5>\t\tUpdate\n } \\\n-\t    -justify left -bg white -border 2 -relief sunken\n-    pack $w.m -side top -fill both\n+\t    -justify left -bg white -border 2 -relief groove\n+    pack $w.m -side top -fill both -padx 2 -pady 2\n     $w.m configure -font $uifont\n-    button $w.ok -text Close -command \"destroy $w\"\n+    button $w.ok -text Close -command \"destroy $w\" -default active\n     pack $w.ok -side bottom\n     $w.ok configure -font $uifont\n+    bind $w <Visibility> \"focus $w.ok\"\n+    bind $w <Key-Escape> \"destroy $w\"\n+    bind $w <Key-Return> \"destroy $w\"\n }\n \n # Procedures for manipulating the file list window at the\n@@ -5892,14 +5898,15 @@ proc doprefs {} {\n     grid x $top.hunksepbut $top.hunksep -sticky w\n \n     frame $top.buts\n-    button $top.buts.ok -text \"OK\" -command prefsok\n+    button $top.buts.ok -text \"OK\" -command prefsok -default active\n     $top.buts.ok configure -font $uifont\n-    button $top.buts.can -text \"Cancel\" -command prefscan\n+    button $top.buts.can -text \"Cancel\" -command prefscan -default normal\n     $top.buts.can configure -font $uifont\n     grid $top.buts.ok $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n     grid $top.buts - - -pady 10 -sticky ew\n+    bind $top <Visibility> \"focus $top.buts.ok\"\n }\n \n proc choosecolor {v vi w x cmd} {\n-- \n1.5.0.3-dirty\n"}]}