[PD-cvs] pd/src desire.tk,1.1.2.367,1.1.2.368

Mathieu Bouchard matju at users.sourceforge.net
Fri Aug 18 06:59:58 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11483

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
changed the arguments to properties_dialog


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.367
retrieving revision 1.1.2.368
diff -C2 -d -r1.1.2.367 -r1.1.2.368
*** desire.tk	18 Aug 2006 04:52:13 -0000	1.1.2.367
--- desire.tk	18 Aug 2006 04:59:56 -0000	1.1.2.368
***************
*** 3247,3273 ****
  	foreach prop [lrange $fields($class) 5 end] {
  	    set d [concat $prop [switch $prop {
! 		w      {list "" integer {-width 7}}
! 		h      {list "" integer {-width 7}}
! 		hold   {list "" float {-width 9}}
! 		break  {list "" float {-width 9}}
! 		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}}
! 		lab    {list "" entry {-width 20}}
! 		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 {}}
! 		fcol   {list "" color {}}
! 		lcol   {list "" color {}}
  		val    {continue}
  		on     {continue}
! 		change {list "" integer {}}
  		default {error "huh? ($prop)"}
  	    }]]
--- 3247,3273 ----
  	foreach prop [lrange $fields($class) 5 end] {
  	    set d [concat $prop [switch $prop {
! 		w      {list integer -width 7}
! 		h      {list integer -width 7}
! 		hold   {list float   -width 9}
! 		break  {list float   -width 9}
! 		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}
! 		lab    {list entry   -width 20}
! 		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}
! 		fcol   {list color}
! 		lcol   {list color}
  		val    {continue}
  		on     {continue}
! 		change {list integer}
  		default {error "huh? ($prop)"}
  	    }]]
***************
*** 3343,3355 ****
      wm title .$self "Atom"
      global properties
!     properties_dialog $self .$self {
! 	width "" entry {-width 4}
! 	lo    "" entry {-width 8}
! 	hi    "" entry {-width 8}
! 	label "" entry {-width 20}
! 	wherelabel "" side {}
! 	symto      "" entry {-width 20}
! 	symfrom    "" entry {-width 20}
!     }
      foreach name {hi lo width} {
  	bind .$self.$name.entry <KeyPress-Return> "$self ok"
--- 3343,3354 ----
      wm title .$self "Atom"
      global properties
!     properties_dialog $self .$self \
! 	{width entry -width 4} \
! 	{lo    entry -width 8} \
! 	{hi    entry -width 8} \
! 	{label entry -width 20} \
! 	{wherelabel side} \
! 	{symto      entry -width 20} \
! 	{symfrom    entry -width 20}
      foreach name {hi lo width} {
  	bind .$self.$name.entry <KeyPress-Return> "$self ok"
***************
*** 3375,3384 ****
      global properties
      properties_dialog $self .$self {
! 	x1    "" entry {-width 7}
! 	x2    "" entry {-width 7}
! 	xpix  "" entry {-width 7}
! 	y2    "" entry {-width 7}
! 	y1    "" entry {-width 7}
! 	ypix  "" entry {-width 7}
      }
      #.$self.xrangef.x2 select from 0
--- 3374,3383 ----
      global properties
      properties_dialog $self .$self {
! 	{x1   entry -width 7} \
! 	{x2   entry -width 7} \
! 	{xpix entry -width 7} \
! 	{y2   entry -width 7} \
! 	{y1   entry -width 7} \
! 	{ypix entry -width 7}
      }
      #.$self.xrangef.x2 select from 0
***************
*** 3403,3412 ****
      set @otherflag 0
      wm title $id "[say array] [say popup_properties]"
!     set props {
! 	name "" entry {}
! 	n    "" entry {}
!     }
!     properties_dialog $self .$self $props
! 
      pack [checkbutton .$self.saveme -text "save contents" -variable @saveit -anchor w] -side top
  
--- 3402,3406 ----
      set @otherflag 0
      wm title $id "[say array] [say popup_properties]"
!     properties_dialog $self .$self {name entry} {n entry}
      pack [checkbutton .$self.saveme -text "save contents" -variable @saveit -anchor w] -side top
  
***************
*** 4684,4693 ****
  }
  
! proc properties_dialog {self w struct} {
      global _ key
      set no_max_label 0
      # 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]: "
--- 4678,4689 ----
  }
  
! proc properties_dialog {self w args} {
      global _ key
      set no_max_label 0
      # excuse me, 2nd argument mod 4 isn't for labeling anymore
!     foreach row $args {
! 	set name [lindex $row 0]
! 	set type [lindex $row 1]
! 	set options [lrange $row 2 end]
  	set f $w.$name
  	set label "[say $name]: "
***************
*** 5277,5282 ****
  	    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 {}]}
  	  }
  	}
--- 5273,5278 ----
  	    section {$self add_section [incr section] [say $name]}
  	    choice  {properties_dialog $self $f.main.$section \
! 		[list $name choice -choices [lrange $names 1 end]]}
! 	    default {properties_dialog $self $f.main.$section [list $name $type]}
  	  }
  	}
***************
*** 5474,5478 ****
  	    }
  	    alias {}
! 	    choice {properties_dialog $self $which_section [list [lindex $name 0] "" choice {}]}
  	    color {
  		set var ${name}path
--- 5470,5474 ----
  	    }
  	    alias {}
! 	    choice {properties_dialog $self $which_section [list [lindex $name 0] choice]}
  	    color {
  		set var ${name}path
***************
*** 5480,5484 ****
  		set @$var $which_section.$name.color
  		set @$name $look($name)
! 		properties_dialog $self $which_section [list [lindex $name 0] "" color {}]
  	    }
  	    key {
--- 5476,5480 ----
  		set @$var $which_section.$name.color
  		set @$name $look($name)
! 		properties_dialog $self $which_section [list [lindex $name 0] color]
  	    }
  	    key {
***************
*** 5488,5492 ****
  		  set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item]
  		}
! 	    	properties_dialog $self $which_section [list $name "" $type {}]
  	    }
  	    crosshair {
--- 5484,5488 ----
  		  set @$var $which_section.[string tolower [lindex $name 0]].[string tolower $item]
  		}
! 	    	properties_dialog $self $which_section [list $name $type]
  	    }
  	    crosshair {
***************
*** 5495,5502 ****
  		set @$var $which_section.$name.color
  		set @$name $crosshair($name)
! 		properties_dialog $self $which_section [list [lindex $name 0] "" toggle {}]
  	    }
  	    default {
! 		properties_dialog $self $which_section [list $name "" $type {}]
  	    }
  	  }
--- 5491,5498 ----
  		set @$var $which_section.$name.color
  		set @$name $crosshair($name)
! 		properties_dialog $self $which_section [list [lindex $name 0] toggle]
  	    }
  	    default {
! 		properties_dialog $self $which_section [list $name $type]
  	    }
  	  }





More information about the Pd-cvs mailing list