Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4890
Modified Files: Tag: devel_0_39 desire.tk Log Message: localising pdrc editor and adding some bugs
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.187 retrieving revision 1.1.2.188 diff -C2 -d -r1.1.2.187 -r1.1.2.188 *** desire.tk 23 Apr 2006 05:48:04 -0000 1.1.2.187 --- desire.tk 23 Apr 2006 09:49:41 -0000 1.1.2.188 *************** *** 3603,3662 **** }
- set pdrc_options { ! section audio "Audio DSP" ! integer -r "sample rate" ! devlist -soundindev|-audioindev "audio in devices" ! devlist -soundoutdev|-audiooutdev "audio out devices" ! alias -sounddev|-audiodev {list -soundindev %1 -soundoutdev %1} ! devlist -inchannels "audio input channels (by device, like "2" or "16,8")" ! devlist -outchannels "number of audio out channels (same)" ! alias -channels {list -inchannels %1 -outchannels %1} ! integer -audiobuf|-soundbuf "specify size of audio buffer in msec" ! integer -blocksize "specify audio I/O block size in sample frames" ! integer -sleepgrain "specify number of milliseconds to sleep when idle" ! void -nodac "suppress audio output" ! void -noadc "suppress audio input" ! alias -noaudio|-nosound {list -nodac -noadc} ! radio {"audio_popup" -alsa -jack -mmio -portaudio|-pa|-asio -oss} { ! "Sound API: " ! "default" ! "use ALSA audio API" ! "use JACK audio API" ! "use MMIO audio API (default for Windows)" ! "use ASIO audio driver (via Portaudio)" ! "use OSS audio API" ! } ! void -32bit "allow 32 bit OSS audio (for RME Hammerfall)"
! section midi "MIDI" ! void -nomidiin "suppress MIDI input" ! void -nomidiout "suppress MIDI output" ! alias -nomidi {list -nomidiin -nomidiout} ! devlist -midiindev "midi in device list; e.g., "1,3" for first and third" ! devlist -midioutdev "midi out device list, same format" ! alias -mididev {list -midindev %1 -midioutdev %1}
! section externals "Externals" ! folders -path "add to file search path" ! folders -helppath "add to help file search path" ! files -lib "load object library(s)"
! section gui "Gooey" ! void -nogui "suppress starting the GUI (caution)" ! string -guicmd "substitute another GUI program (e.g., rsh)" ! integer -console "console scrollback lines (0 = disable console)" ! folder -look "folder containing buttonbar icons" ! void -statusbar "enable statusbar" ! integer -font "specify default font size in points"
! section other "Other" ! files -open "open file(s) on startup" ! void -verbose "extra printout on startup and when searching for files" ! integer -d "debug level" ! void -noloadbang "disable the effect of [loadbang]" ! string -send "send a message at startup (after patches are loaded)" ! void -listdev "list audio and MIDI devices upon startup" ! void -rt|-realtime "use real-time priority (needs root privilege)" }
--- 3603,3657 ---- }
set pdrc_options { ! section section_audio ! integer -r ! devlist -audioindev|-soundindev ! devlist -audiooutdev|-soundoutdev ! devlist -inchannels ! devlist -outchannels ! integer -audiobuf|-soundbuf ! integer -blocksize ! integer -sleepgrain ! void -nodac ! void -noadc ! radio {audio_api_choice -alsa -jack -mmio -portaudio|-pa|-asio -oss} ! void -32bit
! section section_midi ! void -nomidiin ! void -nomidiout ! devlist -midiindev ! devlist -midioutdev
! section section_externals ! folders -path ! folders -helppath ! files -lib
! section section_gui ! void -nogui ! string -guicmd ! integer -console ! folder -look ! void -statusbar ! integer -font
! section section_other ! files -open ! void -verbose ! integer -d ! void -noloadbang ! string -send ! void -listdev ! void -realtime|-rt ! } ! ! # warning: still unimplemented ! set pdrc_trickier_aliases { ! -audiodev|-sounddev {-soundindev %1 -soundoutdev %1} ! -channels {-inchannels %1 -outchannels %1} ! -noaudio|-nosound {-nodac -noadc} ! -nomidi {-nomidiin -nomidiout} ! -mididev {-midindev %1 -midioutdev %1} }
*************** *** 3670,3677 **** set contents [split [string map {"\n" " "} [read $fd]] " "] close $fd ! foreach {type name desc} $pdrc_options { set @$name "" ! foreach subname [split $name |] { ! set pdrc_options_h($subname) [list $type $name $desc] } } --- 3665,3676 ---- set contents [split [string map {"\n" " "} [read $fd]] " "] close $fd ! foreach {type names} $pdrc_options { ! switch $type { ! radio {set name [lindex $names 0]} ! default {set name [lindex [split $names |] 0]} ! } set @$name "" ! foreach alias [split $names |] { ! set pdrc_options_h($alias) [list $type $name] } } *************** *** 3684,3688 **** error "unknown option: $op" } ! foreach {type name desc} $pdrc_options_h($op) {} switch $type { folders {incr i; lappend @$name [lindex $contents $i]} --- 3683,3687 ---- error "unknown option: $op" } ! mset {type name} $pdrc_options_h($op) switch $type { folders {incr i; lappend @$name [lindex $contents $i]} *************** *** 3698,3709 **** global pdrc_options pdrc_options_h cmdline set fd [open $cmdline(rcfilename) w] ! foreach {type name desc} $pdrc_options { set v $@$name - set op [lindex [split $name |] 0] switch $type { ! folders {foreach x $v {puts $fd "$op $x"}} ! files {foreach x $v {puts $fd "$op $x"}} ! void {if {[string length $v]} {if {$v} {puts $fd $op}}} ! default {if {[string length $v]} {puts $fd "$op $v"}} } } --- 3697,3712 ---- global pdrc_options pdrc_options_h cmdline set fd [open $cmdline(rcfilename) w] ! foreach {type names} $pdrc_options { ! switch $type { ! radio {set name [lindex $names 0]} ! default {set name [lindex [split $names |] 0]} ! } set v $@$name switch $type { ! folders {foreach x $v {puts $fd "$name $x"}} ! files {foreach x $v {puts $fd "$name $x"}} ! void {if {[string length $v]} {if {$v} {puts $fd $name}}} ! radio {if {$v} {set t [lindex $names $v]; puts [split $t |]}} ! default {if {[string length $v]} {puts $fd "$name $v"}} } } *************** *** 3717,3734 **** set f .$self.1 set section 0 ! foreach {type name desc} $pdrc_options { switch $type { void { set type toggle }} switch $type { ! section {$self add_section [incr section] $desc} ! alias {} radio { properties_dialog $self $f.main.$section ServerPrefsDialog_ok server \ ! [list [lindex $name 0] "$desc" choice {}] } default { #properties_dialog $self $f.main.$section ServerPrefsDialog_ok \ ! # [list $name "$name: $desc" $type {}] properties_dialog $self $f.main.$section ServerPrefsDialog_ok server \ ! [list $name $desc $type {}] } } --- 3720,3739 ---- set f .$self.1 set section 0 ! foreach {type names} $pdrc_options { ! set name [lindex [split $names |] 0] switch $type { void { set type toggle }} switch $type { ! section {$self add_section [incr section] [say $name]} radio { + set babble {} + foreach subname $name {lappend babble [say $subname]} properties_dialog $self $f.main.$section ServerPrefsDialog_ok server \ ! [list [lindex $name 0] $babble choice {}] } default { #properties_dialog $self $f.main.$section ServerPrefsDialog_ok \ ! # [list $name "$name: [say $name]" $type {}] properties_dialog $self $f.main.$section ServerPrefsDialog_ok server \ ! [list $name [say $name] $type {}] } }