[Tkabber-dev] r1390 - in trunk/tkabber: . doc ifacetk plugins/chat plugins/richtext

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 7 16:28:42 MSK 2008


Author: sergei
Date: 2008-03-07 16:28:38 +0300 (Fri, 07 Mar 2008)
New Revision: 1390

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/README
   trunk/tkabber/doc/tkabber.html
   trunk/tkabber/doc/tkabber.xml
   trunk/tkabber/ifacetk/idefault.tcl
   trunk/tkabber/ifacetk/iface.tcl
   trunk/tkabber/ifacetk/iroster.tcl
   trunk/tkabber/plugins/chat/draw_xhtml_message.tcl
   trunk/tkabber/plugins/richtext/stylecodes.tcl
   trunk/tkabber/richtext.tcl
Log:
	* ifacetk/idefault.tcl, ifacetk/iface.tcl, ifacetk/iroster.tcl,
	  plugins/chat/draw_xhtml_message.tcl,
	  plugins/richtext/stylecodes.tcl, richtext.tcl: Added a different
	  for rosters (before that rosters and chats used the same font).

	* README, doc/tkabber.html, doc/tkabber.xml: Fixed section about using
	  fonts and added a few items into the list of new features in 0.10.1.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/ChangeLog	2008-03-07 13:28:38 UTC (rev 1390)
@@ -17,6 +17,14 @@
 	  export includes roster items, conferences and roster notes (thanks
 	  to Konstantin Khomoutov).
 
+	* ifacetk/idefault.tcl, ifacetk/iface.tcl, ifacetk/iroster.tcl,
+	  plugins/chat/draw_xhtml_message.tcl,
+	  plugins/richtext/stylecodes.tcl, richtext.tcl: Added a different
+	  for rosters (before that rosters and chats used the same font).
+
+	* README, doc/tkabber.html, doc/tkabber.xml: Fixed section about using
+	  fonts and added a few items into the list of new features in 0.10.1.
+
 2008-03-06  Sergei Golovan  <sgolovan at nes.ru>
 
 	* disco.tcl: Added new hook disco_node_reply_hook to allow answering

Modified: trunk/tkabber/README
===================================================================
--- trunk/tkabber/README	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/README	2008-03-07 13:28:38 UTC (rev 1390)
@@ -73,17 +73,17 @@
        5.1.6.  Splash window  . . . . . . . . . . . . . . . . . . . . 19
        5.1.7.  I18n/L10n  . . . . . . . . . . . . . . . . . . . . . . 19
        5.1.8.  Searching  . . . . . . . . . . . . . . . . . . . . . . 19
-     5.2.  Post-load  . . . . . . . . . . . . . . . . . . . . . . . . 19
+     5.2.  Post-load  . . . . . . . . . . . . . . . . . . . . . . . . 20
        5.2.1.  Look-and-Feel  . . . . . . . . . . . . . . . . . . . . 23
        5.2.2.  The Autoaway Module  . . . . . . . . . . . . . . . . . 24
-       5.2.3.  The Avatar Module  . . . . . . . . . . . . . . . . . . 24
+       5.2.3.  The Avatar Module  . . . . . . . . . . . . . . . . . . 25
        5.2.4.  The Chat Module  . . . . . . . . . . . . . . . . . . . 25
        5.2.5.  The Clientinfo Module  . . . . . . . . . . . . . . . . 25
        5.2.6.  The Conferenceinfo Module  . . . . . . . . . . . . . . 25
        5.2.7.  The Cryptographic Module . . . . . . . . . . . . . . . 26
        5.2.8.  The Emoticons Module . . . . . . . . . . . . . . . . . 26
        5.2.9.  The File Transfer Module . . . . . . . . . . . . . . . 26
-       5.2.10. The Groupchat Module . . . . . . . . . . . . . . . . . 26
+       5.2.10. The Groupchat Module . . . . . . . . . . . . . . . . . 27
        5.2.11. The Ispell Module  . . . . . . . . . . . . . . . . . . 27
        5.2.12. The Stream Initiation Module . . . . . . . . . . . . . 28
        5.2.13. The Logger Module  . . . . . . . . . . . . . . . . . . 28
