Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31134
Modified Files: Tag: devel_0_39 desire.tk Log Message: ..
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.598 retrieving revision 1.1.2.599 diff -C2 -d -r1.1.2.598 -r1.1.2.599 *** desire.tk 28 Nov 2006 03:42:00 -0000 1.1.2.598 --- desire.tk 28 Nov 2006 16:07:17 -0000 1.1.2.599 *************** *** 248,255 **** #-----------------------------------------------------------------------------------# #used during subpatcherize ! set subpatcherize(pack) 0 set subpatcherize(paste) 0 set subpatcherize(parent) 0 set subpatcherize(count) 0 #-----------------------------------------------------------------------------------# # adapted from matju's MetaRuby (UndoQueue.rb) --- 248,259 ---- #-----------------------------------------------------------------------------------# #used during subpatcherize ! set subpatcherize(cut) 0 ! set subpatcherize(insert) 0 set subpatcherize(paste) 0 set subpatcherize(parent) 0 + set subpatcherize(sub) 0 set subpatcherize(count) 0 + set subpatcherize(x) 0 + set subpatcherize(y) 0 #-----------------------------------------------------------------------------------# # adapted from matju's MetaRuby (UndoQueue.rb) *************** *** 1459,1463 **** if {![winfo exists .$self.c]} {$self init_window} } - $self subpatcherize_copy_objs } coords { --- 1463,1466 ---- *************** *** 2167,2172 **** --- 2170,2196 ---- global paste if {!$@mapped} {return}; set @folder $folder; $self update_title + $self done_update + } + + def Canvas done_update {} { + global paste subpatcherize if {$self == $paste(state)} {$self done_paste} + if {$self == $subpatcherize(parent) && $subpatcherize(cut)} { + set subpatcherize(cut) 0; set subpatcherize(insert) 1 + set construct "#X obj $subpatcherize(x) $subpatcherize(y) pd sub$subpatcherize(count)" + pd .$self object_insert [expr [llength $@children] - 1] $construct + return + } + if {$self != $subpatcherize(parent) && $subpatcherize(insert)} { + set subpatcherize(sub) $self + } + if {$self == $subpatcherize(parent) && $subpatcherize(insert)} { + if {$subpatcherize(sub) == "0"} {return} + $subpatcherize(sub) paste + set subpatcherize(insert) 0 + return + } } + def Canvas make_title {} { if {!$@mapped} {return} *************** *** 2694,2698 **** set height [winfo height $c] set width [winfo width $c] ! if {$subpatcherize(paste)} {set height 300; set width 450} mset {l r} [$c xview] mset {t b} [$c yview] --- 2718,2722 ---- set height [winfo height $c] set width [winfo width $c] ! if {$width == 1 && $height == 1} {set height 300; set width 450} mset {l r} [$c xview] mset {t b} [$c yview] *************** *** 2818,2827 **** def Canvas done_paste {} { global paste subpatcherize - puts " count ---------- $@obj_count" $self deselect_all $self selection= [lrange $@children [expr [llength $@children] - $@obj_count] end] $self selection_wire= [lrange $@wires [expr [llength $@wires] - $@wire_count] end] set paste(state) 0 - if {$subpatcherize(paste)} {set subpatcherize(paste) 0} }
--- 2842,2849 ---- *************** *** 2964,2968 ****
def Canvas subpatcherize {} { ! global subpatcherize if {![llength $@selection]} {return} set x 0; set y 0 --- 2986,2991 ----
def Canvas subpatcherize {} { ! global subpatcherize ! set subpatcherize(sub) 0 if {![llength $@selection]} {return} set x 0; set y 0 *************** *** 2972,2997 **** set y [expr $y + $y1] } ! set x [expr $x / [llength $@selection]] ! set y [expr $y / [llength $@selection]] ! set construct "#X obj $x $y pd sub$subpatcherize(count)" ! set subpatcherize(pack) 1 set subpatcherize(parent) $self ! incr subpatcherize(count) $self cut - pd .$self object_insert [expr [llength $@children] - 1] $construct - - } - - def Canvas subpatcherize_copy_objs {} { - global subpatcherize - if {$self == $subpatcherize(parent)} {return} - if {$subpatcherize(pack)} { - set subpatcherize(paste) 1 - $self paste - #after 200 $self edit - set c $@canvas - set subpatcherize(pack) 0 - } - }
--- 2995,3004 ---- set y [expr $y + $y1] } ! set subpatcherize(x) [expr $x / [llength $@selection]] ! set subpatcherize(y) [expr $y / [llength $@selection]] ! set subpatcherize(cut) 1 set subpatcherize(parent) $self ! incr subpatcherize(count) $self cut }