diff options
author | drh <drh@sqlite.org> | 2001-11-27 14:08:04 (GMT) |
---|---|---|
committer | drh <drh@sqlite.org> | 2001-11-27 14:08:04 (GMT) |
commit | fcc2a1cf19f07f1d0ddf45a86726eef7cd18e2b2 (patch) | |
tree | 90ac322a850756c0dc65c3caa33c3ed7834f544f | |
parent | 3be7b28beca41a79f04ec5937636395f5feb9fdf (diff) | |
download | tk-fcc2a1cf19f07f1d0ddf45a86726eef7cd18e2b2.zip tk-fcc2a1cf19f07f1d0ddf45a86726eef7cd18e2b2.tar.gz tk-fcc2a1cf19f07f1d0ddf45a86726eef7cd18e2b2.tar.bz2 |
When a menu is torn off, a new "clone" menu is created which is an exact
copy of the original. The copy even includes the tearoff bar, though the
tearoff bar is not displayed. But even though it wasn't displayed, the
tearoff bar on the tearoff menu could be visited using keyboard traversal.
This change makes it so that the (invisible) tearoff bar of tearoff menus
is no longer visited on keyboard traversal.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | library/menu.tcl | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2001-11-27 D. Richard Hipp <drh@hwaci.com> + + * library/menu.tcl: Do not allow keyboard traversal of torn-off + menus to visit the (invisible) tearoff bar. + 2001-11-26 D. Richard Hipp <drh@hwaci.com> * win/tkWinMenu.c: disabled menu items show the activebackground diff --git a/library/menu.tcl b/library/menu.tcl index 567a306..5f7352b 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -4,7 +4,7 @@ # It also implements keyboard traversal of menus and implements a few # other utility procedures related to menus. # -# RCS: @(#) $Id: menu.tcl,v 1.14 2001/11/16 22:54:22 hobbs Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.15 2001/11/27 14:08:04 drh Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -870,7 +870,9 @@ proc ::tk::MenuNextEntry {menu count} { incr i -$length } if {[catch {$menu entrycget $i -state} state] == 0} { - if {[string compare $state "disabled"]} { + if {$state!="disabled" && + ($i!=0 || [$menu cget -type]!="tearoff" + || [$menu type 0]!="tearoff")} { break } } |