summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-22 18:31:12 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-23 01:48:50 -0500
commit75e78c8a1bb273461c14a5b37f9b06215f502e67 (patch)
tree293a67668e56ce1a7f00745931fd7cb20ca4e297
parentgit-gui: Don't attempt to tag new file/deleted file headers in diffs. (diff)
downloadtgif-75e78c8a1bb273461c14a5b37f9b06215f502e67.tar.xz
git-gui: Fix 'Select All' action on Windows.
Sometimes the Select All action from our context menus doesn't work unless the text field its supposed to act on has focus. I'm not really sure why adding the sel tag requires having focus. It technically should not be required to update the sel tag membership, but perhaps there is a bug in Tcl/Tk 8.4.1 on Windows which is causing this odd behavior. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh
index d697d1ebe2..bbf57b96a0 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2539,7 +2539,7 @@ proc console_init {w} {
-command "tk_textCopy $w.m.t"
$w.ctxm add command -label "Select All" \
-font font_ui \
- -command "$w.m.t tag add sel 0.0 end"
+ -command "focus $w.m.t;$w.m.t tag add sel 0.0 end"
$w.ctxm add command -label "Copy All" \
-font font_ui \
-command "
@@ -3913,7 +3913,7 @@ $ctxm add separator
$ctxm add command \
-label {Select All} \
-font font_ui \
- -command {$ui_comm tag add sel 0.0 end}
+ -command {focus $ui_comm;$ui_comm tag add sel 0.0 end}
$ctxm add command \
-label {Copy All} \
-font font_ui \
@@ -4059,7 +4059,7 @@ lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add command \
-label {Select All} \
-font font_ui \
- -command {$ui_diff tag add sel 0.0 end}
+ -command {focus $ui_diff;$ui_diff tag add sel 0.0 end}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add command \
-label {Copy All} \