/[ascend]/trunk/tcltk/TK/generalk.tcl
ViewVC logotype

Diff of /trunk/tcltk/TK/generalk.tcl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 581 by johnpye, Tue May 9 00:14:59 2006 UTC revision 582 by ben.allan, Tue May 9 19:07:39 2006 UTC
# Line 933  set ascPopdata(delay) 1000 Line 933  set ascPopdata(delay) 1000
933  # warning: handling cascades with this is messy. See BrowswerProc.tcl  # warning: handling cascades with this is messy. See BrowswerProc.tcl
934  # for and example of how to bind the cascade.  # for and example of how to bind the cascade.
935  proc ascRightMouseAddCommand {widget enabler {kind command} args} {  proc ascRightMouseAddCommand {widget enabler {kind command} args} {
936    global ascPopdata    global ascPopdata tk_version
937    set b $widget.childpop    set b $widget.childpop
938    # create if first entry    # create if first entry
939    if {![winfo exists $b]} {    if {![winfo exists $b]} {
# Line 944  proc ascRightMouseAddCommand {widget ena Line 944  proc ascRightMouseAddCommand {widget ena
944    
945      # make it go away when user leaves it for more than half a second      # make it go away when user leaves it for more than half a second
946      set ascPopdata($b.in) 0      set ascPopdata($b.in) 0
947        switch $tk_version {
948        8.4 -
949        8.5 {
950        bind $b <Leave> "
951          set ascPopdata($b.in) 0
952          set ascPopdata($b.id) \[after \$ascPopdata(delay) \{if \{!\$ascPopdata($b.in)\} \{ tk::MenuUnpost $b \} \}\]
953        "
954        }
955        default {
956      bind $b <Leave> "      bind $b <Leave> "
957        set ascPopdata($b.in) 0        set ascPopdata($b.in) 0
958        set ascPopdata($b.id) \[after \$ascPopdata(delay) \{if \{!\$ascPopdata($b.in)\} \{ tkMenuUnpost $b \} \}\]        set ascPopdata($b.id) \[after \$ascPopdata(delay) \{if \{!\$ascPopdata($b.in)\} \{ tkMenuUnpost $b \} \}\]
959      "      "
960        }
961        }
962      bind $b <Any-Enter> "      bind $b <Any-Enter> "
963        set ascPopdata($b.in) 1        set ascPopdata($b.in) 1
964        catch \{after cancel \$ascPopdata($b.id)\}        catch \{after cancel \$ascPopdata($b.id)\}

Legend:
Removed from v.581  
changed lines
  Added in v.582

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22