Tk Library Source Code

Artifact [ff540c1922]
Login

Artifact ff540c192217cd93df9fd0ac04e2e8abbe28a97f:

Attachment "listbox-1.9.0.diff2" to ticket [2995969fff] added by oehhar 2010-05-07 01:10:54.
197,203c197,203
<             $path bindText <ButtonRelease-1>          ""
<             $path bindText <Shift-ButtonRelease-1>    ""
<             $path bindText <Control-ButtonRelease-1>  ""
< 
<             $path bindImage <ButtonRelease-1>         ""
<             $path bindImage <Shift-ButtonRelease-1>   ""
<             $path bindImage <Control-ButtonRelease-1> ""
---
>             $path bindText <Button-1>          ""
>             $path bindText <Shift-Button-1>    ""
>             $path bindText <Control-Button-1>  ""
> 
>             $path bindImage <Button-1>         ""
>             $path bindImage <Shift-Button-1>   ""
>             $path bindImage <Control-Button-1> ""
217,223c217,223
<             $path bindText <ButtonRelease-1>          [list $cmd $path n %x %y]
<             $path bindText <Shift-ButtonRelease-1>    [list $cmd $path s %x %y]
<             $path bindText <Control-ButtonRelease-1>  [list $cmd $path c %x %y]
< 
<             $path bindImage <ButtonRelease-1>         [list $cmd $path n %x %y]
<             $path bindImage <Shift-ButtonRelease-1>   [list $cmd $path s %x %y]
<             $path bindImage <Control-ButtonRelease-1> [list $cmd $path c %x %y]
---
>             $path bindText <Button-1>          [list $cmd $path n %x %y]
>             $path bindText <Shift-Button-1>    [list $cmd $path s %x %y]
>             $path bindText <Control-Button-1>  [list $cmd $path c %x %y]
> 
>             $path bindImage <Button-1>         [list $cmd $path n %x %y]
>             $path bindImage <Shift-Button-1>   [list $cmd $path s %x %y]
>             $path bindImage <Control-Button-1> [list $cmd $path c %x %y]
1667,1674c1667
<     # Check if startItem is part of the current selection and process the
<     # whole selection if so
<     set selItems [selection $path get]
<     if {-1 != [lsearch -exact $selItems $startItem]} {
<         set dragItems $selItems
<     } else {
<         set dragItems [list $startItem]
<     }
---
>     if {$idx > [$path index $startItem]} { incr idx -1 }
1676,1692c1669,1673
<     # get drag indexes (to sort them)
< 	foreach dragItem $dragItems {
<         lappend dragIdx [$path index $dragItem]
<     }
<     foreach pos [lsort -integer -indices $dragIdx] {
<         set dragItem [lindex $dragItems $pos]
<         set dragIdx [$path index $dragItem]
<         if {$idx > $dragIdx} { incr idx -1 }
<         if {[string equal $operation "copy"]} {
<             set options [Widget::options $path.$dragItem]
<             eval [linsert $options 0 $path insert $idx $dragItem\#auto]
<             incr idx
<         } else {
<             $path move $dragItem $idx
<             set idx [$path index $dragItem]
<             incr idx
<         }
---
>     if {[string equal $operation "copy"]} {
>         set options [Widget::options $path.$startItem]
>         eval [linsert $options 0 $path insert $idx $startItem\#auto]
>     } else {
>         $path move $startItem $idx