[PD-cvs] pd/src desire.tk,1.1.2.582,1.1.2.583

chunlee chunlee at users.sourceforge.net
Wed Nov 22 03:52:40 CET 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
started working on applying run time changes


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.582
retrieving revision 1.1.2.583
diff -C2 -d -r1.1.2.582 -r1.1.2.583
*** desire.tk	21 Nov 2006 17:20:50 -0000	1.1.2.582
--- desire.tk	22 Nov 2006 02:52:37 -0000	1.1.2.583
***************
*** 589,595 ****
  
  proc pdtk_pd_startup {version apilist midiapilist fontname} {
!     set ::pd_myversion $version
!     set ::pd_apilist $apilist
!     set ::pd_midiapilist $midiapilist
  }
  
--- 589,598 ----
  
  proc pdtk_pd_startup {version apilist midiapilist fontname} {
! 	set ::pd_myversion $version
! 	set ::pd_apilist $apilist
! 	set ::pd_midiapilist $midiapilist
! 	foreach api $apilist {
! 		lappend ::pd_apilist2 "-[string tolower [lindex $api 0]]"
! 	}
  }
  
***************
*** 963,967 ****
  #-----------------------------------------------------------------------------------#
  set pd_apilist "{ALSA 1}"
! 
  proc pd {args} {
  	global sock
--- 966,970 ----
  #-----------------------------------------------------------------------------------#
  set pd_apilist "{ALSA 1}"
! set pd_apilist2 "default"
  proc pd {args} {
  	global sock
***************
*** 6062,6068 ****
  	foreach part $choices {
  		$f.menu add command -label [say $part] \
! 		    -command [list $self dropmenu_set $f $name $part $i]
  		incr i
  	}
  	if {[lsearch $choices $v] < 0} {set v [lindex $choices 0]}
  	label $f.butt -text [say $v] -relief raised -width 20
--- 6065,6072 ----
  	foreach part $choices {
  		$f.menu add command -label [say $part] \
! 		    -command [list $self dropmenu_set $f $name $part $i 1]
  		incr i
  	}
+ 	set trim_name [string trimleft $name "-"]
  	if {[lsearch $choices $v] < 0} {set v [lindex $choices 0]}
  	label $f.butt -text [say $v] -relief raised -width 20
***************
*** 6073,6077 ****
  }
  
! 
  def Dialog add_key {f name label} {
  	set text ""
--- 6077,6081 ----
  }
  
!  
  def Dialog add_key {f name label} {
  	set text ""
***************
*** 6193,6197 ****
  	global _
  	$self add_stuff $f $name $label
- 	#set v $_($self:$name) ;# bug in poetcl
  	menu $f.menu -tearoff 0
  	set i 0
--- 6197,6200 ----
***************
*** 6226,6230 ****
  
  def Dialog spinning {mode v} {
- 	puts "        mode:: $mode"
  	switch $mode {
  		up {incr $v; puts " incr $v"}
--- 6229,6232 ----
***************
*** 6595,6599 ****
  	void -nodac
  	void -noadc
! 	choice {audio_api_choice default -alsa -jack -mmio -portaudio -pa -asio -oss}
  	void -32bit
  	
--- 6597,6601 ----
  	void -nodac
  	void -noadc
! 	choice {audio_api_choice}
  	void -32bit
  	
***************
*** 6644,6652 ****
  
  def ServerPrefsDialog init_reverse_hash {} {
! 	global pdrc_options pdrc_options_h
  	foreach {type names} $pdrc_options {
  		set name [lindex $names 0]
  		set @$name ""
  		foreach alias $names {set pdrc_options_h($alias) [list $type $name]}
  	}
  }
--- 6646,6657 ----
  
  def ServerPrefsDialog init_reverse_hash {} {
! 	global pdrc_options pdrc_options_h pd_apilist2
  	foreach {type names} $pdrc_options {
  		set name [lindex $names 0]
  		set @$name ""
  		foreach alias $names {set pdrc_options_h($alias) [list $type $name]}
+ 		if {$name == "audio_api_choice"} {
+ 			foreach alias [lrange $pd_apilist2 1 end] {set pdrc_options_h($alias) [list $type $name]}
+ 		}
  	}
  }
***************
*** 6665,6669 ****
  	mset [list @inchannels0 @inchannels1 @inchannels2 @inchannels3] $@inchannels
  	mset [list @outchannels0 @outchannels1 @outchannels2 @outchannels3] $@outchannels
! 	$self init_window
  }
  
--- 6670,6678 ----
  	mset [list @inchannels0 @inchannels1 @inchannels2 @inchannels3] $@inchannels
  	mset [list @outchannels0 @outchannels1 @outchannels2 @outchannels3] $@outchannels
! 	if {![winfo exists .$self.1.main.1]} {
! 		$self init_content
! 	} else {
! 		$self update_content
! 	}
  }
  
***************
*** 6674,6679 ****
  		libraries {incr i; lappend @$name [lindex $contents $i]}
  		files     {incr i; lappend @$name [lindex $contents $i]}
! 		choice2    {        set     @$name [lsearch $name [lindex $contents $i]];}
! 		choice    {        set     @$name [lindex $contents $i];}
  		void      {        set @$name 1}
  		default   {incr i; set @$name [lindex $contents $i]}
--- 6683,6687 ----
  		libraries {incr i; lappend @$name [lindex $contents $i]}
  		files     {incr i; lappend @$name [lindex $contents $i]}
! 		choice    {        set     @$name [lindex $contents $i]}
  		void      {        set @$name 1}
  		default   {incr i; set @$name [lindex $contents $i]}
***************
*** 6702,6710 ****
  			continue
  		}
- 		#{dual -soundindev -soundoutdev} -audiodev|-sounddev
- 		#{dual -inchannels -outchannels} -channels
- 		#{dual -nodac -noadc} -noaudio|-nosound
- 		#{dual -nomidiin -nomidiout} -nomidi
- 		#{dual -midindev -midioutdev} -mididev
  		mset {type name} $pdrc_options_h($op)
  		set name [lindex [split $name "|"] 0]
--- 6710,6713 ----
***************
*** 6738,6743 ****
  }
  
