Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8673
Modified Files: Tag: devel_0_39 desire.tk Log Message: properties_dialog: choice type uses -choices to get symbols of possible choices.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.366 retrieving revision 1.1.2.367 diff -C2 -d -r1.1.2.366 -r1.1.2.367 *** desire.tk 18 Aug 2006 04:36:04 -0000 1.1.2.366 --- desire.tk 18 Aug 2006 04:52:13 -0000 1.1.2.367 *************** *** 3253,3260 **** min {list "" float {-width 9}} max {list "" float {-width 9}} ! is_log {list [list linear logarithmic] choice {}} ! isa {list [list no yes] choice {}} n {list "" integer {-width 4}} ! steady {list [list steady_no steady_yes] choice {}} snd {list "" entry {-width 20}} rcv {list "" entry {-width 20}} --- 3253,3260 ---- min {list "" float {-width 9}} max {list "" float {-width 9}} ! is_log {list "" choice {-choices {linear logarithmic}}} ! isa {list "" choice {-choices {no yes}}} n {list "" integer {-width 4}} ! steady {list "" choice {-choices {steady_no steady_yes}}} snd {list "" entry {-width 20}} rcv {list "" entry {-width 20}} *************** *** 3262,3266 **** ldx {list "" integer {-width 5}} ldy {list "" integer {-width 5}} ! fstyle {list [list Courier Helvetica Times] choice {}} fs {list "" fontsize {-width 5}} bcol {list "" color {}} --- 3262,3266 ---- ldx {list "" integer {-width 5}} ldy {list "" integer {-width 5}} ! fstyle {list "" choice {-choices {Courier Helvetica Times}}} fs {list "" fontsize {-width 5}} bcol {list "" color {}} *************** *** 3404,3409 **** wm title $id "[say array] [say popup_properties]" set props { ! name "name: " entry {} ! n "size: " entry {} } properties_dialog $self .$self $props --- 3404,3409 ---- wm title $id "[say array] [say popup_properties]" set props { ! name "" entry {} ! n "" entry {} } properties_dialog $self .$self $props *************** *** 4689,4694 **** --- 4689,4700 ---- # excuse me, 2nd argument mod 4 isn't for labeling anymore foreach {name choices type options} $struct { + if {$choices != ""} {error "choke: choices=$choices"} set f $w.$name set label "[say $name]: " + set k [lsearch $options -choices] + if {$k>=0} { + set choices [lindex $options [expr $k+1]] + set options [lreplace $options $k [expr $k+1]] + } switch -- $type { side { *************** *** 5270,5274 **** switch $type { section {$self add_section [incr section] [say $name]} ! choice {properties_dialog $self $f.main.$section [list $name [lrange $names 1 end] choice {}]} default {properties_dialog $self $f.main.$section [list $name "" $type {}]} } --- 5276,5281 ---- switch $type { section {$self add_section [incr section] [say $name]} ! choice {properties_dialog $self $f.main.$section \ ! [list $name "" choice [list -choices [lrange $names 1 end]]]} default {properties_dialog $self $f.main.$section [list $name "" $type {}]} } *************** *** 5467,5483 **** } alias {} ! radio {properties_dialog $self $which_section [list [lindex $name 0] "" choice {}]} color { set var ${name}path #this stores the path to the widget on the gui editor. ! set @$var $which_section.$name.color set @$name $look($name) properties_dialog $self $which_section [list [lindex $name 0] "" color {}] } key { ! foreach item $name { ! set var ${item}path ! set @$item $key($item) ! set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item] } properties_dialog $self $which_section [list $name "" $type {}] --- 5474,5490 ---- } alias {} ! choice {properties_dialog $self $which_section [list [lindex $name 0] "" choice {}]} color { set var ${name}path #this stores the path to the widget on the gui editor. ! set @$var $which_section.$name.color set @$name $look($name) properties_dialog $self $which_section [list [lindex $name 0] "" color {}] } key { ! foreach item $name { ! set var ${item}path ! set @$item $key($item) ! set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item] } properties_dialog $self $which_section [list $name "" $type {}] *************** *** 5486,5490 **** set var ${name}path #this stores the path to the widget on the gui editor. ! set @$var $which_section.$name.color set @$name $crosshair($name) properties_dialog $self $which_section [list [lindex $name 0] "" toggle {}] --- 5493,5497 ---- set var ${name}path #this stores the path to the widget on the gui editor. ! set @$var $which_section.$name.color set @$name $crosshair($name) properties_dialog $self $which_section [list [lindex $name 0] "" toggle {}]