summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-05-11 00:47:22 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-05-11 00:47:22 (GMT)
commitb992c9e7639b7803826833d1bcee122456714364 (patch)
tree4f2b801453a577780b663ac9afef4e3030fbdd45
parent92a1564dea06b0ff57f2c4b6baa85de82e26ce54 (diff)
downloadtk-b992c9e7639b7803826833d1bcee122456714364.zip
tk-b992c9e7639b7803826833d1bcee122456714364.tar.gz
tk-b992c9e7639b7803826833d1bcee122456714364.tar.bz2
Support for ttk widgets in AmpWidget
-rw-r--r--ChangeLog1
-rw-r--r--library/tk.tcl10
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2854250..84e4681 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2008-05-11 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * library/tk.tcl: Support for ttk widgets in AmpWidget
* doc/button.n: Note negative widths for button [Patch #1883418]
2008-05-09 Pat Thoyts <patthoyts@users.sourceforge.net>
diff --git a/library/tk.tcl b/library/tk.tcl
index c0e0e25..69afb5c 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.74 2008/04/01 16:30:54 dgp Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.75 2008/05/11 00:47:22 patthoyts Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -355,7 +355,7 @@ if {![llength [info command tk_chooseDirectory]]} {
# Define the set of common virtual events.
#----------------------------------------------------------------------
-switch -- [tk windowingsystem] {
+switch -exact -- [tk windowingsystem] {
"x11" {
event add <<Cut>> <Control-Key-x> <Key-F20>
event add <<Copy>> <Control-Key-c> <Key-F16>
@@ -510,7 +510,7 @@ proc ::tk::AmpWidget {class path args} {
}
}
set result [$class $path {*}$options]
- if {$class eq "button"} {
+ if {[string match "*button" $class]} {
bind $path <<AltUnderlined>> [list $path invoke]
}
return $result
@@ -539,8 +539,8 @@ proc ::tk::AmpMenuArgs {widget add type args} {
#
proc ::tk::FindAltKeyTarget {path char} {
switch -- [winfo class $path] {
- Button -
- Label {
+ Button - Label -
+ TButton - TLabel - TCheckbutton {
if {[string equal -nocase $char \
[string index [$path cget -text] [$path cget -underline]]]} {
return $path