@@ -121,7 +121,7 @@
      A.1.  Main changes in 0.10.1 . . . . . . . . . . . . . . . . . . 44
      A.2.  Main changes in 0.10.0 . . . . . . . . . . . . . . . . . . 44
      A.3.  Main changes in 0.9.9  . . . . . . . . . . . . . . . . . . 45
-     A.4.  Main changes in 0.9.8  . . . . . . . . . . . . . . . . . . 45
+     A.4.  Main changes in 0.9.8  . . . . . . . . . . . . . . . . . . 46
      A.5.  Main changes in 0.9.7beta  . . . . . . . . . . . . . . . . 46
      A.6.  Main changes in 0.9.6beta  . . . . . . . . . . . . . . . . 46
      A.7.  Main changes in 0.9.5beta  . . . . . . . . . . . . . . . . 47
@@ -799,7 +799,6 @@
 
    set load_default_xrdb 1
 
-   set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
    option add *font \
           "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
           userDefault
@@ -836,6 +835,7 @@
 
 
 
+
 Shchepin, et al.                                               [Page 15]
 
                              Tkabber v0.10.1                January 2007
@@ -924,35 +924,41 @@
    You can also customize the fonts _Tkabber_ uses to render its user
    interface:
 
-       set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
        option add *font \
               "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
               userDefault
 
-   The first setting ("set font") defines the font used to render chat
-   conversations, while the second one (operating on the Tk option
-   database) selects the font used for UI elements like buttons and
-   labels.  Obviously, you should choose fonts that suit your taste.
+   The above setting (operating on the Tk option database) selects the
+   font used for all UI elements like buttons and labels and roster and
+   conversation windows.  Obviously, you should choose fonts that suit
+   your taste.
 
+   If you want to specify another font for roster labels use the
+   following option:
+
+       option add *Roster*font \
+              "-misc-fixed-medium-r-normal-*-12-*-*-*-*-*-iso10646-1" \
+              userDefault
+
    When picking fonts, observe these rules:
 
    o  Under X, encoding (charset) of fonts must match that of your
       locale.
 
-   o  Ensure that the specified font exists, since if it's not, _Tk_
-      will try hard to pick the most suitable one which often yields not
-      what you want.  (The best bet is to first pick the font using some
-      tool like "xfontsel".)
 
-   Note that when specifying settings using the _Tkabber_'s
 
 
-
 Shchepin, et al.                                               [Page 17]
 
                              Tkabber v0.10.1                January 2007
 
 
+   o  Ensure that the specified font exists, since if it's not, _Tk_
+      will try hard to pick the most suitable one which often yields not
+      what you want.  (The best bet is to first pick the font using some
+      tool like "xfontsel".)
+
+   Note that when specifying settings using the _Tkabber_'s
    configuration files (i.e. not using _XRDB_ directly) you are not
    forced to use "X-style" (XLFD) font descriptions and may instead
    specify fonts using sometimes more convenient _Tk_ features described
@@ -989,26 +995,31 @@
    However, only information about those modules listed in a variable
    called "debug_lvls" will be printed.
 
-   If you know how to program Tcl, then this will seem rather obvious:
 
-   set debug_lvls [list message presence ssj warning]
 
-   # if you want a different behavior,
-   #     define your own...
 
-   proc debugmsg {module msg} {
-   #    ...
-   }
 
 
 
 
 
+
 Shchepin, et al.                                               [Page 18]
 
                              Tkabber v0.10.1                January 2007
 
 
+   If you know how to program Tcl, then this will seem rather obvious:
+
+   set debug_lvls [list message presence ssj warning]
+
+   # if you want a different behavior,
+   #     define your own...
+
+   proc debugmsg {module msg} {
+   #    ...
+   }
+
    Most users won't care about "debugmsg" because they're running
    _Tkabber_ under an application launcher so the standard output is
    never seen.  However, if this isn't the case for you, and you just
@@ -1045,6 +1056,15 @@
 
    These settings are described in detail here (Section 7.1).
 
+
+
+
+
+Shchepin, et al.                                               [Page 19]
+
+                             Tkabber v0.10.1                January 2007
+
+
 5.2.  Post-load
 
    After _Tkabber_ reads your configuration file, it loads all of its
