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

Mathieu Bouchard matju at users.sourceforge.net
Fri Oct 13 23:27:40 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
renamed @style to @bold; localised font selector


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.499
retrieving revision 1.1.2.500
diff -C2 -d -r1.1.2.499 -r1.1.2.500
*** desire.tk	13 Oct 2006 20:59:33 -0000	1.1.2.499
--- desire.tk	13 Oct 2006 21:27:36 -0000	1.1.2.500
***************
*** 5377,5380 ****
--- 5377,5384 ----
  class_new Dialog {Thing}
  
+ def Dialog add_side {w args} {
+ 
+ }
+ 
  def Dialog add {w args} {
  	set no_max_label 0
***************
*** 5602,5620 ****
  
  def Dialog add_font {f args} {
!      	global look
!     	if {[winfo exists $f.font]} {return}
!     	set no_max_label 0
!     	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
! 	set previewtext "Sample text"
  	frame $f.font
! 	pack [label $f.font.label -text "Name:" -anchor w] -side top -fill x
  	frame $f.font.list
  	pack [listbox $f.font.list.box -relief sunken -yscrollcommand "$f.font.list.scroll set"] -side left
--- 5606,5622 ----
  
  def Dialog add_font {f args} {
! 	global look
! 	if {[winfo exists $f.font]} {return}
! 	set no_max_label 0
! 	bind all <KeyPress-F1> help
! 	set font $look(View:font)
! 	set @family [lindex $font 0]
! 	set @size   [lindex $font 1]
! 	set @bold   [expr [lsearch $font bold  ]>=0]
! 	set @italic [expr [lsearch $font italic]>=0]
  	set @fstr   $look(View:fontstring)
! 	logvar @family @size @bold @italic
  	frame $f.font
! 	pack [label $f.font.label -text [say font_family] -anchor w] -side top -fill x
  	frame $f.font.list
  	pack [listbox $f.font.list.box -relief sunken -yscrollcommand "$f.font.list.scroll set"] -side left
***************
*** 5640,5652 ****
  	
  	frame $f.font.style
! 	pack [label $f.font.style.label -text "Style:"] -side left -fill y
! 	pack [checkbutton $f.font.style.bold -text "Bold" -variable bold -command "$self font_style $f bold"] -side top
! 	pack [checkbutton $f.font.style.italic -text "Italic" -variable @italic -command "$self font_style $f italic"] -side top
  	
  	frame $f.font2
  	frame $f.font2.preview
! 	pack [label $f.font2.preview.label -text "Preview:"] -side left -fill y
  	pack [canvas $f.font2.preview.canvas -width 200 -height 50 -relief sunken -borderwidth 1]  -side left -fill x
! 	$f.font2.preview.canvas create text 10 25 -tags ${self}TEXT -anchor w -text "DesireData" -font $@fstr
  	
  	set parent [string range $f 1 [expr [string first "." $f 1]-1]]
--- 5642,5654 ----
  	
  	frame $f.font.style
! 	pack [label $f.font.style.label -text [say font_style]] -side left -fill y
! 	pack [checkbutton $f.font.style.bold -text [say font_bold] -variable bold -command "$self font_style $f bold"] -side top
! 	pack [checkbutton $f.font.style.italic -text [say font_italic] -variable @italic -command "$self font_style $f italic"] -side top
  	
  	frame $f.font2
  	frame $f.font2.preview
! 	pack [label $f.font2.preview.label -text [say font_preview]] -side left -fill y
  	pack [canvas $f.font2.preview.canvas -width 200 -height 50 -relief sunken -borderwidth 1]  -side left -fill x
! 	$f.font2.preview.canvas create text 10 25 -tags ${self}TEXT -anchor w -text [say font_preview_2] -font $@fstr
  	
  	set parent [string range $f 1 [expr [string first "." $f 1]-1]]
***************
*** 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
  }
--- 5696,5700 ----
  def Dialog font_update {f} {
  	global font
! 	$self font_get_xlfd $f $@family $@bold $@size
  	$f.font2.preview.canvas itemconfigure ${self}TEXT -font $@str
  }
***************
*** 5710,5717 ****
  }
  
! def Dialog font_style {f style} {
! 	if {$style != "italic"} {
! 		if {$style == $@style} { set @style "normal" } else { set @style $style} 
! 	}
  	$self font_update $f
  }
--- 5712,5717 ----
  }
  
! def Dialog font_style {f bold} {
! 	set @bold $bold
  	$self font_update $f
  }
***************
*** 6271,6279 ****
  				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
  				#set look($class:$name) $look($class:$name)
--- 6271,6279 ----
  				set str [string tolower $class$name]
  				set str2 ${str}path
! 				$self font_get_xlfd $@$str2 $@family $@bold $@size
  				#puts " fontstring::: $@str "
  				set look(View:fontsize) $@size
  				set look(View:fontfamily) $@family
! 				set look(View:fontstyle) $@bold
  				set look(View:fontitalic) $@italic
  				#set look($class:$name) $look($class:$name)
***************
*** 6380,6388 ****
  			}
  			font {
! 				puts "	adding font bomb"
! 				set str [string tolower $class$name]
! 				set str2 ${str}path
! 				set @$str2 $which_section
! 				$self add_font $which_section [list [lindex $str 0] toggle]
  			}
  			default {
--- 6380,6386 ----
  			}
  			font {
! 				set str "[string tolower $class$name]path"
! 				set @$str $which_section
! 				$self add_font $which_section
  			}
  			default {





More information about the Pd-cvs mailing list