[PD-cvs] pd/src desire.tk,1.1.2.501,1.1.2.502
Mathieu Bouchard
matju at users.sourceforge.net
Sat Oct 14 00:30:08 CEST 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26358
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
stop using xfld (part 1)
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.501
retrieving revision 1.1.2.502
diff -C2 -d -r1.1.2.501 -r1.1.2.502
*** desire.tk 13 Oct 2006 22:22:48 -0000 1.1.2.501
--- desire.tk 13 Oct 2006 22:30:05 -0000 1.1.2.502
***************
*** 918,942 ****
#-----------------------------------------------------------------------------------#
- proc set_fontstring {} {
- global look
- set fstring ""
- set name $look(View:fontfamily); set style $look(View:fontstyle)
- set italic $look(View:fontitalic); set size $look(View:fontsize)
- if {$style == "bold"} {
- set fstring "*-$name-bold"
- } else {
- set fstring "*-$name-medium"
- }
- if {$italic} {
- if {$name == "Helvetica" || $name == "Courier"} {set ital o} else {set ital i}
- } else {
- set ital r
- }
- set look(View:fontstring) "$fstring-$ital-normal--$size-*"
- set look(View:fontstring2) "$fstring-$ital-normal--%d-*"
- #set look(View:fontwidth) [font measure $look(View:fontstring) W]
- #set look(View:fontheight) [font metrics $look(View:fontstring) -linespace]
- }
- #-----------------------------------------------------------------------------------#
proc* read_ddrc {{filename ""}} {
global cmdline look key accels
--- 918,921 ----
***************
*** 962,966 ****
}
}
- set_fontstring
}
--- 941,944 ----
***************
*** 5654,5658 ****
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
--- 5632,5636 ----
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
***************
*** 5662,5667 ****
pack [scrollbar $f.font.list.scroll -relief sunken -command "$f.font.list.box yview"] -side right -fill y
bind $f.font.list.box <<ListboxSelect>> "$self font_update $f"
! foreach name [font families] { $f.font.list.box insert end $name}
!
set fontlist [$f.font.list.box get 0 end]
set find [lsearch $fontlist $@family]
--- 5640,5645 ----
pack [scrollbar $f.font.list.scroll -relief sunken -command "$f.font.list.box yview"] -side right -fill y
bind $f.font.list.box <<ListboxSelect>> "$self font_update $f"
! foreach name [lsort [font families]] {$f.font.list.box insert end $name}
!
set fontlist [$f.font.list.box get 0 end]
set find [lsearch $fontlist $@family]
***************
*** 5682,5687 ****
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
--- 5660,5665 ----
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_update $f"] -side top
! pack [checkbutton $f.font.style.italic -text [say font_italic] -variable @italic -command "$self font_update $f"] -side top
frame $f.font2
***************
*** 5689,5693 ****
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]]
--- 5667,5671 ----
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 $look(View:font)
set parent [string range $f 1 [expr [string first "." $f 1]-1]]
***************
*** 5710,5739 ****
}
! def Dialog font_get_xlfd {f name style size} {
! 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-*"
! } else {
! set @str "$fstring-i-normal--$size-*"
! set @str2 "$fstring-i-normal--%d-*"
! }
! } else {
! set @str "$fstring-r-normal--$size-*"
! set @str2 "$fstring-r-normal--%d-*"
! }
! }
!
def Dialog font_update {f} {
global font
! $self font_get_xlfd $f $@family $@bold $@size
$f.font2.preview.canvas itemconfigure ${self}TEXT -font $@str
}
--- 5688,5700 ----
}
! tracedef Dialog font_update
def Dialog font_update {f} {
global font
! set lb $f.font.list.box
! set @family [$lb get [$lb curselection]]
! set @str [list $@family $@size]
! if {$@bold } {lappend @str bold }
! if {$@italic} {lappend @str italic}
! logvar @str
$f.font2.preview.canvas itemconfigure ${self}TEXT -font $@str
}
***************
*** 6227,6234 ****
key Canvas about
section Client font
! font View fontsize
! font View fontfamily
! font View fontstyle
! font View fontitalic
section Client others
toggle Canvas hairstate
--- 6188,6192 ----
key Canvas about
section Client font
! font View font
section Client others
toggle Canvas hairstate
***************
*** 6267,6271 ****
}
close $fd
- set_fontstring
}
--- 6225,6228 ----
***************
*** 6308,6321 ****
}
font {
! 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)
! #puts " $class:$name ::: $look($class:$name)"
}
}
--- 6265,6269 ----
}
font {
! set look(View:font) $@str
}
}
More information about the Pd-cvs
mailing list