[PD-cvs] pd/src desire.tk,1.1.2.600.2.34,1.1.2.600.2.35
chunlee
chunlee at users.sourceforge.net
Thu Dec 7 18:55:09 CET 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1729
Modified Files:
Tag: desiredata
desire.tk
Log Message:
netsend first arg changed to a list
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.34
retrieving revision 1.1.2.600.2.35
diff -C2 -d -r1.1.2.600.2.34 -r1.1.2.600.2.35
*** desire.tk 7 Dec 2006 02:55:29 -0000 1.1.2.600.2.34
--- desire.tk 7 Dec 2006 17:55:05 -0000 1.1.2.600.2.35
***************
*** 244,248 ****
}
puts "[VTyellow]warning: proc pd is obsolete (called from $level).[VTgrey]"
! netsend [join $args]
}
--- 244,248 ----
}
puts "[VTyellow]warning: proc pd is obsolete (called from $level).[VTgrey]"
! netsend $args
}
***************
*** 256,265 ****
if {[string compare $callback noserial]} {
set replyset($serial) $callback
! if {$::debug} {puts "<- $message; [VTgreen]serial #$serial will do: $callback \$new[VTgrey]"}
incr serial
} else {
! if {$::debug} {puts "<- $message;"}
}
! puts $sock "$message;"
}
--- 256,265 ----
if {[string compare $callback noserial]} {
set replyset($serial) $callback
! if {$::debug} {puts "<- [join $message]; [VTgreen]serial #$serial will do: $callback \$new[VTgrey]"}
incr serial
} else {
! if {$::debug} {puts "<- [join $message];"}
}
! puts $sock "[join $message];"
}
***************
*** 706,716 ****
frame .controls.switches
foreach {w x y z} {
! audiobutton audio ctrls_audio_on {netsend "pd dsp $ctrls_audio_on"}
! meterbutton meters ctrls_meter_on {netsend "pd meters $ctrls_meter_on"}
} {
pack [checkbutton .controls.switches.$w -text [say $x] \
-variable $y -anchor w -command $z] -side left
}
! pack [button .controls.switches.dio -text [say io_errors] -command {netsend "pd audiostatus"} -padx 5]
pack .controls.switches -side right
frame .debug
--- 706,716 ----
frame .controls.switches
foreach {w x y z} {
! audiobutton audio ctrls_audio_on {netsend [list pd dsp $ctrls_audio_on]}
! meterbutton meters ctrls_meter_on {netsend [list pd meters $ctrls_meter_on]}
} {
pack [checkbutton .controls.switches.$w -text [say $x] \
-variable $y -anchor w -command $z] -side left
}
! pack [button .controls.switches.dio -text [say io_errors] -command {netsend [list pd audiostatus]} -padx 5]
pack .controls.switches -side right
frame .debug
***************
*** 812,816 ****
post "Connected to server"
fconfigure $sock -blocking 0 -buffering line
! netsend "pd init"
poll_sock
foreach f $::files_to_open {
--- 812,816 ----
post "Connected to server"
fconfigure $sock -blocking 0 -buffering line
! netsend [list pd init]
poll_sock
foreach f $::files_to_open {
***************
*** 819,823 ****
set file [lindex $ff [expr $ffl-1]]
set dir [join [lrange $ff 0 [expr $ffl-2]] [file separator]]
- #pd pd open $file $dir
netsend [join [list pd open $file $dir]]
}
--- 819,822 ----
***************
*** 856,860 ****
}
! proc pdtk_watchdog {} {netsend "pd ping"; after 2000 {pdtk_watchdog}}
proc accel_munge {acc} {
--- 855,859 ----
}
! proc pdtk_watchdog {} {netsend [list pd ping]; after 2000 {pdtk_watchdog}}
proc accel_munge {acc} {
***************
*** 887,897 ****
def Client new_file {} {
! global untitled_number untitled_folder
! netsend "pd filename Untitled-$untitled_number $untitled_folder"
! netsend "#N canvas" {none}
! netsend "#X pop 1"
! incr untitled_number
}
set patch_filetypes {
{"pd files" ".pd"}
--- 886,897 ----
def Client new_file {} {
! global untitled_number untitled_folder
! netsend [list pd filename Untitled-$untitled_number $untitled_folder]
! netsend [list #N canvas] {none}
! netsend [list #X pop 1]
! incr untitled_number
}
+
set patch_filetypes {
{"pd files" ".pd"}
***************
*** 914,918 ****
set basename [string range $filename [expr $i+1] end]
if {[string last .pd $filename] >= 0} {
! netsend "pd open [enquote $basename] [enquote $folder]"
}
}
--- 914,918 ----
set basename [string range $filename [expr $i+1] end]
if {[string last .pd $filename] >= 0} {
! netsend [list pd open [enquote $basename] [enquote $folder]]
}
}
***************
*** 929,934 ****
def Client quit {} {
! set answer [tk_messageBox -message "Do you really wish to quit?" -type yesno -icon question]
! switch -- $answer {yes {netsend "pd quit"; exit}}
}
--- 929,934 ----
def Client quit {} {
! set answer [tk_messageBox -message "Do you really wish to quit?" -type yesno -icon question]
! switch -- $answer {yes {netsend [list pd quit]; exit}}
}
***************
*** 1164,1168 ****
set canvas [$@canvas get_canvas]
if {$canvas == ""} {return}
! set c [[$canvas get_canvas] widget]
if {![winfo exists $c]} {return}
}
--- 1164,1168 ----
set canvas [$@canvas get_canvas]
if {$canvas == ""} {return}
! set c [[$@canvas get_canvas] widget]
if {![winfo exists $c]} {return}
}
***************
*** 1175,1180 ****
def View delete {} {
! if {[$self class] == "Canvas"} {
! } else {$self erase}
}
def View erase {} {$self item_delete}
--- 1175,1181 ----
def View delete {} {
! # if {[$self class] == "Canvas"} {
! # } else {$self erase}
! $self erase
}
def View erase {} {$self item_delete}
***************
*** 1217,1220 ****
--- 1218,1222 ----
def View get_canvas {} {
set canvas $@canvas
+ if {$canvas == ""} {return ""}
while {![winfo exists [$canvas widget]]} {set canvas [$canvas canvas]}
return $canvas
***************
*** 1258,1265 ****
def View draw_maybe {} {
! if {$@canvas == "" && [winfo exists .$self.c]} {$self draw}
if {[$self class] == "Canvas" && $@canvas == ""} {return}
if {$@inside_box} {
! if {[$@canvas mapped]} {if {![$@canvas abs]} {$self draw}}
} else {
# for drawing opened gop
--- 1260,1267 ----
def View draw_maybe {} {
! if {$@canvas == "" && [winfo exists .$self.c]} {$self draw; puts " here is another draw"}
if {[$self class] == "Canvas" && $@canvas == ""} {return}
if {$@inside_box} {
! if {[$@canvas mapped]} {if {![$@canvas abs]} {$self draw; puts " here is the draw"}}
} else {
# for drawing opened gop
***************
*** 1268,1272 ****
} else {
if {[$self class] == "Array"} {$self draw; return}
! # puts "skipping $self, don't draw it...."
$self delete
}
--- 1270,1274 ----
} else {
if {[$self class] == "Array"} {$self draw; return}
! #puts "skipping $self, don't draw it...."
$self delete
}
***************
*** 1284,1302 ****
#set @mapped 0
if {$@gop} {
! set @mapped 1; netsend ".$self map 1"
} else {
! set @mapped 0; netsend ".$self map 0"
}
! pd .$self close
return
}
if {$@gop} {
foreach x $@children {$x outside_of_the_box}
! pd .$self close
return
}
switch [tk_messageBox -message [say save_changes?] -icon question -type yesnocancel -default cancel] {
! yes {$self save; pd .$self close}
! no { pd .$self close}
cancel {}
}
--- 1286,1304 ----
#set @mapped 0
if {$@gop} {
! set @mapped 1; netsend [list .$self map 1]
} else {
! set @mapped 0; netsend [list .$self map 0]
}
! netsend [list .$self close]
return
}
if {$@gop} {
foreach x $@children {$x outside_of_the_box}
! netsend [list .$self close]
return
}
switch [tk_messageBox -message [say save_changes?] -icon question -type yesnocancel -default cancel] {
! yes {$self save; netsend [list .$self close]}
! no { netsend [list .$self close]}
cancel {}
}
***************
*** 1306,1316 ****
if {$@subpatch} {return [$@canvas save]}
$self checkgeometry
- #if {$@name != ""} {
- # pd .$self savetofile $@name $@folder
- #} else {
- # $self save_as
- #}
if {![regexp {^Untitled-[0-9]} $@name]} {
! pd .$self savetofile $@name $@folder
} else {
$self save_as
--- 1308,1313 ----
if {$@subpatch} {return [$@canvas save]}
$self checkgeometry
if {![regexp {^Untitled-[0-9]} $@name]} {
! netsend [list .$self savetofile $@name $@folder]
} else {
$self save_as
***************
*** 1326,1330 ****
set @folder [string range $filename 0 [expr [string last / $filename]-1]]
puts "save $@file dir to $@folder"
! pd .$self savetofile $@file $@folder
}
}
--- 1323,1327 ----
set @folder [string range $filename 0 [expr [string last / $filename]-1]]
puts "save $@file dir to $@folder"
! netsend [list .$self savetofile $@file $@folder]
}
}
***************
*** 1357,1361 ****
set help_directory [string range $filename 0 [expr [string last / $filename]-1]]
set basename [string range $filename [expr [string last / $filename]+1] end]
! netsend "pd open [pdtk_enquote $basename] [pdtk_enquote $help_directory]"
}
}
--- 1354,1358 ----
set help_directory [string range $filename 0 [expr [string last / $filename]-1]]
set basename [string range $filename [expr [string last / $filename]+1] end]
! netsend [list pd open [pdtk_enquote $basename] [pdtk_enquote $help_directory]]
}
}
***************
*** 1762,1767 ****
}
def Canvas reload {} {
! netsend ".$self map 0"
! netsend ".$self map 1"
}
def Canvas redraw {} {
--- 1759,1764 ----
}
def Canvas reload {} {
! netsend [list .$self map 0]
! netsend [list .$self map 1]
}
def Canvas redraw {} {
***************
*** 1781,1785 ****
default {set goto [list $self new_object_callback]}
}
! netsend [join [concat [list .$self $sel $x $y] $args]] $goto
}
--- 1778,1782 ----
default {set goto [list $self new_object_callback]}
}
! netsend [list [concat [list .$self $sel $x $y] $args]] $goto
}
***************
*** 1799,1802 ****
--- 1796,1800 ----
if {[winfo exists .$self.c]} {return $self}
}
+ if {[info exists @subpatch]} {if {$@subpatch} {return [$self canvas]}}
return [super]
}
***************
*** 2217,2221 ****
set l {}
foreach char [split $@text ""] {lappend l [scan $char %c]}
! netsend [join [list .$@canvas text_setto !$self $l]] [list $@canvas new_object_callback]
$self changed
if {[$@canvas action] == "insert"} {
--- 2215,2219 ----
set l {}
foreach char [split $@text ""] {lappend l [scan $char %c]}
! netsend [list .$@canvas text_setto !$self $l] [list $@canvas new_object_callback]
$self changed
if {[$@canvas action] == "insert"} {
***************
*** 2373,2377 ****
$@history add [list $self ins $i [$o deconstruct]]
}
! netsend [join [list .$self "object_delete" !$o]]
}
--- 2371,2375 ----
$@history add [list $self ins $i [$o deconstruct]]
}
! netsend [list .$self object_delete !$o]
}
***************
*** 2893,2897 ****
set ref [lsearch $ycoords [lindex [lsort -increasing $ycoords] 0]]
#pd .$self push
! netsend [join [list .$self "push"]]
set paste(state) $self
foreach mess [pd_mess_split [$::clipboard value]] {
--- 2891,2895 ----
set ref [lsearch $ycoords [lindex [lsort -increasing $ycoords] 0]]
#pd .$self push
! netsend [list .$self "push"]
set paste(state) $self
foreach mess [pd_mess_split [$::clipboard value]] {
***************
*** 2919,2923 ****
set mess2 [lreplace $mess 2 3 $x2 $y2]
}
! netsend [join $mess2] [list $self new_object_callback]
incr @obj_count
}
--- 2917,2921 ----
set mess2 [lreplace $mess 2 3 $x2 $y2]
}
! netsend $mess2 [list $self new_object_callback]
incr @obj_count
}
***************
*** 2925,2929 ****
}
}
! netsend "#X pop 1"
}
--- 2923,2927 ----
}
}
! netsend [list #X pop 1]
}
***************
*** 2977,2982 ****
def Canvas popup_open {} {
set @mapped 1
! pd .$self vis 1
! pd .$self map 1
$self init_window
$self redraw
--- 2975,2980 ----
def Canvas popup_open {} {
set @mapped 1
! netsend [list .$self vis 1]
! netsend [list .$self map 1]
$self init_window
$self redraw
***************
*** 3008,3017 ****
$self selection_wire-= [lindex $@wires_pair [expr [lsearch $@wires_pair $wire]+1]]
mset {from outlet to inlet} $wire
! netsend [join [list .$self disconnect $from $outlet $to $inlet]]
$@history add [list $self connect $wire]
}
def Canvas connect {wire} {
mset {from outlet to inlet} $wire
! netsend [join [list .$self connect $from $outlet $to $inlet]]
$@history add [list $self disconnect $wire]
}
--- 3006,3015 ----
$self selection_wire-= [lindex $@wires_pair [expr [lsearch $@wires_pair $wire]+1]]
mset {from outlet to inlet} $wire
! netsend [list .$self disconnect $from $outlet $to $inlet]
$@history add [list $self connect $wire]
}
def Canvas connect {wire} {
mset {from outlet to inlet} $wire
! netsend [list .$self connect $from $outlet $to $inlet]
$@history add [list $self disconnect $wire]
}
***************
*** 4020,4024 ****
# View xy is virtual (for GOP)
def Box moveto {x1 y1} {
! netsend ".$@canvas object_moveto !$self $x1 $y1"
[$@canvas history] add [list $self moveto $@x1 $@y1]
if {[$self class] == "Canvas"} {
--- 4018,4022 ----
# View xy is virtual (for GOP)
def Box moveto {x1 y1} {
! netsend [list .$@canvas object_moveto !$self $x1 $y1]
[$@canvas history] add [list $self moveto $@x1 $@y1]
if {[$self class] == "Canvas"} {
***************
*** 6754,6758 ****
set audio_props [$self audio_properties=?]
#pd pd audio-dialog $audio_props
! netsend [join [list "pd" "sudio-dialog" $audio_props]]
}
--- 6752,6756 ----
set audio_props [$self audio_properties=?]
#pd pd audio-dialog $audio_props
! netsend [list "pd" "sudio-dialog" $audio_props]
}
***************
*** 6938,6942 ****
def ServerPrefsDialog init {} {
! netsend "pd audio-properties"
$self init_reverse_hash
$self read
--- 6936,6940 ----
def ServerPrefsDialog init {} {
! netsend [list pd audio-properties]
$self init_reverse_hash
$self read
More information about the Pd-cvs
mailing list