summaryrefslogtreecommitdiffstats
path: root/library/console.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/console.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/console.tcl')
-rw-r--r--library/console.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/console.tcl b/library/console.tcl
index 472dcf5..e996ea5 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.10 2000/11/02 22:55:16 hobbs Exp $
+# RCS: @(#) $Id: console.tcl,v 1.11 2001/07/03 01:03:16 hobbs Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -350,7 +350,7 @@ proc tkConsoleBind {win} {
}
}
bind $win <Insert> {
- catch {tkConsoleInsert %W [selection get -displayof %W]}
+ catch {tkConsoleInsert %W [::tk::GetSelection %W PRIMARY]}
break
}
bind $win <KeyPress> {
@@ -397,7 +397,7 @@ proc tkConsoleBind {win} {
}
bind $win <<Paste>> {
catch {
- set clip [selection get -displayof %W -selection CLIPBOARD]
+ set clip [::tk::GetSelection %W CLIPBOARD]
set list [split $clip \n\r]
tkConsoleInsert %W [lindex $list 0]
foreach x [lrange $list 1 end] {