{"thread":{"id":"41859","subject":"[PATCH] Feature: custom guitool commands can now have custom keyboard shortcuts","startedAt":"2016-03-29T11:29:41Z","lastAt":"2016-03-31T16:49:44Z","messageCount":2,"participants":["Harish K","David Aguilar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"282043","messageId":"01020153c222ebc0-a691d562-ece3-4b35-908a-a0487e912879-000000@eu-west-1.amazonses.com","threadId":"41859","inReplyTo":null,"subject":"[PATCH] Feature: custom guitool commands can now have custom keyboard shortcuts","fromName":"Harish K","fromEmail":"harish2704@gmail.com","sentAt":"2016-03-29T11:29:41Z","receivedAt":"2016-03-29T11:29:41Z","isPatch":true,"sender":{"key":"harish2704@gmail.com","avatar":"https://gravatar.com/avatar/774092af5a4df0d7d135b48fcbe03df5b331c434506ea37eb31b3cddfb17458f?d=mp&s=160"},"body":"---\n git-gui/lib/tools.tcl | 16 +++++++++++++---\n 1 file changed, 13 insertions(+), 3 deletions(-)\n\ndiff --git a/git-gui/lib/tools.tcl b/git-gui/lib/tools.tcl\nindex 6ec9411..749bc67 100644\n--- a/git-gui/lib/tools.tcl\n+++ b/git-gui/lib/tools.tcl\n@@ -38,7 +38,7 @@ proc tools_create_item {parent args} {\n }\n \n proc tools_populate_one {fullname} {\n-\tglobal tools_menubar tools_menutbl tools_id\n+\tglobal tools_menubar tools_menutbl tools_id repo_config\n \n \tif {![info exists tools_id]} {\n \t\tset tools_id 0\n@@ -61,9 +61,19 @@ proc tools_populate_one {fullname} {\n \t\t}\n \t}\n \n-\ttools_create_item $parent command \\\n+\tif {[info exists repo_config(guitool.$fullname.accelerator)] && [info exists repo_config(guitool.$fullname.accelerator-label)]} {\n+\t\tset accele_key $repo_config(guitool.$fullname.accelerator)\n+\t\tset accel_label $repo_config(guitool.$fullname.accelerator-label)\n+\t\ttools_create_item $parent command \\\n \t\t-label [lindex $names end] \\\n-\t\t-command [list tools_exec $fullname]\n+\t\t-command [list tools_exec $fullname] \\\n+\t\t-accelerator $accel_label\n+\t\tbind . $accele_key [list tools_exec $fullname]\n+\t} else {\n+\t\ttools_create_item $parent command \\\n+\t\t\t-label [lindex $names end] \\\n+\t\t\t-command [list tools_exec $fullname]\n+\t}\n }\n \n proc tools_exec {fullname} {\n\n--\nhttps://github.com/git/git/pull/220\n"},{"id":"282341","messageId":"20160331164944.GB11150@gmail.com","threadId":"41859","inReplyTo":"01020153c222ebc0-a691d562-ece3-4b35-908a-a0487e912879-000000@eu-west-1.amazonses.com","subject":"Re: [PATCH] Feature: custom guitool commands can now have custom keyboard shortcuts","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2016-03-31T16:49:44Z","receivedAt":"2016-03-31T16:49:44Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Tue, Mar 29, 2016 at 11:29:41AM +0000, Harish K wrote:\n> ---\n>  git-gui/lib/tools.tcl | 16 +++++++++++++---\n>  1 file changed, 13 insertions(+), 3 deletions(-)\n\n\nI forgot to mention that git-gui has its own repository.\nThe git project merges the upstream repo as a subtree into its\ngit-gui directory.\n\nYou should probably clone the git-gui repository and create a\npatch there so that it can be applied to the upstream repo:\n\nhttp://repo.or.cz/w/git-gui.git\n-- \nDavid\n"}]}