[PD-cvs] pd/src desire.tk,1.1.2.600.2.291,1.1.2.600.2.292
Mathieu Bouchard
matju at users.sourceforge.net
Mon Aug 6 07:38:26 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30812
Modified Files:
Tag: desiredata
desire.tk
Log Message:
cleanup
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.291
retrieving revision 1.1.2.600.2.292
diff -C2 -d -r1.1.2.600.2.291 -r1.1.2.600.2.292
*** desire.tk 6 Aug 2007 04:21:08 -0000 1.1.2.600.2.291
--- desire.tk 6 Aug 2007 05:38:21 -0000 1.1.2.600.2.292
***************
*** 2801,2811 ****
mset {type id detail} $target
switch $@action {
- move {$self motion_move $oldpos $x $y; return}
edit {$self motion_edit $x $y $f}
insert {}
chain_obj {}
! imove {$self motion_imove $oldpos $x $y; return}
! mouse_copy {$self motion_move $oldpos $x $y; return}
none {}
default {$@action motion $x $y $f $target}
}
--- 2801,2812 ----
mset {type id detail} $target
switch $@action {
edit {$self motion_edit $x $y $f}
insert {}
chain_obj {}
! imove {$self motion_imove $oldpos $x $y; return}
! mouse_copy {$self motion_move $oldpos $x $y; return}
! move {$self motion_move $oldpos $x $y; return}
none {}
+ subpatcherize {}
default {$@action motion $x $y $f $target}
}
***************
*** 2826,2831 ****
if {[$self look snap_grid]} {
set grid [$self look grid_size]
! set ax [expr (int($x)/$grid)*$grid]
! set ay [expr (int($y)/$grid)*$grid]
set oax [expr (int($ox)/$grid)*$grid]
set oay [expr (int($oy)/$grid)*$grid]
--- 2827,2832 ----
if {[$self look snap_grid]} {
set grid [$self look grid_size]
! set ax [expr (int($x)/$grid)*$grid]
! set ay [expr (int($y)/$grid)*$grid]
set oax [expr (int($ox)/$grid)*$grid]
set oay [expr (int($oy)/$grid)*$grid]
***************
*** 3017,3028 ****
return [list "inlet" $id $val]
}
! # deals with GOP
! if {$@editmode} {
! return [list "object" $id]
! } else {
! if {$class == "Canvas" && [$id gop]} {
! return [list "object" $id]
! } else {return [list "object" $id]}
! }
}
#puts "skipped a $class"
--- 3018,3022 ----
return [list "inlet" $id $val]
}
! return [list "object" $id]
}
#puts "skipped a $class"
***************
*** 3330,3335 ****
bind $f.entry <Tab> "$self completion +"
switch $::tcl_platform(os) {
! Linux {bind $f.entry <ISO_Left_Tab> "$self completion -"}
! default {bind $f.entry <Shift-Tab> "$self completion -"}
}
pack $f.entry -side left -fill x -expand yes
--- 3324,3329 ----
bind $f.entry <Tab> "$self completion +"
switch $::tcl_platform(os) {
! Linux {bind $f.entry <ISO_Left_Tab> "$self completion -"}
! default {bind $f.entry <Shift-Tab> "$self completion -"}
}
pack $f.entry -side left -fill x -expand yes
***************
*** 3342,3346 ****
pack $f -side bottom -fill x -before $w
focus $f.entry
-
}
--- 3336,3339 ----
***************
*** 3426,3431 ****
if {$l == $r} {set l 0; set r 1}
if {$t == $b} {set t 0; set b 1}
! set w [expr (1 / ($r - $l)) * $width]
! set h [expr (1 / ($b - $t)) * $height]
mset {l2 r2} [lmap * [list $l $r] $w]
mset {t2 b2} [lmap * [list $t $b] $h]
--- 3419,3424 ----
if {$l == $r} {set l 0; set r 1}
if {$t == $b} {set t 0; set b 1}
! set w [expr $width / ($r - $l)]
! set h [expr $height / ($b - $t)]
mset {l2 r2} [lmap * [list $l $r] $w]
mset {t2 b2} [lmap * [list $t $b] $h]
***************
*** 3459,3464 ****
mset {x y} [lmap + [lrange $mess 2 3] $offset]
if {!$in} {
! if {$x > $x2 || $x < $x1} {return 0;break}
! if {$y > $y2 || $y < $y1} {return 0;break}
}
}
--- 3452,3457 ----
mset {x y} [lmap + [lrange $mess 2 3] $offset]
if {!$in} {
! if {$x > $x2 || $x < $x1} {return 0}
! if {$y > $y2 || $y < $y1} {return 0}
}
}
***************
*** 3534,3544 ****
set x2 [expr [lindex $mess 2] - [lindex $xcoords $ref] + $vx1 + $xoff]
set y2 [expr [lindex $mess 3] - [lindex $ycoords $ref] + $vy1 + $yoff]
! set mess2 [lreplace $mess 2 3 $x2 $y2]
! return $mess2
} else {
! set mess2 [lreplace $mess 2 3 [expr $x+$offset] [expr $y+$offset]]
! return $mess2
}
-
}
--- 3527,3534 ----
set x2 [expr [lindex $mess 2] - [lindex $xcoords $ref] + $vx1 + $xoff]
set y2 [expr [lindex $mess 3] - [lindex $ycoords $ref] + $vy1 + $yoff]
! return [lreplace $mess 2 3 $x2 $y2]
} else {
! return [lreplace $mess 2 3 [expr $x+$offset] [expr $y+$offset]]
}
}
***************
*** 3636,3640 ****
mset {from outlet to inlet} $wire
switch $callback {
! none {netsend [list .$self connect $from $outlet $to $inlet]}
default {netsend [list .$self connect $from $outlet $to $inlet] $callback}
}
--- 3626,3630 ----
mset {from outlet to inlet} $wire
switch $callback {
! none {netsend [list .$self connect $from $outlet $to $inlet]}
default {netsend [list .$self connect $from $outlet $to $inlet] $callback}
}
***************
*** 3668,3681 ****
set objs $@selection
} else {
! if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} {
! return
! } else {
! set objs $@keynav_iosel_i
! lappend objs $@keynav_iosel_o
! }
! }
! foreach obj $objs {
! $self clear_wires_of $obj
}
}
--- 3658,3665 ----
set objs $@selection
} else {
! if {![llength $@keynav_iosel_i] && ![llength $@keynav_iosel_o]} {return}
! set objs [list $@keynav_iosel_i $@keynav_iosel_o]
}
+ foreach obj $objs {$self clear_wires_of $obj}
}
***************
*** 3691,3704 ****
}
! def Canvas delete_obj_from_path {} {
! $self clear_wires
! $self reconnect
! $self delete_selection
! }
!
! def Canvas remove_obj_from_path {} {
! $self clear_wires
! $self reconnect
! }
def Canvas wire_idx {connects} {
--- 3675,3680 ----
}
! def Canvas delete_obj_from_path {} {$self clear_wires; $self reconnect; $self delete_selection}
! def Canvas remove_obj_from_path {} {$self clear_wires; $self reconnect}
def Canvas wire_idx {connects} {
***************
*** 3717,3721 ****
def Canvas new_object_subpatcherize {subpatch} {
if {![info exists _($subpatch:_class)]} {
! puts " $subpatch don't exists yet...."
set ::subpatcherize(future_sub) $subpatch
}
--- 3693,3697 ----
def Canvas new_object_subpatcherize {subpatch} {
if {![info exists _($subpatch:_class)]} {
! post "%s does not exist yet..." $subpatch
set ::subpatcherize(future_sub) $subpatch
}
***************
*** 3738,3744 ****
}
-
def Canvas subpatcherize {} {
! set ::subpatcherize(incoming) {}; set ::subpatcherize(outgoing) {}
set ::subpatcherize(incoming_inlet) {}; set ::subpatcherize(incoming_outlet) {}
set ::subpatcherize(outgoing_inlet) {}; set ::subpatcherize(outgoing_outlet) {}
--- 3714,3719 ----
}
def Canvas subpatcherize {} {
! set ::subpatcherize(incoming) {}; set ::subpatcherize(outgoing) {}
set ::subpatcherize(incoming_inlet) {}; set ::subpatcherize(incoming_outlet) {}
set ::subpatcherize(outgoing_inlet) {}; set ::subpatcherize(outgoing_outlet) {}
***************
*** 3821,3825 ****
puts " outgoing_inlet::: $::subpatcherize(outgoing_inlet)"
puts "-------------------------------------"
-
}
def Canvas subpatcherize_makeports {} {
--- 3796,3799 ----
***************
*** 3857,3882 ****
}
$self subpatcherize_makeports
- #netsend [list #X pop 1]
netsend [list #X pop 0]
$self subpatcherize_reconnect_outside
- #set ::subpatcherize(edit) 1
- #after 500 $self edit
set ::subpatcherize(edit2) $self
}
def Canvas subpatcherize_reconnect_outside {} {
foreach wire $::subpatcherize(incoming) {
! set canvas [$self canvas]
! set from [lsearch [$canvas children] [lindex $wire 0]]
! set to [lsearch [[$self canvas] children] $self]
! set wire2 [list $from [lindex $wire 1] $to [lindex $wire 3]]
! $canvas connect $wire2
}
foreach wire $::subpatcherize(outgoing) {
! set canvas [$self canvas]
! set to [lsearch [$canvas children] [lindex $wire 2]]
! set from [lsearch [[$self canvas] children] $self]
! set wire2 [list $from [lindex $wire 1] $to [lindex $wire 3]]
! $canvas connect $wire2
}
}
--- 3831,3852 ----
}
$self subpatcherize_makeports
netsend [list #X pop 0]
$self subpatcherize_reconnect_outside
set ::subpatcherize(edit2) $self
}
def Canvas subpatcherize_reconnect_outside {} {
+ set canvas [$self canvas]
foreach wire $::subpatcherize(incoming) {
! mset {from outlet to inlet} $wire
! set from [lsearch [$canvas children] $from]
! set to [lsearch [$canvas children] $self]
! $canvas connect [list $from $outlet $to $inlet]
}
foreach wire $::subpatcherize(outgoing) {
! mset {from outlet to inlet} $wire
! set to [lsearch [$canvas children] $to ]
! set from [lsearch [$canvas children] $self]
! $canvas connect [list $from $inlet $to $outlet]
}
}
***************
*** 3936,3945 ****
}
switch $type {
! outlet {
! mset [list type @from @outlet] $target
! }
! inlet {
! mset [list type @to @inlet] $target
! }
default {}
}
--- 3906,3911 ----
}
switch $type {
! outlet {mset [list type @from @outlet] $target}
! inlet {mset [list type @to @inlet] $target}
default {}
}
***************
*** 3955,3959 ****
}
-
class_new GopRect {View}
--- 3921,3924 ----
More information about the Pd-cvs
mailing list