! def ServerPrefsDialog init_window {} {
! 	global pdrc_options
  	set f .$self.1
  	set section 0
--- 6741,6746 ----
  }
  
! def ServerPrefsDialog init_content {} {
! 	global pdrc_options pd_apilist2
  	set f .$self.1
  	set section 0
***************
*** 6752,6766 ****
  			}
  			choice  {
! 				$self add $f.main.$section \
! 				     [list $name choice -choices [lrange $names 1 end]]}
! 			devlist {
! 				$self add $f.main.$section [list $name devlist] 
! 			}
! 			spins {
! 				$self add $f.main.$section [list $name spins [lindex $names 1]] 
! 			}
! 			default {
! 				$self add $f.main.$section [list $name $type]
  			}
  		}
  	}
--- 6755,6768 ----
  			}
  			choice  {
! 				if {$name == "audio_api_choice"} {
! 					set ops $pd_apilist2
! 				} else {
! 					set ops [lrange $names 1 end]
! 				}
! 				$self add $f.main.$section [list $name choice -choices $ops]
  			}
+ 			devlist {$self add $f.main.$section [list $name devlist] }
+ 			spins {$self add $f.main.$section [list $name spins [lindex $names 1]] }
+ 			default {$self add $f.main.$section [list $name $type]}
  		}
  	}
***************
*** 6768,6771 ****
--- 6770,6777 ----
  }
  
+ def ServerPrefsDialog update_content {} {
+ 	puts " update........."
+ }
+ 
  def ServerPrefsDialog init {} {
  	pd pd audio-properties
***************
*** 6777,6780 ****
--- 6783,6797 ----
  }
  
+ def ServerPrefsDialog dropmenu_set {frame var part val say} {
+ 	global pd_apilist pd_apilist2
+ 	foreach api $pd_apilist {
+ 		if {[lsearch $api [string trimleft $part "-"]] >= 0} {
+ 			pd pd audio-setapi [lindex $api 1]
+ 			after 1 pd pd audio-properties 
+ 		}
+ 	}
+ 	super $frame $var $part $val $say
+ }
+ 
  
  #################### ClientPrefsDialog





More information about the Pd-cvs mailing list