summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-04-04 15:45:33 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-04-04 15:45:33 (GMT)
commit4372da3441561b3852c0bf466304f1e4f3c06b3f (patch)
treebdacf76fbd25d8b0980fa6e8409a55a432846b2b /git-gui.sh
parent53a291a435a173a18969011753104f8ab41234c8 (diff)
downloadgit-4372da3441561b3852c0bf466304f1e4f3c06b3f.zip
git-4372da3441561b3852c0bf466304f1e4f3c06b3f.tar.gz
git-4372da3441561b3852c0bf466304f1e4f3c06b3f.tar.bz2
Always bind the return key to the default button
If a dialog/window has a default button registered not every platform associates the return key with that button, but all users do. We have to register the binding of the return key ourselves to make sure the user's expectations of pressing return will activate the default button are met. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 6439bee..882b907 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2787,6 +2787,7 @@ proc do_push_anywhere {} {
bind $w <Visibility> "grab $w; focus $w.buttons.create"
bind $w <Key-Escape> "destroy $w"
+ bind $w <Key-Return> [list start_push_anywhere_action $w]
wm title $w "[appname] ([reponame]): Push"
tkwait window $w
}
@@ -4713,6 +4714,7 @@ proc do_options {} {
bind $w <Visibility> "grab $w; focus $w.buttons.save"
bind $w <Key-Escape> "destroy $w"
+ bind $w <Key-Return> [list do_save_config $w]
wm title $w "[appname] ([reponame]): Options"
tkwait window $w
}