提交 4372da34 编写于 作者: S Shawn O. Pearce

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: NShawn O. Pearce <spearce@spearce.org>
上级 53a291a4
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册