summaryrefslogtreecommitdiffstats
path: root/library/text.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-07-03 01:03:16 (GMT)
committerhobbs <hobbs>2001-07-03 01:03:16 (GMT)
commit57dee857622ab7a2a15091b6b097f057b0ace6f3 (patch)
treef0f5765b05f0fcc773bdb417e722c60e2299bbdb /library/text.tcl
parent3083a49a521caabecd2d02fdf45791d35b1f2e34 (diff)
downloadtk-57dee857622ab7a2a15091b6b097f057b0ace6f3.zip
tk-57dee857622ab7a2a15091b6b097f057b0ace6f3.tar.gz
tk-57dee857622ab7a2a15091b6b097f057b0ace6f3.tar.bz2
* library/console.tcl:
* library/entry.tcl: * library/spinbox.tcl: * library/text.tcl: * library/tk.tcl: added private ::tk::GetSelection command to handle requesting selection. This is to support requesting UTF8_STRING before generic STRING on Unix. Changed Text, Spinbox, Entry and Console to use this command. * tests/select.test: * generic/tkSelect.c (Tk_CreateSelHandler, Tk_DeleteSelHandler): on Unix, a UTF8_STRING handler will be created when the user requests a STRING handler (in addition to the STRING handler). This provides implicit support for the new UTF8_STRING selection target. * unix/tkUnixSelect.c (TkSelEventProc, ConvertSelection): Added support for UTF8_STRING target. [RFE #418653, Patch #433283] * generic/tkInt.h: added utf8Atom to TkDisplay structure.
Diffstat (limited to 'library/text.tcl')
-rw-r--r--library/text.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 79a49e1..38f2efc 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.14 2001/03/29 11:05:49 mdejong Exp $
+# RCS: @(#) $Id: text.tcl,v 1.15 2001/07/03 01:03:16 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -260,7 +260,7 @@ bind Text <<PasteSelection>> {
}
}
bind Text <Insert> {
- catch {tkTextInsert %W [selection get -displayof %W]}
+ catch {tkTextInsert %W [::tk::GetSelection %W PRIMARY]}
}
bind Text <KeyPress> {
tkTextInsert %W %A
@@ -627,7 +627,7 @@ proc tkTextKeyExtend {w index} {
proc tkTextPaste {w x y} {
$w mark set insert [tkTextClosestGap $w $x $y]
- catch {$w insert insert [selection get -displayof $w]}
+ catch {$w insert insert [::tk::GetSelection $w PRIMARY]}
if {[string equal [$w cget -state] "normal"]} {focus $w}
}
@@ -974,7 +974,7 @@ proc tk_textPaste w {
$w delete sel.first sel.last
}
}
- $w insert insert [selection get -displayof $w -selection CLIPBOARD]
+ $w insert insert [::tk::GetSelection $w CLIPBOARD]
}
}