[Tkabber-dev] r1380 - in trunk/tkabber: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Mar 3 00:36:16 MSK 2008


Author: sergei
Date: 2008-03-03 00:36:15 +0300 (Mon, 03 Mar 2008)
New Revision: 1380

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/idefault.tcl
   trunk/tkabber/ifacetk/iface.tcl
Log:
	* idefault.tcl, iface.tcl: Partially rolled back the change in font
	  options for Tcl/Tk on UNIX with disabled Xft. Removed use of named
	  fonts wherever possible. Also, ifacetk::options(font) variable can't
	  be used for roster and chats font setup. Use *Chat*Text.font
	  resource instead.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-03-02 20:49:49 UTC (rev 1379)
+++ trunk/tkabber/ChangeLog	2008-03-02 21:36:15 UTC (rev 1380)
@@ -14,6 +14,12 @@
 	  should either add option *font or use ifacetk::options(font)
 	  variable.
 
+	* idefault.tcl, iface.tcl: Partially rolled back the change in font
+	  options for Tcl/Tk on UNIX with disabled Xft. Removed use of named
+	  fonts wherever possible. Also, ifacetk::options(font) variable can't
+	  be used for roster and chats font setup. Use *Chat*Text.font
+	  resource instead.
+
 2008-02-21  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/ru.msg: Updated Russian translation.

Modified: trunk/tkabber/ifacetk/idefault.tcl
===================================================================
--- trunk/tkabber/ifacetk/idefault.tcl	2008-03-02 20:49:49 UTC (rev 1379)
+++ trunk/tkabber/ifacetk/idefault.tcl	2008-03-02 21:36:15 UTC (rev 1380)
@@ -1,13 +1,25 @@
 # $Id$
 
+if {$::tcl_platform(platform) == "unix" && \
+	([catch {tk::pkgconfig get fontsystem} fontsystem] || \
+	 ($fontsystem != "xft"))} {
+    set xlfd_fonts 1
+} else {
+    set xlfd_fonts 0
+}
+
 # Getting the default font in text widget
 set f [frame .tmpframe -class Chat]
 set t [text $f.tmptext]
-eval font create font [font actual [lindex [$t configure -font] 4]]
+set font [lindex [$t configure -font] 4]
+eval font create font [font actual $font]
 destroy $f
 
-set ::default_font [list [font actual font -family] \
-			 [font actual font -size]]
+if {!$xlfd_fonts} {
+    set ::default_font [list [font actual font -family] \
+			     [font actual font -size]]
+    set font font
+}
 
 eval font create boldFont [font configure font] \
           -weight bold

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2008-03-02 20:49:49 UTC (rev 1379)
+++ trunk/tkabber/ifacetk/iface.tcl	2008-03-02 21:36:15 UTC (rev 1380)
@@ -46,10 +46,12 @@
 	-group IFace -type boolean \
 	-command [namespace current]::switch_statusbar
 
-    custom::defvar options(font) $::default_font \
-	[::msgcat::mc "Font to use in roster, chat windows etc."] \
-	-group IFace -type font \
-	-command [namespace current]::switch_font
+    if {!$xlfd_fonts} {
+	custom::defvar options(font) $::default_font \
+	    [::msgcat::mc "Font to use in roster, chat windows etc."] \
+	    -group IFace -type font \
+	    -command [namespace current]::switch_font
+    }
 
     custom::defvar options(raise_new_tab) 1 \
 	[::msgcat::mc "Raise new tab."] \



More information about the Tkabber-dev mailing list