summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f250091)
raw | patch | inline | side by side (parent: f250091)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 21:43:14 +0000 (16:43 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 22 Jan 2007 03:47:58 +0000 (22:47 -0500) |
If the user is tabbing through fields in the options dialog they are
likely to want to just enter a new value for the field, rather than
edit the value in-place. This is easier if we select the entire value
upon focusing into the field.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
likely to want to just enter a new value for the field, rather than
edit the value in-place. This is easier if we select the entire value
upon focusing into the field.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index d59e720408645d275c20c91e0d88063e0063edd6..87fdce593d6b48c36f4c7b5ba5ee9b4728314e76 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
-from 1 -to 99 -increment 1 \
-width 3 \
-font font_ui
+ bind $w.$f.$name.v <FocusIn> {%W selection range 0 end}
pack $w.$f.$name.v -side right -anchor e -padx 5
pack $w.$f.$name -side top -anchor w -fill x
}
bind $w.$f.$name.v <Shift-Key-Tab> {focus [tk_focusPrev %W];break}
bind $w.$f.$name.v <Key-Tab> {focus [tk_focusNext %W];break}
bind $w.$f.$name.v <Key-Return> break
+ bind $w.$f.$name.v <FocusIn> "$w.$f.$name.v tag add sel 0.0 end"
bind $w.$f.$name.v <FocusOut> "
set ${f}_config_new(gui.$name) \
\[string trim \[$w.$f.$name.v get 0.0 end\]\]
-from 2 -to 80 -increment 1 \
-width 3 \
-font font_ui
+ bind $w.global.$name.size <FocusIn> {%W selection range 0 end}
pack $w.global.$name.size -side right -anchor e
pack $w.global.$name.family -side right -anchor e
pack $w.global.$name -side top -anchor w -fill x