[PD-cvs] pd/src desire.tk,1.1.2.600.2.277,1.1.2.600.2.278
Mathieu Bouchard
matju at users.sourceforge.net
Sat Aug 4 05:48:35 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21308
Modified Files:
Tag: desiredata
desire.tk
Log Message:
replace some $@children by [$self children]
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.277
retrieving revision 1.1.2.600.2.278
diff -C2 -d -r1.1.2.600.2.277 -r1.1.2.600.2.278
*** desire.tk 4 Aug 2007 03:33:15 -0000 1.1.2.600.2.277
--- desire.tk 4 Aug 2007 03:48:31 -0000 1.1.2.600.2.278
***************
*** 1411,1416 ****
def Canvas close {} {
if {$@subpatch} {
! #can't wait till @mapped get updated till proc change
! if {$@gop} {foreach x $@children {$x outside_of_the_box}}
#set @mapped 0
netsend [list .$self vis 0]
--- 1411,1416 ----
def Canvas close {} {
if {$@subpatch} {
! #can't wait till @mapped get updated thru proc change
! if {$@gop} {foreach x [$self children] {$x outside_of_the_box}}
#set @mapped 0
netsend [list .$self vis 0]
***************
*** 1420,1424 ****
}
if {$@gop} {
! foreach x $@children {$x outside_of_the_box}
netsend [list .$self close]
return
--- 1420,1424 ----
}
if {$@gop} {
! foreach x [$self children] {$x outside_of_the_box}
netsend [list .$self close]
return
***************
*** 1559,1563 ****
}
# comment's look depends on the value of @editmode
! foreach child $@children {if {[[$child class] <= Comment]} {$child changed}}
#!@#$ should update the checkbox in the editmenu
}
--- 1559,1563 ----
}
# comment's look depends on the value of @editmode
! foreach child [$self children] {if {[[$child class] <= Comment]} {$child changed}}
#!@#$ should update the checkbox in the editmenu
}
***************
*** 1737,1741 ****
# turn statusbar on/off
if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
! pack [canvas $c -width $@canvasxs -height $@canvasys -background white] -side left -expand 1 -fill both
$self init_scrollbars
wm minsize $win 1 1
--- 1737,1741 ----
# turn statusbar on/off
if {[$self look statusbar]} {pack [$@statusbar widget] -side bottom -fill x}
! pack [canvas $c -width [lindex $@canvas_size 0] -height [lindex $@canvas_size 1] -background white] -side left -expand 1 -fill both
$self init_scrollbars
wm minsize $win 1 1
***************
*** 1763,1771 ****
if {[winfo exists $win.yscroll]} {return}
set size [$c bbox all]
if {$size != ""} {
mset {x1 y1 x2 y2} $size
! if {$x2 > $@canvasxs} {set xregion $x2} else {set xregion $@canvasxs}
! if {$y2 > $@canvasys} {set yregion $y2} else {set yregion $@canvasys}
! } else {set xregion $@canvasxs; set yregion $@canvasys}
pack [scrollbar $win.yscroll -command "$c yview" ] -side right -fill y -before $c
pack [scrollbar $win.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x -before $c
--- 1763,1772 ----
if {[winfo exists $win.yscroll]} {return}
set size [$c bbox all]
+ mset {xs ys} $@canvas_size
if {$size != ""} {
mset {x1 y1 x2 y2} $size
! set xregion [max $x2 $xs]
! set yregion [max $x2 $ys]
! } else {set xregion $xs; set yregion $ys}
pack [scrollbar $win.yscroll -command "$c yview" ] -side right -fill y -before $c
pack [scrollbar $win.xscroll -command "$c xview" -orient horizontal] -side bottom -fill x -before $c
***************
*** 1835,1839 ****
def Canvas delete_children {} {
! foreach child $@children {
if {[$child class] == "Canvas"} {
$child delete
--- 1836,1840 ----
def Canvas delete_children {} {
! foreach child [$self children] {
if {[$child class] == "Canvas"} {
$child delete
***************
*** 1966,1970 ****
def Canvas redraw {} {
$self changed
! foreach x $@children {$x changed}
foreach x $@wires {$x changed}
}
--- 1967,1971 ----
def Canvas redraw {} {
$self changed
! foreach x [$self children] {$x changed}
foreach x $@wires {$x changed}
}
***************
*** 2194,2202 ****
[$self widget] configure -background $bg
$self adjust_scrollbars
! if {$@gop} {
! # this was to test if a canvas is graphical array....
! #if {[llength $@children] != 1 && [[lindex $@children 0] class] != "Array"} {$self gop_rect}
! $self gop_rect
! }
}
--- 2195,2199 ----
[$self widget] configure -background $bg
$self adjust_scrollbars
! if {$@gop} {$self gop_rect}
}
***************
*** 2560,2563 ****
--- 2557,2562 ----
def Canvas mapped= {v} {set @mapped $v}
def Canvas children {} {return $@children}
+ def Canvas children_idx {obj} {return [lsearch $@children $obj]}
+ def Canvas child_by_idx {obj} {return [lindex $@children $obj]}
def Canvas havewindow= {flag} {
***************
*** 2582,2587 ****
}
- def Canvas children_idx {obj} {return [lsearch $@children $obj]}
-
# think of the children!!!
# THIS IS NOT WHERE HISTORY ADD IS SUPPOSED TO BE!
--- 2581,2584 ----
***************
*** 2590,2597 ****
# and its use should be limited to the minimum.
def Canvas children= {children} {
- set new [lwithout $children $@children]
- set dead [lwithout $@children $children]
set @children $children
- #foreach x $@children {$x outside_of_the_box}
$self changed children
}
--- 2587,2591 ----
***************
*** 2633,2637 ****
def Canvas del {i} {
! set o [lindex $@children $i]
#this keynav should be better sorted out
if {$o == $@keynav_current || $o == $@keynav_last_obj} {
--- 2627,2631 ----
def Canvas del {i} {
! set o [$self child_by_idx $i]
#this keynav should be better sorted out
if {$o == $@keynav_current || $o == $@keynav_last_obj} {
More information about the Pd-cvs
mailing list