Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28258
Modified Files: Tag: devel_0_39 desire.tk Log Message: in proc pd, the final semicolon is now implicit. also, re-fixed the textbox width problem
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.94 retrieving revision 1.1.2.95 diff -C2 -d -r1.1.2.94 -r1.1.2.95 *** desire.tk 1 Nov 2005 17:23:16 -0000 1.1.2.94 --- desire.tk 1 Nov 2005 20:56:44 -0000 1.1.2.95 *************** *** 251,256 **** frame .controls.switches foreach {w x y z} { ! audiobutton "audio" ctrls_audio_on {pd "pd dsp $ctrls_audio_on ;"} ! meterbutton "meters" ctrls_meter_on {pd "pd meters $ctrls_meter_on ;"} } { pack [checkbutton .controls.switches.$w -text $x \ --- 251,256 ---- frame .controls.switches foreach {w x y z} { ! audiobutton "audio" ctrls_audio_on {pd pd dsp $ctrls_audio_on} ! meterbutton "meters" ctrls_meter_on {pd pd meters $ctrls_meter_on} } { pack [checkbutton .controls.switches.$w -text $x \ *************** *** 259,263 ****
pack [button .controls.switches.dio -text "io errors" \ ! -command {pd "pd audiostatus ;"}] pack .controls.switches -side right
--- 259,263 ----
pack [button .controls.switches.dio -text "io errors" \ ! -command {pd pd audiostatus}] pack .controls.switches -side right
*************** *** 334,339 **** set dir [join [lrange $ff 0 [expr $ffl-2]] [file separator]] post "f='$f' ff='$ff' ffl='$ffl'" ! post "pd open $file $dir ;" ! pd "pd open $file $dir ;" } } { --- 334,338 ---- set dir [join [lrange $ff 0 [expr $ffl-2]] [file separator]] post "f='$f' ff='$ff' ffl='$ffl'" ! pd pd open $file $dir } } { *************** *** 383,387 **** }
! proc pdtk_watchdog {} {pd "pd ping ;"; after 2000 {pdtk_watchdog}}
proc pdtk_check {x message} { --- 382,386 ---- }
! proc pdtk_watchdog {} {pd pd ping; after 2000 {pdtk_watchdog}}
proc pdtk_check {x message} { *************** *** 420,424 **** proc menu_new {} { global untitled_number untitled_directory offset_canvas _ ! pd "pd filename Untitled-$untitled_number $untitled_directory ;" pd { #N canvas; --- 419,423 ---- proc menu_new {} { global untitled_number untitled_directory offset_canvas _ ! pd pd filename Untitled-$untitled_number $untitled_directory pd { #N canvas; *************** *** 442,446 **** set basename [string range $filename [expr [string last / $filename] + 1] end] if {[string last .pd $filename] >= 0} { ! pd "pd open [enquote $basename] [enquote $directory] ;" } } --- 441,445 ---- set basename [string range $filename [expr [string last / $filename] + 1] end] if {[string last .pd $filename] >= 0} { ! pd pd open [enquote $basename] [enquote $directory] } } *************** *** 452,456 **** .sendpanel.entry select adjust end bind .sendpanel.entry <KeyPress-Return> { ! pd "$send_textvariable ;" after 50 {destroy .sendpanel} } --- 451,455 ---- .sendpanel.entry select adjust end bind .sendpanel.entry <KeyPress-Return> { ! pd $send_textvariable after 50 {destroy .sendpanel} } *************** *** 458,465 **** }
! proc menu_really_quit {} {pd "pd quit ;"} proc menu_quit {} {pdtk_check "Do you really wish to quit?" "pd quit ;"} proc menu_pop_pd {} {raise .} ! proc menu_audio {flag} {pd "pd dsp $flag ;"}
proc menu_close {name} { --- 457,464 ---- }
! proc menu_really_quit {} {pd pd quit} proc menu_quit {} {pdtk_check "Do you really wish to quit?" "pd quit ;"} proc menu_pop_pd {} {raise .} ! proc menu_audio {flag} {pd pd dsp $flag}
proc menu_close {name} { *************** *** 468,472 **** } #destroy $name ! pd "$name menuclose 0 ;" fixwindowmenu } --- 467,471 ---- } #destroy $name ! pd $name menuclose 0 fixwindowmenu } *************** *** 503,507 **** {".pdrc Editor" {pdrc_editor_new} ""} {"Message" {menu_send} "Ctrl+m"} ! {"Path..." {pd "pd start-path-dialog ;"} ""} {} {"Quit" {menu_quit} "Ctrl+q"} --- 502,506 ---- {".pdrc Editor" {pdrc_editor_new} ""} {"Message" {menu_send} "Ctrl+m"} ! {"Path..." {pd pd start-path-dialog} ""} {} {"Quit" {menu_quit} "Ctrl+q"} *************** *** 545,557 **** proc pd {args} { global sock ! puts $sock [join $args " "] flush $sock ! puts "<- [join $args " "]" }
#-----------------------------------------------------------------------------------# ! def canvas close {} {pd "$name menuclose 0 ;"} ! def canvas save {} {$self checkgeometry; pd "$name menusave ;"} ! def canvas saveas {} {$self checkgeometry; pd "$name menusaveas ;"} def canvas print {} { set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \ --- 544,557 ---- proc pd {args} { global sock ! set s [join $args " "] ! puts $sock "$s;" flush $sock ! puts "<- $s;" }
#-----------------------------------------------------------------------------------# ! def canvas close {} {pd $name menuclose 0} ! def canvas save {} {$self checkgeometry; pd $name menusave} ! def canvas saveas {} {$self checkgeometry; pd $name menusaveas} def canvas print {} { set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \ *************** *** 565,569 **** {} {Message {menu_send} "Ctrl+m"} ! {Path... {pd "pd start-path-dialog"} {}} {} {Close {menu_close} "Ctrl+w"} --- 565,569 ---- {} {Message {menu_send} "Ctrl+m"} ! {Path... {pd pd start-path-dialog} {}} {} {Close {menu_close} "Ctrl+w"} *************** *** 579,591 **** {Redo {menu_redo} "Ctrl+Z"} {} ! {Cut {pd "%W cut"} "Ctrl+x"} ! {Copy {pd "%W copy"} "Ctrl+c"} ! {Paste {pd "%W paste"} "Ctrl+v"} ! {Duplicate {pd "%W duplicate"} "Ctrl+d"} ! {"Select all" {pd "%W selectall"} "Ctrl+a"} {} ! {"Text Editor" {pd "%W texteditor"} "Ctrl+t"} ! {Font {pd "%W menufont"} {}} ! {"Tidy Up" {pd "%W tidy"} {}} {} } --- 579,591 ---- {Redo {menu_redo} "Ctrl+Z"} {} ! {Cut {pd %W cut} "Ctrl+x"} ! {Copy {pd %W copy} "Ctrl+c"} ! {Paste {pd %W paste} "Ctrl+v"} ! {Duplicate {pd %W duplicate} "Ctrl+d"} ! {"Select all" {pd %W selectall} "Ctrl+a"} {} ! {"Text Editor" {pd %W texteditor} "Ctrl+t"} ! {Font {pd %W menufont} {}} ! {"Tidy Up" {pd %W tidy} {}} {} } *************** *** 593,614 **** set canvasmenu(put) { {Object {obj_create $focus(canvas) ctrl} "Ctrl+1"} ! {Message {pd "%W msg 0 ;"} "Ctrl+2"} ! {Number {pd "%W floatatom 0 ;"} "Ctrl+3"} ! {Symbol {pd "%W symbolatom 0 ;"} "Ctrl+4"} ! {Comment {pd "%W text 0 ;"} "Ctrl+5"} {} {Bang {bang_new} "Alt+b"} ! {Toggle {pd "%W toggle 0 ;"} "Alt+t"} ! {Number2 {pd "%W numbox 0 ;"} "Alt+n"} ! {Vslider {pd "%W vslider 0 ;"} "Alt+v"} ! {Hslider {pd "%W hslider 0 ;"} "Alt+h"} ! {Vradio {pd "%W vradio 0 ;"} "Alt+d"} ! {Hradio {pd "%W hradio 0 ;"} "Alt+i"} ! {VU {pd "%W vumeter 0 ;"} "Alt+u"} ! {dropper {pd "%W dropper 0 ;"} "Alt+x"} ! {Canvas {pd "%W mycnv 0 ;"} "Alt+c"} {} ! {Graph {pd "%W graph ;"} {}} ! {Array {pd "%W menuarray ;"} {}} }
--- 593,614 ---- set canvasmenu(put) { {Object {obj_create $focus(canvas) ctrl} "Ctrl+1"} ! {Message {pd %W msg 0} "Ctrl+2"} ! {Number {pd %W floatatom 0} "Ctrl+3"} ! {Symbol {pd %W symbolatom 0} "Ctrl+4"} ! {Comment {pd %W text 0} "Ctrl+5"} {} {Bang {bang_new} "Alt+b"} ! {Toggle {pd %W toggle 0} "Alt+t"} ! {Number2 {pd %W numbox 0} "Alt+n"} ! {Vslider {pd %W vslider 0} "Alt+v"} ! {Hslider {pd %W hslider 0} "Alt+h"} ! {Vradio {pd %W vradio 0} "Alt+d"} ! {Hradio {pd %W hradio 0} "Alt+i"} ! {VU {pd %W vumeter 0} "Alt+u"} ! {dropper {pd %W dropper 0} "Alt+x"} ! {Canvas {pd %W mycnv 0} "Alt+c"} {} ! {Graph {pd %W graph} {}} ! {Array {pd %W menuarray} {}} }
*************** *** 628,633 ****
lappend canvasmenu(media) {} \ ! {"Test Audio and MIDI" {pd "menu_doc_open doc/7.stuff/tools testtone.pd"} ""} \ ! {"Load Meter" {pd "menu_doc_open doc/7.stuff/tools load-meter.pd"} ""}
proc menu_addstd {mbar} { --- 628,633 ----
lappend canvasmenu(media) {} \ ! {"Test Audio and MIDI" {pd menu_doc_open doc/7.stuff/tools testtone.pd} ""} \ ! {"Load Meter" {pd menu_doc_open doc/7.stuff/tools load-meter.pd} ""}
proc menu_addstd {mbar} { *************** *** 639,643 **** $mbar.media add radiobutton -label [lindex $a 0] \ -command {menu_audio 0} -variable pd_whichapi -value [lindex $a 1] \ ! -command {pd "pd audio-setapi $pd_whichapi ;"} incr x } --- 639,643 ---- $mbar.media add radiobutton -label [lindex $a 0] \ -command {menu_audio 0} -variable pd_whichapi -value [lindex $a 1] \ ! -command {pd pd audio-setapi $pd_whichapi} incr x } *************** *** 646,659 **** $mbar.media add radiobutton -label [lindex $a 0] \ -command {menu_midi 0} -variable pd_whichmidiapi -value [lindex $a 1] \ ! -command {pd "pd midi-setapi $pd_whichmidiapi ;"} incr x } populate_menu $mbar.help {} { ! {"About Pd" {pd "menu_about"} ""} ! {"Pure Documentation..." {pd "menu_documentation"} ""} } }
! proc menu_audio {flag} {pd "pd dsp $flag ;"}
#-----------------------------------------------------------------------------------# --- 646,659 ---- $mbar.media add radiobutton -label [lindex $a 0] \ -command {menu_midi 0} -variable pd_whichmidiapi -value [lindex $a 1] \ ! -command {pd pd midi-setapi $pd_whichmidiapi} incr x } populate_menu $mbar.help {} { ! {"About Pd" {pd menu_about} ""} ! {"Pure Documentation..." {pd menu_documentation} ""} } }
! proc menu_audio {flag} {pd pd dsp $flag}
#-----------------------------------------------------------------------------------# *************** *** 734,738 **** $self canvas= $self #not sure if init should be calling pd, but it fixes the editmode bug for now -chun ! pd "$name editmode 0 ;" }
--- 734,738 ---- $self canvas= $self #not sure if init should be calling pd, but it fixes the editmode bug for now -chun ! pd $name editmode 0 }
*************** *** 821,825 **** $name.m add cascade -label View -menu $m.view populate_menu $m.view $name { ! {Redraw {pd "%W map 0 ; %W map 1 ;"} {}} } # {Crosshair {global crosshair; set crosshair [expr !!$crosshair]} "" toggle} --- 821,825 ---- $name.m add cascade -label View -menu $m.view populate_menu $m.view $name { ! {Redraw {pd "%W map 0 ; %W map 1"} {}} } # {Crosshair {global crosshair; set crosshair [expr !!$crosshair]} "" toggle} *************** *** 852,856 **** global _ puts "name: $name" ! pd "$name editmode 0 ;"
} --- 852,856 ---- global _ puts "name: $name" ! pd $name editmode 0
} *************** *** 865,869 **** }
! pd "$name editmode $@editmode ;"
} --- 865,869 ---- }
! pd $name editmode $@editmode
} *************** *** 1079,1083 ****
set t .x$canvas.c.${self}text ! $t configure -width [expr [string length $@text]] } { item $self $canvas TEXT text [l+ {2 2} [list $x1 $y1]] \ --- 1079,1083 ----
set t .x$canvas.c.${self}text ! $t configure -width [expr [string length $@text]+1] } { item $self $canvas TEXT text [l+ {2 2} [list $x1 $y1]] \ *************** *** 1099,1105 **** .x$canvas.c delete ${self}TEXT set @oldtext $@text - $self update_size set t .x$canvas.c.${self}text ! text $t -height 1 -width [string length $@text] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font(size)] --- 1099,1106 ---- .x$canvas.c delete ${self}TEXT set @oldtext $@text set t .x$canvas.c.${self}text ! $self update_size ! $self changed ! text $t -height 1 -width [expr [string length $@text]+1] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font(size)] *************** *** 1121,1125 ****
def* textbox after_key {canvas widget} { ! set @text [$widget get 1.0 end] post "@text is '%s'" $@text $self update_size --- 1122,1126 ----
def* textbox after_key {canvas widget} { ! set @text [$widget get 1.0 1.end] post "@text is '%s'" $@text $self update_size *************** *** 1162,1168 **** def* textbox update_size {} { global font ! #added +1 below that fixs the initial box size on my side - chun ! set @xs [expr $font(padx)+$font(width)*([expr [string length $@text]+1]-$@valid)] ! set @ys [expr $font(pady)+$font(height)] }
--- 1163,1170 ---- def* textbox update_size {} { global font ! ##added +1 below that fixs the initial box size on my side - chun ! #set @xs [expr $font(padx)+$font(width)*([string length $@text]+1-$@valid)] ! set @xs [expr $font(padx)+$font(width)*([string length $@text] +$@edit)] ! set @ys [expr $font(pady)+$font(height)] }
*************** *** 1177,1181 **** set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} ! pd ".x$canvas text_setto !$self $l ;" eval "focus $c" } --- 1179,1183 ---- set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} ! pd .x$canvas text_setto !$self $l eval "focus $c" } *************** *** 1485,1489 **** if {[llength $@selection]==1 && $already} {set @select_by "click"} if {($f&1) && !$already} { ! pd "$self select-object x$id ;" } elseif {!$already} { # may need to call canvas_select_object here to work out --- 1487,1491 ---- if {[llength $@selection]==1 && $already} {set @select_by "click"} if {($f&1) && !$already} { ! pd $self select-object x$id } elseif {!$already} { # may need to call canvas_select_object here to work out *************** *** 1604,1608 **** set _($wire_id) $d wire_update $wire_id $d ! #pd "$self add-wire x$@wire_from x$wire_to ;" #puts "::::connect from $@wire_from to $wire_to" #::::connect from 81168af 2 to 81168ae 0 --- 1606,1610 ---- set _($wire_id) $d wire_update $wire_id $d ! #pd $self add-wire x$@wire_from x$wire_to #puts "::::connect from $@wire_from to $wire_to" #::::connect from 81168af 2 to 81168ae 0 *************** *** 1681,1685 ****
if {[llength $@selection]==1} { ! #pd "$self gobj-activate x$@selection;" if {$@select_by == "click"} { switch $_($@selection:class) { --- 1683,1687 ----
if {[llength $@selection]==1} { ! #pd $self gobj-activate x$@selection if {$@select_by == "click"} { switch $_($@selection:class) { *************** *** 2163,2167 **** numbox_draw $self $canvas set @mouse [list $x $y] ! if {$@clicking} {pd "x$self float $@val ;"} }
--- 2165,2169 ---- numbox_draw $self $canvas set @mouse [list $x $y] ! if {$@clicking} {pd x$self float $@val} }
*************** *** 2175,2179 **** if {$@oval!=$@val} { canvas_unfocus $canvas ! pd "x$self float $@val ;" } } --- 2177,2181 ---- if {$@oval!=$@val} { canvas_unfocus $canvas ! pd x$self float $@val } } *************** *** 2190,2194 **** catch {set @val [expr $@buf]} canvas_unfocus $canvas ! pd "x$self float $@val ;" } elseif {$key==8 || $key==127} { # Backspace --- 2192,2196 ---- catch {set @val [expr $@buf]} canvas_unfocus $canvas ! pd x$self float $@val } elseif {$key==8 || $key==127} { # Backspace *************** *** 2275,2279 **** set orient [radio_orient $self] set i [expr ($orient?$y:$x)/$@w] ! pd "x$self fout $i ;" }
--- 2277,2281 ---- set orient [radio_orient $self] set i [expr ($orient?$y:$x)/$@w] ! pd x$self fout $i }
*************** *** 2358,2362 **** if {[lindex $@first 1] != $y} { canvas_unfocus $canvas ! pd "x$self float $@value ;" } } --- 2360,2364 ---- if {[lindex $@first 1] != $y} { canvas_unfocus $canvas ! pd x$self float $@value } } *************** *** 2372,2376 **** set d [expr ($orient?-$dy:$dx)*$span/($l+0.0)] set @value [expr $@ovalue+$d*$@rate] ! pd "x$self float $@value ;" }
--- 2374,2378 ---- set d [expr ($orient?-$dy:$dx)*$span/($l+0.0)] set @value [expr $@ovalue+$d*$@rate] ! pd x$self float $@value }
*************** *** 2418,2422 ****
def bang click {canvas x y b f} { ! pd "x$self click $x $y 0 0 0 ;" }
--- 2420,2424 ----
def bang click {canvas x y b f} { ! pd x$self click $x $y 0 0 0 }
*************** *** 2463,2467 ****
def toggle click {canvas x y b f} { ! pd "x$self bang ;" }
--- 2465,2469 ----
def toggle click {canvas x y b f} { ! pd x$self bang }
*************** *** 2717,2721 ****
proc tcl_eval {self l} {post %s "tcl: $l"; post %s "returns: [eval $l]"} ! proc pd_eval {self l} {post %s "pd: $l"; pd "$l;\n"} proc gdb_eval {self l} {post %s "gdb: $l"; global gdb; puts $gdb "$l"}
--- 2719,2723 ----
proc tcl_eval {self l} {post %s "tcl: $l"; post %s "returns: [eval $l]"} ! proc pd_eval {self l} {post %s "pd: $l"; pd $l} proc gdb_eval {self l} {post %s "gdb: $l"; global gdb; puts $gdb "$l"}
*************** *** 2729,2733 ****
set butt { ! {object {obj 0}} {message {msg 0}} {number {floatatom 0}} --- 2731,2735 ----
set butt { ! {object {pd %W obj 0 ;}} {message {msg 0}} {number {floatatom 0}} *************** *** 2745,2749 **** {canvas {mycnv 0}} {graph {graph}} ! {array {menuarray}} }
--- 2747,2751 ---- {canvas {mycnv 0}} {graph {graph}} ! {array {pd %W menuarray 0}} }
*************** *** 2788,2792 **** } else { button "$self.[lindex $b 0]" -image "icon_[lindex $b 0]" -border 1 \ ! -command [list pd "$doc [lindex $b 1] ;"] pack $self.[lindex $b 0] -side left } --- 2790,2794 ---- } else { button "$self.[lindex $b 0]" -image "icon_[lindex $b 0]" -border 1 \ ! -command [list pd $doc [lindex $b 1]] pack $self.[lindex $b 0] -side left } *************** *** 2804,2808 **** set focus(createdby) $flag #puts " ||| $doc :: $_($doc:createdby)" ! pd "$doc obj 0 ;" }
--- 2806,2810 ---- set focus(createdby) $flag #puts " ||| $doc :: $_($doc:createdby)" ! pd $doc obj 0 }
*************** *** 2848,2852 ****
proc class_browser_new {name} { ! pd "pd update-path ; pd update-class-list class_list_callback ;" }
--- 2850,2854 ----
proc class_browser_new {name} { ! pd "pd update-path ; pd update-class-list class_list_callback" }
*************** *** 2890,2894 ****
frame $f.5 ! button $f.5.help -text "Help" -command {pd "pd help [$f.1 get [$f.1 curselection]] ;"} pack $f.5.help -side top pack $f.5 -side left -fill y -expand no --- 2892,2896 ----
frame $f.5 ! button $f.5.help -text "Help" -command {pd pd help [$f.1 get [$f.1 curselection]]} pack $f.5.help -side top pack $f.5 -side left -fill y -expand no *************** *** 2909,2913 **** set i [$f.1 curselection] set class [$f.1 get $i] ! pd "pd update-class-info $class ;" } } --- 2911,2915 ---- set i [$f.1 curselection] set class [$f.1 get $i] ! pd pd update-class-info $class } } *************** *** 2935,2939 **** global class_list completion_closure set completion_closure [list $self $canvas $x $y $text] ! pd "pd update-class-list propose_completions2 ;" if {![info exists class_list]} { post_to_gui "loading class list..." --- 2937,2941 ---- global class_list completion_closure set completion_closure [list $self $canvas $x $y $text] ! pd pd update-class-list propose_completions2 if {![info exists class_list]} { post_to_gui "loading class list..."