summaryrefslogtreecommitdiffstats
path: root/library/spinbox.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/spinbox.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/spinbox.tcl')
-rw-r--r--library/spinbox.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index b93479b..a1ba4f4 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk spinbox widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: spinbox.tcl,v 1.1 2000/05/29 01:43:15 hobbs Exp $
+# RCS: @(#) $Id: spinbox.tcl,v 1.2 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.
@@ -60,7 +60,7 @@ bind Spinbox <<Paste>> {
%W delete sel.first sel.last
}
}
- %W insert insert [selection get -displayof %W -selection CLIPBOARD]
+ %W insert insert [::tk::GetSelection %W CLIPBOARD]
::tk::spinbox::SeeInsert %W
}
}
@@ -218,7 +218,7 @@ if {[string equal $tcl_platform(platform) "macintosh"]} {
# generates the <<Paste>> event, so we don't need to do anything here.
if {[string compare $tcl_platform(platform) "windows"]} {
bind Spinbox <Insert> {
- catch {::tk::spinbox::Insert %W [selection get -displayof %W]}
+ catch {::tk::spinbox::Insert %W [::tk::GetSelection %W PRIMARY]}
}
}
@@ -504,7 +504,7 @@ proc ::tk::spinbox::Paste {w x} {
global tkPriv
$w icursor [::tk::spinbox::ClosestGap $w $x]
- catch {$w insert insert [selection get -displayof $w]}
+ catch {$w insert insert [::tk::GetSelection $w PRIMARY]}
if {[string equal "disabled" [$w cget -state]]} {focus $w}
}