[PD-cvs] pd/src desire.tk,1.1.2.422,1.1.2.423

Mathieu Bouchard matju at users.sourceforge.net
Tue Aug 29 23:03:59 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
yet another .ddrc format


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.422
retrieving revision 1.1.2.423
diff -C2 -d -r1.1.2.422 -r1.1.2.423
*** desire.tk	29 Aug 2006 19:25:15 -0000	1.1.2.422
--- desire.tk	29 Aug 2006 21:03:57 -0000	1.1.2.423
***************
*** 494,498 ****
  }
  #-----------------------------------------------------------------------------------#
! set look(extrapix) [switch $OS {
          osx     {concat 2}
          default {concat 1}}]
--- 494,498 ----
  }
  #-----------------------------------------------------------------------------------#
! set look(Box:extrapix) [switch $OS {
          osx     {concat 2}
          default {concat 1}}]
***************
*** 1041,1044 ****
--- 1041,1056 ----
  	set contents [read $fd]
  	close $fd
+ 	foreach {category category_data} $contents {
+ 		foreach {class class_data} $category_data {
+ 			foreach {var val} $class_data {set ${category}($class:$var) $val}
+ 		}
+ 	}
+ 	set_fontstring
+ }
+ proc read_ddrc_old {} {
+ 	global cmdline look key
+ 	set fd [open $cmdline(ddrcfilename) "RDONLY CREAT"]
+ 	set contents [read $fd]
+ 	close $fd
  
  	foreach category_pair $contents {
***************
*** 5696,5701 ****
  def ClientPrefsDialog read {} {read_ddrc}
  
- #this writes the ddrc
  def ClientPrefsDialog write {} {
  	global ddrc_options cmdline look accels key
  	$self get_val
--- 5708,5740 ----
  def ClientPrefsDialog read {} {read_ddrc}
  
  def ClientPrefsDialog write {} {
+ 	global cmdline look key
+ 	$self get_val
+ 	set fd [open $cmdline(ddrcfilename) w]
+ 	foreach category {look key} {
+ 		set class_list {}
+ 		puts $fd "$category \{"
+ 		foreach name [array names $category] {
+ 			mset {class var} [split $name ":"]
+ 			lappend class_list $class
+ 		}
+ 		set class_list [luniq [lsort $class_list]]
+ 		foreach class $class_list {
+ 			puts $fd "  $class \{"
+ 			foreach name [array names $category -glob $class:*] {
+ 				mset {class var} [split $name ":"]
+ 				# the eval here annoys me a bit because of possible special chars -- matju
+ 				puts $fd "    $var [eval list \$${category}($class:$var)]"
+ 			}
+ 			puts $fd "  \}"
+ 		}
+ 		puts $fd "\}"
+ 	}
+ 	close $fd
+ 	set_fontstring
+ }
+ 
+ #this writes the ddrc
+ def ClientPrefsDialog write_old {} {
  	global ddrc_options cmdline look accels key
  	$self get_val





More information about the Pd-cvs mailing list