@@ -1058,13 +1078,6 @@
    proc postload {} {
    # look-and-feel
 
-
-
-Shchepin, et al.                                               [Page 19]
-
-                             Tkabber v0.10.1                January 2007
-
-
        set pixmaps::options(pixmaps_theme) Default
 
        global alert colors alert_lvls
@@ -1101,6 +1114,13 @@
 
    # the clientinfo module
 
+
+
+Shchepin, et al.                                               [Page 20]
+
+                             Tkabber v0.10.1                January 2007
+
+
        set plugins::clientinfo::options(autoask) 0
 
 
@@ -1113,14 +1133,6 @@
 
    # the cryptographic module
 
-
-
-
-Shchepin, et al.                                               [Page 20]
-
-                             Tkabber v0.10.1                January 2007
-
-
        set ssj::options(encrypt,fred at example.com) 1
 
 
@@ -1159,6 +1171,12 @@
        set si::transport(allowed,http://jabber.org/protocol/ibb) 1
 
 
+
+Shchepin, et al.                                               [Page 21]
+
+                             Tkabber v0.10.1                January 2007
+
+
    # the logger module
 
        set logger::options(logdir)        [file join $::configdir logs]
@@ -1170,13 +1188,6 @@
 
        global loginconf loginconf1 loginconf2 autologin
 
-
-
-Shchepin, et al.                                               [Page 21]
-
-                             Tkabber v0.10.1                January 2007
-
-
        set loginconf(user)           ""
        set loginconf(password)       ""
        set loginconf(server)         example.com
@@ -1216,6 +1227,12 @@
        set message::options(headlines,multiple) 1
 
 
+
+Shchepin, et al.                                               [Page 22]
+
+                             Tkabber v0.10.1                January 2007
+
+
    # the raw xml input module
 
        set plugins::rawxml::set options(pretty_print) 0
@@ -1225,14 +1242,6 @@
    # the roster module
 
        set roster::show_only_online            1
-
-
-
-Shchepin, et al.                                               [Page 22]
-
-                             Tkabber v0.10.1                January 2007
-
-
        set roster::roster(collapsed,RSS)       1
        set roster::roster(collapsed,Undefined) 1
 
@@ -1272,6 +1281,14 @@
 
    If you want, you can have _Tkabber_ use a different theme by putting
    custom theme subdirectory to "$::configdir/pixmaps/" directory (tilde
+
+
+
+Shchepin, et al.                                               [Page 23]
+
+                             Tkabber v0.10.1                January 2007
+
+
    means home directory). _Tkabber_ knows that it is a theme directory
    by looking for "icondef.xml" file in the directory.  To find out the
    structure of icon definition file, look through _XEP-0038_ and go to
@@ -1281,14 +1298,6 @@
    If you're using the tabbed window interface, _Tkabber_ needs a way of
    telling you that something has changed in a window that's not on top.
    This is where the an array called _alert_lvls_ and a list called
-
-
-
-Shchepin, et al.                                               [Page 23]
-
-                             Tkabber v0.10.1                January 2007
-
-
    _alert_colors_ come in.  The array maps an incoming message to a
    priority number from zero to three.  The list, which is indexed
    starting at _zero_, indicates what color the tab should use to let
@@ -1328,6 +1337,14 @@
    Variable "plugins::autoaway::options(status)" allows to specify text
    status, which is set when _Tkabber_ is moving in away state.
 
+
+
+
+Shchepin, et al.                                               [Page 24]
+
+                             Tkabber v0.10.1                January 2007
+
+
 5.2.3.  The Avatar Module
 
    There are two variables that you can set to control whether _Tkabber_
@@ -1336,15 +1353,6 @@
    o  "avatar::options(announce)" determines whether your presence
       information indicates that you have an avatar; and,
 
-
-
-
-
-Shchepin, et al.                                               [Page 24]
-
-                             Tkabber v0.10.1                January 2007
-
-
    o  "avatar::options(share)" determines whether requests for your
       avatar will be honored.
 
@@ -1383,6 +1391,16 @@
    add this line to your post-load:
    set plugins::conferenceinfo::options(autoask) 1
 
+
+
+
+
+
+Shchepin, et al.                                               [Page 25]
+
+                             Tkabber v0.10.1                January 2007
+
+
    You can also set interval between these requests with these two
    variables:
 
@@ -1394,13 +1412,6 @@
    indicates that the server hosting the conference doesn't support
    browsing, so it makes sense not to try that often.
 
-
-
-Shchepin, et al.                                               [Page 25]
-
-                             Tkabber v0.10.1                January 2007
-
-
 5.2.7.  The Cryptographic Module
 
    Earlier (Section 5.1) we saw an example where the "ssj::options"
@@ -1438,6 +1449,14 @@
 
        set ft::options(download_dir) "/tmp"
 
+
+
+
+Shchepin, et al.                                               [Page 26]
+
+                             Tkabber v0.10.1                January 2007
+
+
 5.2.10.  The Groupchat Module
 
    There are several variables that set the dialog window defaults for
@@ -1446,17 +1465,6 @@
    add to roster dialog window: "gra_group" and "gra_server" specify the
       default room and conference server, repectively; and,
 
-
-
-
-
-
-
-Shchepin, et al.                                               [Page 26]
-
-                             Tkabber v0.10.1                January 2007
-
-
    join dialog window: "gr_nick", "gr_group" and "gr_server" specify the
       default nickname, room, and conference server, respectively.
 
@@ -1498,21 +1506,18 @@
    o  the encoding of the output by setting
       "plugins::ispell::options(dictionary_encoding)".
 
-   If you don't care about putting a large load on your process, then
-   you can also set "plugins::ispell::options(check_every_symbol)" to 1
-   to check correctness of current word after every entered symbol.
-   (Usually you don't need to set this option.)
 
 
-
-
-
-
 Shchepin, et al.                                               [Page 27]
 
                              Tkabber v0.10.1                January 2007
 
 
+   If you don't care about putting a large load on your process, then
+   you can also set "plugins::ispell::options(check_every_symbol)" to 1
+   to check correctness of current word after every entered symbol.
+   (Usually you don't need to set this option.)
+
 5.2.12.  The Stream Initiation Module
 
    Stream initiation profile is defined in _XEP-0095_ with two
@@ -1557,18 +1562,16 @@
    Element "loginconf(server)" must be set to _Jabber_ server name (the
    part of you _JID_ after "@".
 
-   Element "loginconf(stream_options)" is set to one of the following
-   values:
 
 
-
-
-
 Shchepin, et al.                                               [Page 28]
 
                              Tkabber v0.10.1                January 2007
 
 
+   Element "loginconf(stream_options)" is set to one of the following
+   values:
+
    o  plaintext -- use plaintext connection;
 
    o  encrypted -- use encrypted (via STARTTLS mechanism) connection
@@ -1617,9 +1620,6 @@
 
 
 
-
-
-
 Shchepin, et al.                                               [Page 29]
 
                              Tkabber v0.10.1                January 2007
@@ -2420,14 +2420,22 @@
 
    o  Added support for SOCKS4a and SOCKS5 proxy for the main connection
 
+   o  Added user location support (XEP-0080)
+
    o  Added user mood support (XEP-0107)
 
    o  Added user activity support (XEP-0108)
 
    o  Added user tune support (XEP-0118)
 
-   o  Added entity capabilities (only reporting) support
+   o  Added entity capabilities (XEP-0115 v.1.5, only reporting) support
 
+   o  Roster is now exported to XML instead of Tcl list
+
+   o  Added support for entity time (XEP-0202)
+
+   o  Tkabber version is now reported in disco#info (XEP-0232)
+
    o  Moved deprecated Jabber Browser (XEP-0011) to an external plugin
 
    o  Moved Jidlink file transfer to an external plugin
@@ -2449,21 +2457,21 @@
    o  Translatable outgoing error messages support (based on recipient's
       xml:lang)
 
-   o  Remote controlling clients support (XEP-0146)
 
-   o  Extended stanza addressing support (XEP-0033)
 
-   o  New chats history tool with search over the all chatlog files
 
-   o  Roster item icons are chosen based on Disco queries to item server
+Shchepin, et al.                                               [Page 44]
+
+                             Tkabber v0.10.1                January 2007
 
 
+   o  Remote controlling clients support (XEP-0146)
 
+   o  Extended stanza addressing support (XEP-0033)
 
-Shchepin, et al.                                               [Page 44]
-
-                             Tkabber v0.10.1                January 2007
+   o  New chats history tool with search over the all chatlog files
 
+   o  Roster item icons are chosen based on Disco queries to item server
 
    o  Search in Disco, Browser, Headlines, RawXML, and Customize windows
 
@@ -2505,21 +2513,21 @@
 
    o  Chat state notification support (XEP-0085)
 
-   o  Many fixes and enhancements
 
-A.4.  Main changes in 0.9.8
 
-   o  Support for STARTTLS
 
-   o  Reorganized menu
+Shchepin, et al.                                               [Page 45]
+
+                             Tkabber v0.10.1                January 2007
 
 
+   o  Many fixes and enhancements
 
+A.4.  Main changes in 0.9.8
 
-Shchepin, et al.                                               [Page 45]
-
-                             Tkabber v0.10.1                January 2007
+   o  Support for STARTTLS
 
+   o  Reorganized menu
 
    o  Support for searching in chat window
 
@@ -2560,22 +2568,22 @@
 
    o  Animated emoticons support
 
-   o  Many user interface improvements
 
-   o  More XMPP support
 
-   o  More translations
 
-   o  Bugfixes
 
+Shchepin, et al.                                               [Page 46]
+
+                             Tkabber v0.10.1                January 2007
 
 
+   o  Many user interface improvements
 
+   o  More XMPP support
 
-Shchepin, et al.                                               [Page 46]
-
-                             Tkabber v0.10.1                January 2007
+   o  More translations
 
+   o  Bugfixes
 
 A.7.  Main changes in 0.9.5beta
 
@@ -2620,14 +2628,6 @@
 
 
 
-
-
-
-
-
-
-
-
 Shchepin, et al.                                               [Page 47]
 
                              Tkabber v0.10.1                January 2007

Modified: trunk/tkabber/doc/tkabber.html
===================================================================
--- trunk/tkabber/doc/tkabber.html	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/doc/tkabber.html	2008-03-07 13:28:38 UTC (rev 1390)
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en"><head><title>Tkabber v0.10.1</title>
-<meta http-equiv="Expires" content="Thu, 31 Jan 2008 19:42:15 +0000">
+<meta http-equiv="Expires" content="Fri, 07 Mar 2008 13:24:51 +0000">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <meta name="description" content="Tkabber v0.10.1">
 <meta name="generator" content="xml2rfc v1.30 (http://xml.resource.org/)">
@@ -800,7 +800,6 @@
 
 set load_default_xrdb 1
 
-set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
 option add *font \
        "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
        userDefault
@@ -928,20 +927,29 @@
 render its user interface:
 
 </p><pre>
-    set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
     option add *font \
 	   "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
 	   userDefault
 </pre>
 <p>
 
-<p>The first setting (<span class="verb">set font</span>) defines
-the font used to render chat conversations, while the second one
-(operating on the Tk option database) selects the font used for UI
-elements like buttons and labels.
+<p>The above setting
+(operating on the Tk option database) selects the font used for all UI
+elements like buttons and labels and roster and conversation windows.
 Obviously, you should choose fonts that suit your taste.
 </p>
 
+
+<p>If you want to specify another font for roster labels use the
+following option:
+
+</p><pre>
+    option add *Roster*font \
+	   "-misc-fixed-medium-r-normal-*-12-*-*-*-*-*-iso10646-1" \
+	   userDefault
+</pre>
+<p>
+
 <p>When picking fonts, observe these rules:
 </p>
 
@@ -2442,14 +2450,22 @@
 </li>
 <li>Added support for SOCKS4a and SOCKS5 proxy for the main connection
 </li>
+<li>Added user location support (XEP-0080)
+</li>
 <li>Added user mood support (XEP-0107)
 </li>
 <li>Added user activity support (XEP-0108)
 </li>
 <li>Added user tune support (XEP-0118)
 </li>
-<li>Added entity capabilities (only reporting) support
+<li>Added entity capabilities (XEP-0115 v.1.5, only reporting) support
 </li>
+<li>Roster is now exported to XML instead of Tcl list
+</li>
+<li>Added support for entity time (XEP-0202)
+</li>
+<li>Tkabber version is now reported in disco#info (XEP-0232)
+</li>
 <li>Moved deprecated Jabber Browser (XEP-0011) to an external plugin
 </li>
 <li>Moved Jidlink file transfer to an external plugin

Modified: trunk/tkabber/doc/tkabber.xml
===================================================================
--- trunk/tkabber/doc/tkabber.xml	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/doc/tkabber.xml	2008-03-07 13:28:38 UTC (rev 1390)
@@ -509,7 +509,6 @@
 
 set load_default_xrdb 1
 
-set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
 option add *font \
        "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
        userDefault
@@ -643,17 +642,27 @@
 render its user interface:
 </preamble>
 <artwork><![CDATA[
-    set font "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1"
     option add *font \
 	   "-monotype-arial-medium-r-normal-*-13-*-*-*-*-*-iso10646-1" \
 	   userDefault
 ]]></artwork>
 <postamble>
-<t>The first setting (<spanx style='verb'>set font</spanx>) defines
-the font used to render chat conversations, while the second one
-(operating on the Tk option database) selects the font used for UI
-elements like buttons and labels.
+<t>The above setting
+(operating on the Tk option database) selects the font used for all UI
+elements like buttons and labels and roster and conversation windows.
 Obviously, you should choose fonts that suit your taste.</t>
+</postamble>
+</figure>
+<figure>
+<preamble>If you want to specify another font for roster labels use the
+following option:
+</preamble>
+<artwork><![CDATA[
+    option add *Roster*font \
+	   "-misc-fixed-medium-r-normal-*-12-*-*-*-*-*-iso10646-1" \
+	   userDefault
+]]></artwork>
+<postamble>
 <t>When picking fonts, observe these rules:</t>
 <list style='symbols'>
 	<t>Under X, encoding (charset) of fonts must match that of your locale.</t>
@@ -2127,10 +2136,14 @@
 	    <t>New tabbed user interface. Tab headers now occupy several rows</t>
 	    <t>Added support for pixmaps JISP archives (XEP-0038), but not for emoticons</t>
 	    <t>Added support for SOCKS4a and SOCKS5 proxy for the main connection</t>
+	    <t>Added user location support (XEP-0080)</t>
 	    <t>Added user mood support (XEP-0107)</t>
 	    <t>Added user activity support (XEP-0108)</t>
 	    <t>Added user tune support (XEP-0118)</t>
-	    <t>Added entity capabilities (only reporting) support</t>
+	    <t>Added entity capabilities (XEP-0115 v.1.5, only reporting) support</t>
+	    <t>Roster is now exported to XML instead of Tcl list</t>
+	    <t>Added support for entity time (XEP-0202)</t>
+	    <t>Tkabber version is now reported in disco#info (XEP-0232)</t>
 	    <t>Moved deprecated Jabber Browser (XEP-0011) to an external plugin</t>
 	    <t>Moved Jidlink file transfer to an external plugin</t>
 	    <t>Added several new plugins: attline, ctcomp, custom-urls, floatinglog, gmail, openurl, presencecmd</t>

Modified: trunk/tkabber/ifacetk/idefault.tcl
===================================================================
--- trunk/tkabber/ifacetk/idefault.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/ifacetk/idefault.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -3,41 +3,63 @@
 if {$::tcl_platform(platform) == "unix" && \
 	([catch {tk::pkgconfig get fontsystem} fontsystem] || \
 	 ($fontsystem != "xft"))} {
-    set xlfd_fonts 1
+    set XLFDFonts 1
 } else {
-    set xlfd_fonts 0
+    set XLFDFonts 0
 }
 
-# Getting the default font in text widget
-set f [frame .tmpframe -class Chat]
-set t [text $f.tmptext]
-set font [lindex [$t configure -font] 4]
-eval font create font [font actual $font]
-destroy $f
+proc create_default_fonts {class} {
+    global XLFDFonts
+    global ${class}Font ${class}BoldFont ${class}ItalicFont \
+	   ${class}BoldItalicFont
 
-if {!$xlfd_fonts} {
-    set ::default_font [list [font actual font -family] \
-			     [font actual font -size]]
-    set font font
+    # Getting the default font in text widget
+    set f [frame .tmpframe -class $class]
+    set t [text $f.tmptext]
+    set ${class}Font [lindex [$t configure -font] 4]
+    eval font create ${class}Font [font actual [set ${class}Font]]
+    set ${class}BoldFont [option get .tmpframe boldFont $class]
+    set ${class}ItalicFont [option get .tmpframe italicFont $class]
+    set ${class}BoldItalicFont [option get .tmpframe boldItalicFont $class]
+    destroy $f
+
+    if {!$XLFDFonts} {
+	set ::default_${class}_font \
+	    [list [font actual ${class}Font -family] \
+		  [font actual ${class}Font -size]]
+	set ${class}Font ${class}Font
+    }
+
+    if {!$XLFDFonts || [set ${class}BoldFont] == ""} {
+	set ${class}BoldFont \
+	    [eval font create ${class}BoldFont [font configure ${class}Font] \
+		       -weight bold]
+    }
+    if {!$XLFDFonts || [set ${class}ItalicFont] == ""} {
+	set ${class}ItalicFont \
+	    [eval font create ${class}ItalicFont [font configure ${class}Font] \
+		       -slant italic]
+    }
+    if {!$XLFDFonts || [set ${class}BoldItalicFont] == ""} {
+	set ${class}BoldItalicFont \
+	    [eval font create ${class}BoldItalicFont [font configure ${class}Font] \
+		       -weight bold -slant italic]
+    }
 }
 
-eval font create boldFont [font configure font] \
-          -weight bold
-eval font create italicFont [font configure font] \
-          -slant italic
-eval font create boldItalicFont [font configure font] \
-          -weight bold -slant italic
-
-proc redefine_fonts {args} {
-    eval font configure font $args
-    eval font configure boldFont [font configure font] \
+proc redefine_fonts {class args} {
+    eval font configure ${class}Font $args
+    eval font configure ${class}BoldFont [font configure ${class}Font] \
 	      -weight bold
-    eval font configure italicFont [font configure font] \
+    eval font configure ${class}ItalicFont [font configure ${class}Font] \
 	      -slant italic
-    eval font configure boldItalicFont [font configure font] \
+    eval font configure ${class}BoldItalicFont [font configure ${class}Font] \
 	      -weight bold -slant italic
 }
 
+create_default_fonts Chat
+create_default_fonts Roster
+
 if {![info exists usetabbar]} {
     set usetabbar 1
 }

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/ifacetk/iface.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -46,11 +46,16 @@
 	-group IFace -type boolean \
 	-command [namespace current]::switch_statusbar
 
-    if {!$xlfd_fonts} {
-	custom::defvar options(font) $::default_font \
-	    [::msgcat::mc "Font to use in roster, chat windows etc."] \
+    if {!$XLFDFonts} {
+	custom::defvar options(font) $::default_Chat_font \
+	    [::msgcat::mc "Font to use in chat windows."] \
 	    -group IFace -type font \
-	    -command [namespace current]::switch_font
+	    -command [list [namespace current]::switch_font font Chat]
+
+	custom::defvar options(roster_font) $::default_Roster_font \
+	    [::msgcat::mc "Font to use in roster windows."] \
+	    -group IFace -type font \
+	    -command [list [namespace current]::switch_font roster_font Roster]
     }
 
     custom::defvar options(raise_new_tab) 1 \
@@ -575,10 +580,10 @@
     $w draw
 }
 
-proc ifacetk::switch_font {args} {
+proc ifacetk::switch_font {font class args} {
     variable options
 
-    set opts [lassign $options(font) family size]
+    set opts [lassign $options($font) family size]
     set args [list -family $family -size $size]
     set bold 0
     set italic 0
@@ -618,8 +623,16 @@
 	lappend args -overstrike 0
     }
 
-    eval redefine_fonts $args
-    roster::redraw_after_idle
+    eval redefine_fonts $class $args
+    if {$class == "Roster"} {
+	roster::redraw_after_idle
+
+	foreach chatid [chat::opened] {
+	    if {[chat::is_groupchat $chatid]} {
+		chat::redraw_roster_after_idle $chatid
+	    }
+	}
+    }
 }
 
 proc ifacetk::show_ssl_info {} {

Modified: trunk/tkabber/ifacetk/iroster.tcl
===================================================================
--- trunk/tkabber/ifacetk/iroster.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/ifacetk/iroster.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -955,7 +955,7 @@
     set grouptag [jid_to_tag $group]
 
     set ypad 1
-    set linespace [font metric $::font -linespace]
+    set linespace [font metric $::RosterFont -linespace]
     set lineheight [expr {$linespace + $ypad}]
 
     set uy $iroster($w,ypos)
@@ -1058,11 +1058,11 @@
 	    set foreground $config(foreground)
 	}
     }
-    $c create text $x $uy -text $text -anchor nw -font $::font \
+    $c create text $x $uy -text $text -anchor nw -font $::RosterFont \
 	-fill $foreground -tags [list jid$tag group$grouptag $type text]
 
     set iroster($w,width) [max $iroster($w,width) \
-			      [expr {$x + [font measure $::font $text]}]]
+			      [expr {$x + [font measure $::RosterFont $text]}]]
 
 
     $c bind jid$tag <Any-Enter> \

Modified: trunk/tkabber/plugins/chat/draw_xhtml_message.tcl
===================================================================
--- trunk/tkabber/plugins/chat/draw_xhtml_message.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/plugins/chat/draw_xhtml_message.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -356,19 +356,19 @@
 	set fweight bold
 	if {$state(slant)} {
 	    set fslant i
-	    set fnt boldItalicFont
+	    set fnt $::ChatBoldItalicFont
 	} else {
 	    set fslant r
-	    set fnt boldFont
+	    set fnt $::ChatBoldFont
 	}
     } else {
 	set fweight normal
 	if {$state(slant)} {
 	    set fslant i
-	    set fnt italicFont
+	    set fnt $::ChatItalicFont
 	} else {
 	    set fslant r
-	    set fnt $::font
+	    set fnt $::ChatFont
 	}
     }
     # TODO: use different sizes
@@ -399,7 +399,7 @@
 
 proc xhtml::setup_xhtml_tags {chatid type} {
     set cw [::chat::chat_win $chatid]
-    $cw tag configure xhtml_symb -font $::font
+    $cw tag configure xhtml_symb -font $::ChatFont
     $cw tag raise xhtml_symb
 }
 

Modified: trunk/tkabber/plugins/richtext/stylecodes.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/stylecodes.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/plugins/richtext/stylecodes.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -197,16 +197,16 @@
 
     if {$options(emphasize)} {
 	$w tag configure stylecode -elide $options(hide_markup)
-	$w tag configure bold -font boldFont
-	$w tag configure italic -font italicFont
-	$w tag configure bold_italic -font boldItalicFont
+	$w tag configure bold -font $::ChatBoldFont
+	$w tag configure italic -font $::ChatItalicFont
+	$w tag configure bold_italic -font $::ChatBoldItalicFont
 	$w tag configure underlined -underline 1
 	$w tag configure overstricken -overstrike 1
     } else {
 	$w tag configure stylecode -elide 0
-	$w tag configure bold -font $::font
-	$w tag configure italic -font $::font
-	$w tag configure bold_italic -font $::font
+	$w tag configure bold -font $::ChatFont
+	$w tag configure italic -font $::ChatFont
+	$w tag configure bold_italic -font $::ChatFont
 	$w tag configure underlined -underline 0
 	$w tag configure overstricken -overstrike 0
     }

Modified: trunk/tkabber/richtext.tcl
===================================================================
--- trunk/tkabber/richtext.tcl	2008-03-07 10:28:05 UTC (rev 1389)
+++ trunk/tkabber/richtext.tcl	2008-03-07 13:28:38 UTC (rev 1390)
@@ -149,7 +149,7 @@
     set w [eval text $args]
     config $w
     install_selection_handlers $w
-    $w configure -state disabled -font $::font
+    $w configure -state disabled -font $::ChatFont
 }
 
 # TODO get rid of "deftag"



More information about the Tkabber-dev mailing list