diff options
author | das <das> | 2007-11-04 10:38:29 (GMT) |
---|---|---|
committer | das <das> | 2007-11-04 10:38:29 (GMT) |
commit | 16916e76d4e7a9494bcd4bbaffca892c8802755b (patch) | |
tree | 9484486c1c26cb86c494ad0f5081fb6db8dc5f30 /library/console.tcl | |
parent | 9ad15b7decd323c998eec03344e91819c4e8512a (diff) | |
download | tk-16916e76d4e7a9494bcd4bbaffca892c8802755b.zip tk-16916e76d4e7a9494bcd4bbaffca892c8802755b.tar.gz tk-16916e76d4e7a9494bcd4bbaffca892c8802755b.tar.bz2 |
* library/console.tcl: add accelerators and fix Aqua bindings
of the new font size menu items.
Diffstat (limited to 'library/console.tcl')
-rw-r--r-- | library/console.tcl | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/library/console.tcl b/library/console.tcl index 50cc810..777a957 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.34 2007/11/03 00:51:23 patthoyts Exp $ +# RCS: @(#) $Id: console.tcl,v 1.35 2007/11/04 10:38:29 das Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Ajuba Solutions. @@ -97,10 +97,10 @@ proc ::tk::ConsoleInit {} { } AmpMenuArgs .menubar.edit add separator - AmpMenuArgs .menubar.edit add command -label [mc "&Increase font"] \ - -command {event generate .console <<Console_FontSizeIncr>>} - AmpMenuArgs .menubar.edit add command -label [mc "&Reduce font"] \ - -command {event generate .console <<Console_FontSizeDecr>>} + AmpMenuArgs .menubar.edit add command -label [mc "&Increase Font Size"] \ + -accel "$mod++" -command {event generate .console <<Console_FontSizeIncr>>} + AmpMenuArgs .menubar.edit add command -label [mc "&Decrease Font Size"] \ + -accel "$mod+-" -command {event generate .console <<Console_FontSizeDecr>>} . configure -menu .menubar @@ -108,7 +108,7 @@ proc ::tk::ConsoleInit {} { font create TkConsoleFont {*}[font configure TkFixedFont] set families [font families] switch -exact -- [tk windowingsystem] { - aqua { set preferred {Monaco 9} } + aqua { set preferred {Monaco 10} } win32 { set preferred {ProFontWindows 8 Consolas 8} } default { set preferred {} } } @@ -387,7 +387,15 @@ proc ::tk::ConsoleBind {w} { event add $ev $key bind Console $key {} } - + if {[tk windowingsystem] eq "aqua"} { + foreach {ev key} { + <<Console_FontSizeIncr>> <Command-Key-plus> + <<Console_FontSizeDecr>> <Command-Key-minus> + } { + event add $ev $key + bind Console $key {} + } + } bind Console <<Console_Expand>> { if {[%W compare insert > promptEnd]} { ::tk::console::Expand %W |