Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13972
Modified Files: Tag: devel_0_39 desire.tk Log Message: .pdrc can now be read into the pdrc editor... next: wirte .pdrc from the editor
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.283 retrieving revision 1.1.2.284 diff -C2 -d -r1.1.2.283 -r1.1.2.284 *** desire.tk 31 Jul 2006 15:56:18 -0000 1.1.2.283 --- desire.tk 4 Aug 2006 14:09:46 -0000 1.1.2.284 *************** *** 1041,1046 **** proc menu_audio {flag} {pd pd dsp $flag}
! set pd_prefix [file dirname [file dirname [exec which pd]]] ! set pd_guidir ${pd_prefix}/lib/pd set doc_number 1
--- 1041,1047 ---- proc menu_audio {flag} {pd pd dsp $flag}
! #set pd_prefix [file dirname [file dirname [exec which pd]]] ! #set pd_guidir ${pd_prefix}/lib/pd ! set pd_guidir "" set doc_number 1
*************** *** 2320,2323 **** --- 2321,2325 ----
def* Canvas obj_jump {} { + if {[llength $@children] != 0} { $self deselect_all set obj_sel [lindex $@children $@jump] *************** *** 2327,2330 **** --- 2329,2333 ---- incr @jump if {$@jump >= [llength $@children]} {set @jump 0} + } }
*************** *** 4599,4611 **** frame $f set i 0 ! label $f.label -text [lindex $label 0] #pack [label $f.label -text [lindex $label 0]] $f -side left # this which is not good, need to sort it out... set m [menu $f.$name -tearoff 0] ! foreach part [lrange $label 1 end] { $m add command -label [say $part] -command [list $self dropmenu_set $f $name $part] } label $f.label_set -text [say $_($self:$name)] -relief raised -width 20 balloon $f.label_set "click to change setting" pack $f.label $f.label_set -side left --- 4602,4616 ---- frame $f set i 0 ! label $f.label -text [say [lindex [split $label |] 0]] #pack [label $f.label -text [lindex $label 0]] $f -side left # this which is not good, need to sort it out... set m [menu $f.$name -tearoff 0] ! set label [string range $label [expr [string first "|" $label 0]+1] end] ! foreach part [split $label |] { $m add command -label [say $part] -command [list $self dropmenu_set $f $name $part] } label $f.label_set -text [say $_($self:$name)] -relief raised -width 20 + #label $f.label_set -text poo -relief raised -width 20 balloon $f.label_set "click to change setting" pack $f.label $f.label_set -side left *************** *** 4652,4656 **** frame $f.a pack [label $f.label -text $label -width 20 -anchor e] -side left ! listbox $f.a.list -width 50 -height 5 -yscrollcommand "$f.a.yscroll set" \ -activestyle none -xscrollcommand "$f.a.xscroll set" foreach line $_($self:$name) {$f.a.list insert end $line} --- 4657,4661 ---- frame $f.a pack [label $f.label -text $label -width 20 -anchor e] -side left ! listbox $f.a.list -width 50 -height 8 -yscrollcommand "$f.a.yscroll set" \ -activestyle none -xscrollcommand "$f.a.xscroll set" foreach line $_($self:$name) {$f.a.list insert end $line} *************** *** 4680,4684 **** pack $f.b.6 -side top ! pack $f.b -side left } --- 4685,4731 ---- pack $f.b.6 -side top ! pack $f.b -side top ! } ! lists { ! set no_max_label 1 ! frame $f ! frame $f.a ! pack [label $f.label -text $label -width 20 -anchor e] -side left ! listbox $f.a.list -width 33 -height 10 -yscrollcommand "$f.a.yscroll set" \ ! -activestyle none -xscrollcommand "$f.a.xscroll set" ! foreach line $_($self:$name) {$f.a.list insert end $line} ! scrollbar $f.a.yscroll -command "$f.a.list yview" ! scrollbar $f.a.xscroll -command "$f.a.list xview" -orient horizontal ! ! pack $f.a.xscroll -side bottom -fill x ! pack $f.a.list -side left -fill both -expand 1 ! pack $f.a.yscroll -side left -fill y ! pack $f.a -side left ! ! frame $f.b -borderwidth 0 ! frame $f.b.entry -borderwidth 0 ! frame $f.b.butts -borderwidth 0 ! ! entry $f.b.entry.add -width 15 -borderwidth 5 -relief ridge ! pack $f.b.entry.add -side left ! button $f.b.entry.3 -command "$self entry_set2listbox $f.a.list $f.b.entry.add" -text "add" -width 6 ! balloon $f.b.entry.3 "click to select directory" ! pack $f.b.entry.3 -side left ! pack $f.b.entry -side top ! ! button $f.b.butts.5 -command "$self dir_up $f.a.list" -text "up" -width 4 ! balloon $f.b.butts.5 "click to select directory" ! pack $f.b.butts.5 -side left -padx 3 ! ! button $f.b.butts.6 -command "$self dir_down $f.a.list" -text "down" -width 4 ! balloon $f.b.butts.6 "click to select directory" ! pack $f.b.butts.6 -side left -padx 2 ! ! button $f.b.butts.4 -command "$self dir_remove $f.a.list" -text "remove" -width 6 ! balloon $f.b.butts.4 "click to select directory" ! pack $f.b.butts.4 -side left -padx 2 ! ! pack $f.b.butts -side top ! pack $f.b -side top } *************** *** 4892,4895 **** --- 4939,4950 ---- }
+ def PagedDialog entry_set2listbox {listbox entry} { + set var [$entry get] + puts $var + $listbox insert end $var + $listbox yview end + focus .$self + } + def PagedDialog dir_remove {listbox} { set sel [$listbox curselection] *************** *** 4965,4969 **** void -nodac void -noadc ! radio {audio_api_choice default -alsa -jack -mmio -portaudio|-pa|-asio -oss} void -32bit
--- 5020,5024 ---- void -nodac void -noadc ! radio {audio_api_choice|default|-alsa|-jack|-mmio|-portaudio|-pa|-asio|-oss} void -32bit
*************** *** 4975,4984 ****
section section_externals ! files -lib
section section_paths folders -path folders -helppath - folders -look
section section_gui --- 5030,5038 ----
section section_externals ! lists -lib
section section_paths folders -path folders -helppath
section section_gui *************** *** 5015,5023 **** global pdrc_options pdrc_options_h cmdline set fd [open $cmdline(rcfilename) "RDONLY CREAT"] ! 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]} } --- 5069,5078 ---- global pdrc_options pdrc_options_h cmdline set fd [open $cmdline(rcfilename) "RDONLY CREAT"] ! #set contents [split [string map {"\n" " "} [read $fd]] " "] ! set contents [split [read $fd] "\n"] close $fd foreach {type names} $pdrc_options { switch $type { ! radio {set name [lindex [split $names |] 0]} default {set name [lindex [split $names |] 0]} } *************** *** 5028,5034 **** } set i 0 ! while {$i < [llength $contents]} { ! set op [lindex $contents $i] ! if {[string length $op]==0} {break} if {![info exists pdrc_options_h($op)]} { error "unknown option: $op" --- 5083,5089 ---- } set i 0 ! ! foreach line $contents { ! foreach {op setting} $line { if {![info exists pdrc_options_h($op)]} { error "unknown option: $op" *************** *** 5036,5046 **** mset {type name} $pdrc_options_h($op) switch $type { ! folders {incr i; lappend @$name [lindex $contents $i]} files {incr i; lappend @$name [lindex $contents $i]} ! void {set @$name 1} ! default {incr i; set @$name [lindex $contents $i]} } ! incr i } }
--- 5091,5121 ---- mset {type name} $pdrc_options_h($op) switch $type { ! folders {lappend @$name [lindex $line 1]} ! lists {lappend @$name [lindex $line 1]} files {incr i; lappend @$name [lindex $contents $i]} ! radio {set @$name $line} ! #void {set @$name 1} ! default {set @$name [lindex $contents 1]} } ! } ! } + + #while {$i < [llength $contents]} { + # set op [lindex $contents $i] + # puts "op ::: $op" + # if {[string length $op]==0} {break} + # if {![info exists pdrc_options_h($op)]} { + # error "unknown option: $op" + # } + # mset {type name} $pdrc_options_h($op) + # switch $type { + # folders {incr i; lappend @$name [lindex $contents $i]} + # files {incr i; lappend @$name [lindex $contents $i]} + # void {set @$name 1} + # default {incr i; set @$name [lindex $contents $i]} + # } + # incr i + #} }
*************** *** 5076,5081 **** if {[llength $names] > 1} { set label [say [lindex $names 0]] } else { ! set label [say $names] } if {[string length $label] > $@max_label} {set @max_label [string length $label]} --- 5151,5158 ---- if {[llength $names] > 1} { set label [say [lindex $names 0]] + puts "label::::: $label" } else { ! set name [lindex [split $names |] 0] ! set label [say $name] } if {[string length $label] > $@max_label} {set @max_label [string length $label]} *************** *** 5093,5097 **** puts "babble :::: $babble" properties_dialog $self $f.main.$section ServerPrefsDialog_ok \ ! [list [lindex $name 0] $babble choice {}] } folders { --- 5170,5174 ---- puts "babble :::: $babble" properties_dialog $self $f.main.$section ServerPrefsDialog_ok \ ! [list $name $names choice {}] } folders { *************** *** 5099,5102 **** --- 5176,5183 ---- [list $name [say $name] $type {}] } + lists { + properties_dialog $self $f.main.$section ServerPrefsDialog_ok \ + [list $name [say $name] $type {}] + } default { properties_dialog $self $f.main.$section ServerPrefsDialog_ok \