[PD-cvs] pd/src desire.tk,1.1.2.498,1.1.2.499

Mathieu Bouchard matju at users.sourceforge.net
Fri Oct 13 22:59:36 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
added proc logvar and renamed @font to @family


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.498
retrieving revision 1.1.2.499
diff -C2 -d -r1.1.2.498 -r1.1.2.499
*** desire.tk	13 Oct 2006 16:06:22 -0000	1.1.2.498
--- desire.tk	13 Oct 2006 20:59:33 -0000	1.1.2.499
***************
*** 5592,5595 ****
--- 5592,5604 ----
  }
  
+ proc logvar {args} {
+ 	set r {}
+ 	foreach var $args {
+ 		regsub {^_\(.*:(.*)\)$} $var {@\1} var2
+ 		lappend r "$var2=[uplevel 1 list \$$var]"
+ 	}
+ 	puts [join $r "; "]
+ }
+ 
  def Dialog add_font {f args} {
       	global look
***************
*** 5598,5606 ****
      	bind all <KeyPress-F1> help
      	set @size   $look(View:fontsize)
! 	set @font   $look(View:fontfamily)
  	set @style  $look(View:fontstyle)
  	set @italic $look(View:fontitalic)
  	set @fstr   $look(View:fontstring)
! 	puts "font:: $@font | size::: $@size | style::: $@style | italic::: $@italic"
  	set bold 0
  	set italic 0
--- 5607,5615 ----
      	bind all <KeyPress-F1> help
      	set @size   $look(View:fontsize)
! 	set @family $look(View:fontfamily)
  	set @style  $look(View:fontstyle)
  	set @italic $look(View:fontitalic)
  	set @fstr   $look(View:fontstring)
! 	logvar @family @size @style @italic
  	set bold 0
  	set italic 0
***************
*** 5615,5619 ****
  	
  	set fontlist [$f.font.list.box get 0 end]
! 	set find [lsearch $fontlist $@font]
  	if {$find < 0} {set find 0}
  	$f.font.list.box selection set $find $find
--- 5624,5628 ----
  	
  	set fontlist [$f.font.list.box get 0 end]
! 	set find [lsearch $fontlist $@family]
  	if {$find < 0} {set find 0}
  	$f.font.list.box selection set $find $find
***************
*** 5663,5674 ****
  	set fstring ""
  	set list_pos [$f.font.list.box curselection]
! 	if {$list_pos != ""} {set @font [$f.font.list.box get [$f.font.list.box curselection]]}
  	if {$style == "bold"} {
! 		set fstring "*-$@font-bold"
  	} else {
! 		set fstring "*-$@font-medium"
  	}
  	if {$@italic} {
! 		if {$@font == "Helvetica" || $@font == "Courier"} {
  			set @str "$fstring-o-normal--$size-*"
  			set @str2 "$fstring-o-normal--%d-*"
--- 5672,5683 ----
  	set fstring ""
  	set list_pos [$f.font.list.box curselection]
! 	if {$list_pos != ""} {set @family [$f.font.list.box get [$f.font.list.box curselection]]}
  	if {$style == "bold"} {
! 		set fstring "*-$@family-bold"
  	} else {
! 		set fstring "*-$@family-medium"
  	}
  	if {$@italic} {
! 		if {$@family == "Helvetica" || $@family == "Courier"} {
  			set @str "$fstring-o-normal--$size-*"
  			set @str2 "$fstring-o-normal--%d-*"
***************
*** 5685,5689 ****
  def Dialog font_update {f} {
  	global font
! 	$self font_get_xlfd $f $@font $@style $@size
  	$f.font2.preview.canvas itemconfigure ${self}TEXT -font $@str
  }
--- 5694,5698 ----
  def Dialog font_update {f} {
  	global font
! 	$self font_get_xlfd $f $@family $@style $@size
  	$f.font2.preview.canvas itemconfigure ${self}TEXT -font $@str
  }
***************
*** 6262,6269 ****
  				set str [string tolower $class$name]
  				set str2 ${str}path
! 				$self font_get_xlfd $@$str2 $@font $@style $@size
  				#puts " fontstring::: $@str "
  				set look(View:fontsize) $@size
! 				set look(View:fontfamily) $@font
  				set look(View:fontstyle) $@style
  				set look(View:fontitalic) $@italic
--- 6271,6278 ----
  				set str [string tolower $class$name]
  				set str2 ${str}path
! 				$self font_get_xlfd $@$str2 $@family $@style $@size
  				#puts " fontstring::: $@str "
  				set look(View:fontsize) $@size
! 				set look(View:fontfamily) $@family
  				set look(View:fontstyle) $@style
  				set look(View:fontitalic) $@italic





More information about the Pd-cvs mailing list