summaryrefslogtreecommitdiffstats
path: root/library/ttk/notebook.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-14 15:57:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-01-14 15:57:59 (GMT)
commite50ff59782eb62c098fa31ce44b5ef22696d23ba (patch)
treeda7364467d81702a33baeda8458765145bfb8727 /library/ttk/notebook.tcl
parent74c1da3513a051544b27bfde2a52525f55d648a2 (diff)
downloadtk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.zip
tk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.tar.gz
tk-e50ff59782eb62c098fa31ce44b5ef22696d23ba.tar.bz2
Consistancy in Key/Button bindings: Use "<Button-1>" in stead of "<1>", "Key" in stead of "KeyPress" and "Button" in stead of "ButtonPress". Also eliminate unnessary "Any" and "Key" modifiers.
Diffstat (limited to 'library/ttk/notebook.tcl')
-rw-r--r--library/ttk/notebook.tcl28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index 92efe40..c5340a5 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -6,11 +6,11 @@ namespace eval ttk::notebook {
variable TLNotebooks ;# See enableTraversal
}
-bind TNotebook <ButtonPress-1> { ttk::notebook::Press %W %x %y }
-bind TNotebook <Key-Right> { ttk::notebook::CycleTab %W 1; break }
-bind TNotebook <Key-Left> { ttk::notebook::CycleTab %W -1; break }
-bind TNotebook <Control-Key-Tab> { ttk::notebook::CycleTab %W 1; break }
-bind TNotebook <Control-Shift-Key-Tab> { ttk::notebook::CycleTab %W -1; break }
+bind TNotebook <Button-1> { ttk::notebook::Press %W %x %y }
+bind TNotebook <Right> { ttk::notebook::CycleTab %W 1; break }
+bind TNotebook <Left> { ttk::notebook::CycleTab %W -1; break }
+bind TNotebook <Control-Tab> { ttk::notebook::CycleTab %W 1; break }
+bind TNotebook <Control-Shift-Tab> { ttk::notebook::CycleTab %W -1; break }
catch {
bind TNotebook <Control-ISO_Left_Tab> { ttk::notebook::CycleTab %W -1; break }
}
@@ -43,7 +43,7 @@ proc ttk::notebook::ActivateTab {w tab} {
}
# Press $nb $x $y --
-# ButtonPress-1 binding for notebook widgets.
+# Button-1 binding for notebook widgets.
# Activate the tab under the mouse cursor, if any.
#
proc ttk::notebook::Press {w x y} {
@@ -105,18 +105,18 @@ proc ttk::notebook::enableTraversal {nb} {
if {![info exists TLNotebooks($top)]} {
# Augment $top bindings:
#
- bind $top <Control-Key-Next> {+ttk::notebook::TLCycleTab %W 1}
- bind $top <Control-Key-Prior> {+ttk::notebook::TLCycleTab %W -1}
- bind $top <Control-Key-Tab> {+ttk::notebook::TLCycleTab %W 1}
- bind $top <Control-Shift-Key-Tab> {+ttk::notebook::TLCycleTab %W -1}
+ bind $top <Control-Next> {+ttk::notebook::TLCycleTab %W 1}
+ bind $top <Control-Prior> {+ttk::notebook::TLCycleTab %W -1}
+ bind $top <Control-Tab> {+ttk::notebook::TLCycleTab %W 1}
+ bind $top <Control-Shift-Tab> {+ttk::notebook::TLCycleTab %W -1}
catch {
- bind $top <Control-Key-ISO_Left_Tab> {+ttk::notebook::TLCycleTab %W -1}
+ bind $top <Control-ISO_Left_Tab> {+ttk::notebook::TLCycleTab %W -1}
}
if {[tk windowingsystem] eq "aqua"} {
- bind $top <Option-KeyPress> \
+ bind $top <Option-Key> \
+[list ttk::notebook::MnemonicActivation $top %K]
} else {
- bind $top <Alt-KeyPress> \
+ bind $top <Alt-Key> \
+[list ttk::notebook::MnemonicActivation $top %K]
}
bind $top <Destroy> {+ttk::notebook::TLCleanup %W}
@@ -182,7 +182,7 @@ proc ttk::notebook::TLCycleTab {w dir} {
}
# MnemonicActivation $nb $key --
-# Alt-KeyPress binding procedure for mnemonic activation.
+# Alt-Key binding procedure for mnemonic activation.
# Scan all notebooks in specified toplevel for a tab with the
# the specified mnemonic. If found, activate it and return TCL_BREAK.
#