[PD-cvs] pd/src desire.tk,1.1.2.588,1.1.2.589

chunlee chunlee at users.sourceforge.net
Fri Nov 24 03:48:10 CET 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5010

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
remove old do_paste code, commented out the paste(count) stuff for now..


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.588
retrieving revision 1.1.2.589
diff -C2 -d -r1.1.2.588 -r1.1.2.589
*** desire.tk	24 Nov 2006 00:31:48 -0000	1.1.2.588
--- desire.tk	24 Nov 2006 02:48:07 -0000	1.1.2.589
***************
*** 2724,2731 ****
  	set @obj_count 0; set @wire_count 0
  	set in 0
! 	foreach mess [pd_mess_split [$::clipboard value]] {
! 		set type [lindex $mess 1]
! 		switch $type {connect {} restore {} default {if {$type != ""} {incr paste(count)}}}
! 	}
  	pd .$self push
  	set paste(state) $self
--- 2724,2731 ----
  	set @obj_count 0; set @wire_count 0
  	set in 0
! 	#foreach mess [pd_mess_split [$::clipboard value]] {
! 	#	set type [lindex $mess 1]
! 	#	switch $type {connect {} restore {} default {if {$type != ""} {incr paste(count)}}}
! 	#}
  	pd .$self push
  	set paste(state) $self
***************
*** 2760,2806 ****
  }
  
- def Canvas do_paste_oldstyle {offset} {
- 	global clipboard subpatcherize
- 	set n [llength $@children] ;# is a racecondition
- 	set m [llength $@wires] ;#let's race!!
- 	set clips [split [$clipboard value] ";"]
- 	set clips_len [llength $clips]
- 	set i 0; 
- 	foreach line $clips {
- 		if {[llength $line] == 0} {continue}
- 		switch -- [lindex $line 0] {
- 		  "#N" {error "don't know how to paste a subpatch"}
- 		  "#X" {
- 		    switch -- [lindex $line 1] {
- 			restore {error "don't know how to paste a subpatch"}
- 			connect {
- 				mset {foo bar from outlet to inlet} $line
- 				pd .$self connect [expr $n+$from] $outlet [expr $n+$to] $inlet
- 			}
- 			default {
- 				set line2 [lrange $line 1 end]
- 				mset {x y} [lrange $line2 1 2]
- 				set line2 [lreplace $line2 1 2 [expr $x+$offset] [expr $y+$offset]]
- 				eval [concat [list pd .$self] $line2]
- 			}
- 		    }
- 
- 		  }
- 		  default {error "Canvas paste can't parse clipboard ([lindex $line 0])"}
- 		}
- 	}
- 	if {!$subpatcherize(paste)} {
- 		after 300 "$self do_paste2 $n $m" ;# racecondition
- 	} else {
- 		set subpatcherize(paste) 0
- 	}
- }
- # part two
- def Canvas do_paste2 {n m} {
- 	global subpatcherize
- 	$self selection=      [lrange [$self children] $n end]
- 	$self selection_wire= [lrange [$self wires]    $m end]
- }
- 
  def Canvas cut {} {
  	$@history atomically [list cut] {
--- 2760,2763 ----
***************
*** 4191,4200 ****
  #state is 0 when not pasting, its the canvas id if it is
  set paste(state) 0
! set paste(count) 0
! set paste(count2) 0
  
  proc update_object {self e ninlets noutlets} {
  	global paste
! 	if {$paste(state) != "0"} {pasting_count $self}
  	foreach mess [pd_mess_split $e] {update_object_2 $self $mess}
  	if {[lindex $e 1] == "array"} {
--- 4148,4157 ----
  #state is 0 when not pasting, its the canvas id if it is
  set paste(state) 0
! #set paste(count) 0
! #set paste(count2) 0
  
  proc update_object {self e ninlets noutlets} {
  	global paste
! 	#if {$paste(state) != "0"} {pasting_count $self}
  	foreach mess [pd_mess_split $e] {update_object_2 $self $mess}
  	if {[lindex $e 1] == "array"} {
***************
*** 4254,4261 ****
  }
  
! proc pasting_count {self} {
! 	global paste _
! 	if {$paste(count2) != $paste(count)} {incr paste(count2)}
! }
  
  # split at message boundaries.
--- 4211,4218 ----
  }
  
! #proc pasting_count {self} {
! #	global paste _
! #	if {$paste(count2) != $paste(count)} {incr paste(count2)}
! #}
  
  # split at message boundaries.





More information about the Pd-cvs mailing list