summaryrefslogtreecommitdiffstats
path: root/library/fontchooser.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 15:41:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-04 15:41:59 (GMT)
commit42e3af0d0ae489a65f7f3ce98429a394c0926c32 (patch)
tree0149222f25fa8bd0c3a1cb50b3e71a5419cf6021 /library/fontchooser.tcl
parent3fa224a2450a99a43c66f5f85951bcadb65430c2 (diff)
parent2fd9fcf08d73f688888ef8784be0c5493b80d818 (diff)
downloadtk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.zip
tk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.tar.gz
tk-42e3af0d0ae489a65f7f3ce98429a394c0926c32.tar.bz2
merge trunktip_415
Diffstat (limited to 'library/fontchooser.tcl')
-rw-r--r--library/fontchooser.tcl7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl
index 179476c..8f91ade 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -29,6 +29,10 @@ namespace eval ::tk::fontchooser {
set S(-title) [::msgcat::mc "Font"]
set S(-command) ""
set S(-font) TkDefaultFont
+}
+
+proc ::tk::fontchooser::Setup {} {
+ variable S
# Canonical versions of font families, styles, etc. for easier searching
set S(fonts,lcase) {}
@@ -52,6 +56,7 @@ namespace eval ::tk::fontchooser {
configure ::tk::fontchooser::Configure
}
}
+::tk::fontchooser::Setup
proc ::tk::fontchooser::Show {} {
variable S
@@ -100,7 +105,7 @@ proc ::tk::fontchooser::Configure {args} {
"bad option \"$option\": must be\
-command, -font, -parent, -title or -visible"
}
-
+
set cache [dict create -parent $S(-parent) -title $S(-title) \
-font $S(-font) -command $S(-command)]
set r [tclParseConfigSpec [namespace which -variable S] $specs "" $args]