[Tkabber-dev] r873 - in trunk/tkabber: . doc plugins/unix

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Jan 14 22:22:55 MSK 2007


Author: sergei
Date: 2007-01-14 22:22:48 +0300 (Sun, 14 Jan 2007)
New Revision: 873

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/README
   trunk/tkabber/doc/tkabber.html
   trunk/tkabber/doc/tkabber.xml
   trunk/tkabber/plugins/unix/ispell.tcl
Log:
	* plugins/unix/ispell.tcl: Changed option, which enables ispell to
	  plugins::ispell::options(enable). Enabled changing ispell path,
	  dictionary, its encoding on the fly.

	* README, doc/tkabber.html, doc/tkabber.xml: Documented changes in
	  ispell module.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-01-14 11:25:08 UTC (rev 872)
+++ trunk/tkabber/ChangeLog	2007-01-14 19:22:48 UTC (rev 873)
@@ -1,3 +1,12 @@
+2007-01-14  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/unix/ispell.tcl: Changed option, which enables ispell to
+	  plugins::ispell::options(enable). Enabled changing ispell path,
+	  dictionary, its encoding on the fly.
+
+	* README, doc/tkabber.html, doc/tkabber.xml: Documented changes in
+	  ispell module.
+
 2007-01-13  Sergei Golovan  <sgolovan at nes.ru>
 
 	* custom.tcl: Raise customize tab on Tkabber->Customize if it is

Modified: trunk/tkabber/README
===================================================================
--- trunk/tkabber/README	2007-01-14 11:25:08 UTC (rev 872)
+++ trunk/tkabber/README	2007-01-14 19:22:48 UTC (rev 873)
@@ -9,7 +9,7 @@
                                                      New Economic School
                                                                M. Litvak
                                                   Information Centre ISP
-                                                         January 6, 2007
+                                                        January 14, 2007
 
 
                              Tkabber v0.9.9
@@ -64,47 +64,47 @@
    3.  Download, install and run  . . . . . . . . . . . . . . . . . . 10
    4.  Configuration  . . . . . . . . . . . . . . . . . . . . . . . . 12
      4.1.  Pre-load . . . . . . . . . . . . . . . . . . . . . . . . . 13
-       4.1.1.  Tabbed Interface . . . . . . . . . . . . . . . . . . . 14
-       4.1.2.  Primary Look-and-Feel  . . . . . . . . . . . . . . . . 14
-       4.1.3.  Cryptography by default  . . . . . . . . . . . . . . . 15
-       4.1.4.  Using of external TclXML library . . . . . . . . . . . 15
-       4.1.5.  Use ispell to check spelling . . . . . . . . . . . . . 16
-       4.1.6.  Debugging Output . . . . . . . . . . . . . . . . . . . 16
-       4.1.7.  Splash window  . . . . . . . . . . . . . . . . . . . . 16
-       4.1.8.  Periodically send empty string to server . . . . . . . 17
-       4.1.9.  I18n/L10n  . . . . . . . . . . . . . . . . . . . . . . 17
-       4.1.10. Searching  . . . . . . . . . . . . . . . . . . . . . . 17
-     4.2.  Post-load  . . . . . . . . . . . . . . . . . . . . . . . . 17
-       4.2.1.  Look-and-Feel  . . . . . . . . . . . . . . . . . . . . 21
+       4.1.1.  Tabbed Interface . . . . . . . . . . . . . . . . . . . 15
+       4.1.2.  Primary Look-and-Feel  . . . . . . . . . . . . . . . . 15
+       4.1.3.  Cryptography by default  . . . . . . . . . . . . . . . 16
+       4.1.4.  Using of external TclXML library . . . . . . . . . . . 16
+       4.1.5.  Debugging Output . . . . . . . . . . . . . . . . . . . 16
+       4.1.6.  Splash window  . . . . . . . . . . . . . . . . . . . . 17
+       4.1.7.  Periodically send empty string to server . . . . . . . 17
+       4.1.8.  I18n/L10n  . . . . . . . . . . . . . . . . . . . . . . 17
+       4.1.9.  Searching  . . . . . . . . . . . . . . . . . . . . . . 18
+     4.2.  Post-load  . . . . . . . . . . . . . . . . . . . . . . . . 18
+       4.2.1.  Look-and-Feel  . . . . . . . . . . . . . . . . . . . . 22
        4.2.2.  The Autoaway Module  . . . . . . . . . . . . . . . . . 22
-       4.2.3.  The Avatar Module  . . . . . . . . . . . . . . . . . . 22
+       4.2.3.  The Avatar Module  . . . . . . . . . . . . . . . . . . 23
        4.2.4.  The Chat Module  . . . . . . . . . . . . . . . . . . . 23
-       4.2.5.  The Clientinfo Module  . . . . . . . . . . . . . . . . 23
-       4.2.6.  The Conferenceinfo Module  . . . . . . . . . . . . . . 23
+       4.2.5.  The Clientinfo Module  . . . . . . . . . . . . . . . . 24
+       4.2.6.  The Conferenceinfo Module  . . . . . . . . . . . . . . 24
        4.2.7.  The Cryptographic Module . . . . . . . . . . . . . . . 24
        4.2.8.  The Emoticons Module . . . . . . . . . . . . . . . . . 24
-       4.2.9.  The File Transfer Module . . . . . . . . . . . . . . . 24
-       4.2.10. The Groupchat Module . . . . . . . . . . . . . . . . . 24
-       4.2.11. The Ispell Module  . . . . . . . . . . . . . . . . . . 25
-       4.2.12. The Stream Initiation Module . . . . . . . . . . . . . 25
+       4.2.9.  The File Transfer Module . . . . . . . . . . . . . . . 25
+       4.2.10. The Groupchat Module . . . . . . . . . . . . . . . . . 25
+       4.2.11. The Ispell Module  . . . . . . . . . . . . . . . . . . 26
+       4.2.12. The Stream Initiation Module . . . . . . . . . . . . . 26
        4.2.13. The Jidlink Module . . . . . . . . . . . . . . . . . . 26
-       4.2.14. The Logger Module  . . . . . . . . . . . . . . . . . . 26
+       4.2.14. The Logger Module  . . . . . . . . . . . . . . . . . . 27
        4.2.15. The Login Module . . . . . . . . . . . . . . . . . . . 27
        4.2.16. The Message Module . . . . . . . . . . . . . . . . . . 28
-       4.2.17. The Raw XML Input Module . . . . . . . . . . . . . . . 28
-       4.2.18. The Roster Module  . . . . . . . . . . . . . . . . . . 28
+       4.2.17. The Raw XML Input Module . . . . . . . . . . . . . . . 29
+       4.2.18. The Roster Module  . . . . . . . . . . . . . . . . . . 29
        4.2.19. The Sound Module . . . . . . . . . . . . . . . . . . . 29
-     4.3.  Menu-load  . . . . . . . . . . . . . . . . . . . . . . . . 30
+     4.3.  Menu-load  . . . . . . . . . . . . . . . . . . . . . . . . 31
        4.3.1.  The Avatar Module  . . . . . . . . . . . . . . . . . . 31
-       4.3.2.  The Browser Module . . . . . . . . . . . . . . . . . . 31
-       4.3.3.  The Groupchat Module . . . . . . . . . . . . . . . . . 31
-       4.3.4.  The Login Module . . . . . . . . . . . . . . . . . . . 31
-       4.3.5.  The Message Module . . . . . . . . . . . . . . . . . . 31
+       4.3.2.  The Browser Module . . . . . . . . . . . . . . . . . . 32
+       4.3.3.  The Groupchat Module . . . . . . . . . . . . . . . . . 32
+       4.3.4.  The Login Module . . . . . . . . . . . . . . . . . . . 32
+       4.3.5.  The Message Module . . . . . . . . . . . . . . . . . . 32
        4.3.6.  The Presence Module  . . . . . . . . . . . . . . . . . 32
        4.3.7.  Miscellany . . . . . . . . . . . . . . . . . . . . . . 33
      4.4.  Final-Load . . . . . . . . . . . . . . . . . . . . . . . . 33
    5.  Extensibility  . . . . . . . . . . . . . . . . . . . . . . . . 34
      5.1.  Chat Hooks . . . . . . . . . . . . . . . . . . . . . . . . 35
+     5.2.  Login Hooks  . . . . . . . . . . . . . . . . . . . . . . . 37
 
 
 
@@ -113,7 +113,6 @@
                              Tkabber v0.9.9                 January 2007
 
 
-     5.2.  Login Hooks  . . . . . . . . . . . . . . . . . . . . . . . 37
      5.3.  Presence Hooks . . . . . . . . . . . . . . . . . . . . . . 37
      5.4.  Roster Hooks . . . . . . . . . . . . . . . . . . . . . . . 38
      5.5.  Miscellaneous Hooks  . . . . . . . . . . . . . . . . . . . 39
@@ -164,6 +163,7 @@
 
 
 
+
 Shchepin, et al.                                                [Page 3]
 
                              Tkabber v0.9.9                 January 2007
@@ -686,6 +686,49 @@
 
 4.1.  Pre-load
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Shchepin, et al.                                               [Page 13]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    There are a few things that you may let _Tkabber_ know immediately.
    These are:
 
@@ -715,20 +758,8 @@
    set use_external_tclxml 0
 
 
-   # use ispell to check spelling
-
-   set use_ispell 0
-
-
    # debugging output
 
-
-
-Shchepin, et al.                                               [Page 13]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    set debug_lvls {jlib warning}
 
 
@@ -747,6 +778,13 @@
 
    ::msgcat::mclocale en
 
+
+
+Shchepin, et al.                                               [Page 14]
+
+                             Tkabber v0.9.9                 January 2007
+
+
 4.1.1.  Tabbed Interface
 
    The first of these options, "ifacetk::options(use_tabbar)", tells
@@ -777,14 +815,6 @@
        set load_default_xrdb 0
        option readfile $::configdir/newlook.xrdb userDefault
 
-
-
-
-Shchepin, et al.                                               [Page 14]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    The first line tells _Tkabber_ not to load its default "xrdb" file,
    whilst the second line tells _Tkabber_ the file to load instead.
 
@@ -801,6 +831,16 @@
 
    to set the palette to a pleasing color scheme.
 
+
+
+
+
+
+Shchepin, et al.                                               [Page 15]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    Other look-and-feel options which you may want to set are font
    options:
 
@@ -833,31 +873,30 @@
    not suitable.  Then you can install _TclXML_ with built-in _expat_
    support and set variable "use_external_tclxml":
 
+   set use_external_tclxml 0
 
+4.1.5.  Debugging Output
 
+   _Tkabber_ has a lot of debugging output.  By default, it gets printed
+   to the standard output by a Tcl procedure called "debugmsg".
+   However, only information about those modules listed in a variable
+   called "debug_lvls" will be printed.
 
-Shchepin, et al.                                               [Page 15]
-
-                             Tkabber v0.9.9                 January 2007
 
 
-   set use_external_tclxml 0
 
-4.1.5.  Use ispell to check spelling
 
-   On Unix, _Tkabber_ can check spelling of what you entered by calling
-   an external program _ispell_.  To enable this feature, add following
-   line:
 
-   set use_ispell 1
 
-4.1.6.  Debugging Output
 
-   _Tkabber_ has a lot of debugging output.  By default, it gets printed
-   to the standard output by a Tcl procedure called "debugmsg".
-   However, only information about those modules listed in a variable
-   called "debug_lvls" will be printed.
 
+
+
+Shchepin, et al.                                               [Page 16]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    If you know how to program Tcl, then this will seem rather obvious:
 
    set debug_lvls [list message presence ssj warning]
@@ -877,7 +916,7 @@
 
    set debug_lvls {}
 
-4.1.7.  Splash window
+4.1.6.  Splash window
 
    By default, when _Tkabber_ startup, it show loading process in splash
    window.  To disable this feature, put this in your configuration
@@ -885,20 +924,8 @@
 
    set show_splash_window 0
 
+4.1.7.  Periodically send empty string to server
 
-
-
-
-
-
-
-Shchepin, et al.                                               [Page 16]
-
-                             Tkabber v0.9.9                 January 2007
-
-
-4.1.8.  Periodically send empty string to server
-
    If you're using a proxy to talk to a Jabber server, after a period of
    inactivity, the proxy may decide to disconnect you.  To avoid this,
    you can tell _Tkabber_ to send an empty string to the server every
@@ -907,7 +934,7 @@
    set keep_alive 1
    set keep_alive_interval 10
 
-4.1.9.  I18n/L10n
+4.1.8.  I18n/L10n
 
    _Tkabber_ can show all messages in user's native language.  This is
    done by using Tcl's built-in _msgcat_ package which looks for a
@@ -919,8 +946,15 @@
 
    ::msgcat::mclocale en
 
-4.1.10.  Searching
 
+
+Shchepin, et al.                                               [Page 17]
+
+                             Tkabber v0.9.9                 January 2007
+
+
+4.1.9.  Searching
+
    _Tkabber_ allows the user to perform textual searching in certain
    classes of its windows.  This searching is controlled by several
    settings which can be specified in this section.
@@ -945,14 +979,6 @@
        global alert colors alert_lvls
 
        set alert_lvls(error)        1
-
-
-
-Shchepin, et al.                                               [Page 17]
-
-                             Tkabber v0.9.9                 January 2007
-
-
        set alert_lvls(server)       1
        set alert_lvls(message)      2
        set alert_lvls(mesg_to_user) 3
@@ -975,6 +1001,14 @@
        set avatar::options(share)    0
 
 
+
+
+
+Shchepin, et al.                                               [Page 18]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    # the chat module
 
        set chat::options(default_message_type) chat
@@ -1001,14 +1035,6 @@
 
    # the emoticon module
 
-
-
-
-Shchepin, et al.                                               [Page 18]
-
-                             Tkabber v0.9.9                 January 2007
-
-
        set plugins::emoticons::options(theme) \
                    $::configdir/emoticons/rythmbox
 
@@ -1030,6 +1056,15 @@
 
    # the ispell module
 
+       set plugins::ispell::options(enable)              1
+
+
+
+Shchepin, et al.                                               [Page 19]
+
+                             Tkabber v0.9.9                 January 2007
+
+
        set plugins::ispell::options(executable)          /usr/bin/ispell
        set plugins::ispell::options(dictionary)          russian
        set plugins::ispell::options(dictionary_encoding) koi8-r
@@ -1057,14 +1092,6 @@
        global loginconf loginconf1 loginconf2 autologin
 
        set loginconf(user)           ""
-
-
-
-Shchepin, et al.                                               [Page 19]
-
-                             Tkabber v0.9.9                 January 2007
-
-
        set loginconf(password)       ""
        set loginconf(server)         example.com
        set loginconf(resource)       tkabber
@@ -1086,6 +1113,14 @@
        set loginconf(usealtserver)  1
        set loginconf(altserver)     "jabber.example.com"
 
+
+
+
+Shchepin, et al.                                               [Page 20]
+
+                             Tkabber v0.9.9                 January 2007
+
+
        set loginconf1(profile)      "Default Account"
        set loginconf1(user)         mrose
 
@@ -1113,14 +1148,6 @@
 
        set roster::show_only_online            1
        set roster::roster(collapsed,RSS)       1
-
-
-
-Shchepin, et al.                                               [Page 20]
-
-                             Tkabber v0.9.9                 January 2007
-
-
        set roster::roster(collapsed,Undefined) 1
 
        set roster::aliases(friend at some.host) \
@@ -1142,6 +1169,14 @@
        set sound::options(connected_sound)                     ""
        set sound::options(presence_available_sound)            ""
        set sound::options(presence_unavailable_sound)          ""
+
+
+
+Shchepin, et al.                                               [Page 21]
+
+                             Tkabber v0.9.9                 January 2007
+
+
        set sound::options(groupchat_server_message_sound)      ""
        set sound::options(groupchat_their_message_to_me_sound) ""
    }
@@ -1169,14 +1204,6 @@
    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
    _alert_colors_ come in.  The array maps an incoming message to a
-
-
-
-Shchepin, et al.                                               [Page 21]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    priority number from zero to three.  The list, which is indexed
    starting at _zero_, indicates what color the tab should use to let
    you know that something's changed.  So, the way to read the example
@@ -1199,6 +1226,13 @@
 
    This module is presently available only if either:
 
+
+
+Shchepin, et al.                                               [Page 22]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    o  on UNIX, if you have the _Tk Xwin_ extension installed; or,
 
    o  On Windows, if you have the _Tcl Winidle_ extension installed.
@@ -1226,13 +1260,6 @@
    o  "avatar::options(share)" determines whether requests for your
       avatar will be honored.
 
-
-
-Shchepin, et al.                                               [Page 22]
-
-                             Tkabber v0.9.9                 January 2007
-
-
 4.2.4.  The Chat Module
 
    Most instant messaging users prefer to see all the back-and-forth
@@ -1252,6 +1279,16 @@
 
    set plugins::options(timestamp_format) {[%T]}
 
+
+
+
+
+
+Shchepin, et al.                                               [Page 23]
+
+                             Tkabber v0.9.9                 January 2007
+
+
 4.2.5.  The Clientinfo Module
 
    This module shows in popup balloons information of used by this user
@@ -1279,16 +1316,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 23]
-
-                             Tkabber v0.9.9                 January 2007
-
-
 4.2.7.  The Cryptographic Module
 
    Earlier (Section 4.1) we saw an example where the "ssj::options"
@@ -1308,6 +1335,16 @@
    to where you installed _Tkabber_ and take a look at the file called
    ""emoticons/default/icondef.xml"" or read XEP-0038 [21].)
 
+
+
+
+
+
+Shchepin, et al.                                               [Page 24]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    If you have just a few icons, and you don't want to create a
    directory and a textual mapping, you can use the procedure called
    "plugins::emoticons::add", e.g.,
@@ -1334,17 +1371,6 @@
    add to roster dialog window: "gra_group" and "gra_server" specify the
       default room and conference server, repectively; and,
 
-
-
-
-
-
-
-Shchepin, et al.                                               [Page 24]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    join dialog window: "gr_nick", "gr_group" and "gr_server" specify the
       default nickname, room, and conference server, respectively.
 
@@ -1367,11 +1393,24 @@
 
    Exact JID's take the higher precedence than patterns.
 
+
+
+
+Shchepin, et al.                                               [Page 25]
+
+                             Tkabber v0.9.9                 January 2007
+
+
 4.2.11.  The Ispell Module
 
-   If you enabled this module earlier (Section 4.1.5), then you can
-   define:
+   On Unix, _Tkabber_ can check spelling of what you entered by calling
+   an external program _ispell_.  To enable this feature, add following
+   lines to postload function:
 
+   set plugins::ispell::options(dictionary) 1
+
+   If you enabled this module, then you can also define:
+
    o  the path to the _ispell_ executable by setting
       "plugins::ispell::options(executable)"
 
@@ -1394,13 +1433,6 @@
    choose more appropriate one. _Tkabber_ comes with two transport
    implementations:
 
-
-
-Shchepin, et al.                                               [Page 25]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    bytestreams: that allows you to connect to any node that supports
       "bytestreams" transport (mediated connection is not supported
       yet);
@@ -1417,6 +1449,14 @@
 
    Jidlink is a simple negotiation protocol for setting up a bytestream
    between two JIDs.  With it you can specify what transports you can
+
+
+
+Shchepin, et al.                                               [Page 26]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    use, and via negotiation choose more appropriate one. _Tkabber_ comes
    with three transport implementations:
 
@@ -1446,17 +1486,6 @@
        set logger::options(log_chat)      1
        set logger::options(log_groupchat) 1
 
-
-
-
-
-
-
-Shchepin, et al.                                               [Page 26]
-
-                             Tkabber v0.9.9                 January 2007
-
-
 4.2.15.  The Login Module
 
    The first task is to initialize the configuration defaults for the
@@ -1477,6 +1506,13 @@
    o  encrypted -- use encrypted (via STARTTLS mechanism) connection
       (this option requires tls extension to be installed);
 
+
+
+Shchepin, et al.                                               [Page 27]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    o  ssl -- use encrypted (via legacy SSL mechanism) connection (this
       option requires tls extension to be installed);
 
@@ -1505,14 +1541,6 @@
    profiles as you want.  If you want more than just one, they're named
    "loginconf1", "loginconf2", and so on.
 
-
-
-
-Shchepin, et al.                                               [Page 27]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    What the example above shows is the default values for all profiles
    being set in "loginconf", and then two profiles, one called ""Default
    Account"" and the other called ""Test Account"" being created.
@@ -1533,6 +1561,14 @@
    whenever you run it, set "message::options(headlines,cache)" to "1".
 
    By default, _Tkabber_ will put all headline messages into a single
+
+
+
+Shchepin, et al.                                               [Page 28]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    window.  If you want _Tkabber_ to use a seperate window for each
    headline source, set "message::options(headlines,multiple)" to "1".
 
@@ -1561,14 +1597,6 @@
    for people like these, so it will show only one entry in the roster.
    In the example, we see that user "friend at some.host" have aliases
    "friend at other.host" and "friend at another.host".  You can also disable
-
-
-
-Shchepin, et al.                                               [Page 28]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    all aliases by setting "roster::use_aliases" to "0".
 
 4.2.19.  The Sound Module
@@ -1589,6 +1617,14 @@
    paying enough attention to it) add the following line:
    set sound::options(mute_if_focus) 1
 
+
+
+
+Shchepin, et al.                                               [Page 29]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    You can also mute sounds of delayed groupchat messages and delayed
    personal chat messages:
 
@@ -1618,13 +1654,6 @@
    o  "sound::options(presence_unavailable_sound)" -- sound playing when
       unavailable presence is coming;
 
-
-
-Shchepin, et al.                                               [Page 29]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    o  "sound::options(chat_my_message_sound)" -- sound playing when you
       send one-to-one chat message;
 
@@ -1644,6 +1673,14 @@
       playing when you receive highlighted (usually personally
       addressed) groupchat message from another user.
 
+
+
+
+Shchepin, et al.                                               [Page 30]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    If you want to disable sound notification for some of the events,
    then you can add line like this:
 
@@ -1674,13 +1711,6 @@
        for the ""-menu"" option explains the syntax of the
        specification.
 
-
-
-Shchepin, et al.                                               [Page 30]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    2.  Go to where you installed _Tkabber_ and take a look at the file
        called ""iface.tcl"".  Look for the line that starts with ""set
        descmenu"".  This will show you the specification given to your
@@ -1698,6 +1728,15 @@
    The procedure called "avatar::store_on_server" stores your avatar on
    the server.
 
+
+
+
+
+Shchepin, et al.                                               [Page 31]
+
+                             Tkabber v0.9.9                 January 2007
+
+
 4.3.2.  The Browser Module
 
    The procedure called "browser::open" opens a new browser window.
@@ -1729,14 +1768,6 @@
    takes one optional argument: the recipient JID.
 
    If you want to adjust your message filters, the procecure called
-
-
-
-Shchepin, et al.                                               [Page 31]
-
-                             Tkabber v0.9.9                 January 2007
-
-
    "filters::open" will put up a dialog window.
 
 4.3.6.  The Presence Module
@@ -1754,6 +1785,14 @@
        userinfo::open \
            ${loginconf(user)}@$loginconf(server)/$loginconf(resource) 1
 
+
+
+
+Shchepin, et al.                                               [Page 32]
+
+                             Tkabber v0.9.9                 January 2007
+
+
    There are also two variables that you can use to set your own
    presence: "userstatus" and "textstatus".  The first variable takes
    one of five values:
@@ -1782,17 +1821,6 @@
        set textstatus "Out to lunch"
        set userstatus $userstatus
 
-
-
-
-
-
-
-Shchepin, et al.                                               [Page 32]
-
-                             Tkabber v0.9.9                 January 2007
-
-
 4.3.7.  Miscellany
 
    Finally, you can use the procedure named "help_window" to display
@@ -1816,34 +1844,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 Shchepin, et al.                                               [Page 33]
 
                              Tkabber v0.9.9                 January 2007

Modified: trunk/tkabber/doc/tkabber.html
===================================================================
--- trunk/tkabber/doc/tkabber.html	2007-01-14 11:25:08 UTC (rev 872)
+++ trunk/tkabber/doc/tkabber.html	2007-01-14 19:22:48 UTC (rev 873)
@@ -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.9.9</title>
-<meta http-equiv="Expires" content="Sat, 06 Jan 2007 17:05:45 +0000">
+<meta http-equiv="Expires" content="Sun, 14 Jan 2007 19:17:58 +0000">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <meta name="description" content="Tkabber v0.9.9">
 <meta name="generator" content="xml2rfc v1.30 (http://xml.resource.org/)">
@@ -132,7 +132,7 @@
 <tr><td class="header">&nbsp;</td><td class="header">New Economic School</td></tr>
 <tr><td class="header">&nbsp;</td><td class="header">M. Litvak</td></tr>
 <tr><td class="header">&nbsp;</td><td class="header">Information Centre ISP</td></tr>
-<tr><td class="header">&nbsp;</td><td class="header">January 6, 2007</td></tr>
+<tr><td class="header">&nbsp;</td><td class="header">January 14, 2007</td></tr>
 </table></td></tr></table>
 <div align="right"><span class="title"><br />Tkabber v0.9.9</span></div>
 
@@ -163,17 +163,15 @@
 Cryptography by default<br />
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-tclxml">4.1.4.</a>&nbsp;
 Using of external TclXML library<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-ispell">4.1.5.</a>&nbsp;
-Use ispell to check spelling<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-debugoutput">4.1.6.</a>&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-debugoutput">4.1.5.</a>&nbsp;
 Debugging Output<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-splashwindow">4.1.7.</a>&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-splashwindow">4.1.6.</a>&nbsp;
 Splash window<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-sendempty">4.1.8.</a>&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-sendempty">4.1.7.</a>&nbsp;
 Periodically send empty string to server<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-internation">4.1.9.</a>&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-internation">4.1.8.</a>&nbsp;
 I18n/L10n<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-searching">4.1.10.</a>&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.preload-searching">4.1.9.</a>&nbsp;
 Searching<br />
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#s.postload">4.2.</a>&nbsp;
 Post-load<br />
@@ -785,11 +783,6 @@
 set use_external_tclxml 0
 
 
-# use ispell to check spelling
-
-set use_ispell 0
-
-
 # debugging output
 
 set debug_lvls {jlib warning}
@@ -922,21 +915,9 @@
 </p><pre>
 set use_external_tclxml 0
 </pre>
-<a name="s.preload-ispell"></a><br /><hr />
-<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.5"></a><h3>4.1.5.&nbsp;Use ispell to check spelling</h3>
-
-<p>
-	      On Unix, <span class="emph">Tkabber</span> can check spelling of what you entered by
-	      calling an external program <span class="emph">ispell</span>.  To enable this feature, add
-	      following line:
-	    
-</p><pre>
-set use_ispell 1
-</pre>
 <a name="s.preload-debugoutput"></a><br /><hr />
 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.6"></a><h3>4.1.6.&nbsp;Debugging Output</h3>
+<a name="rfc.section.4.1.5"></a><h3>4.1.5.&nbsp;Debugging Output</h3>
 
 <p><span class="emph">Tkabber</span> has a lot of debugging output.
 By default,
@@ -970,7 +951,7 @@
 </pre>
 <a name="s.preload-splashwindow"></a><br /><hr />
 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.7"></a><h3>4.1.7.&nbsp;Splash window</h3>
+<a name="rfc.section.4.1.6"></a><h3>4.1.6.&nbsp;Splash window</h3>
 
 <p>
 	      By default, when <span class="emph">Tkabber</span> startup, it show loading process in
@@ -982,7 +963,7 @@
 </pre>
 <a name="s.preload-sendempty"></a><br /><hr />
 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.8"></a><h3>4.1.8.&nbsp;Periodically send empty string to server</h3>
+<a name="rfc.section.4.1.7"></a><h3>4.1.7.&nbsp;Periodically send empty string to server</h3>
 
 <p>
 	      If you're using a proxy to talk to a Jabber server, after a
@@ -996,7 +977,7 @@
 </pre>
 <a name="s.preload-internation"></a><br /><hr />
 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.9"></a><h3>4.1.9.&nbsp;I18n/L10n</h3>
+<a name="rfc.section.4.1.8"></a><h3>4.1.8.&nbsp;I18n/L10n</h3>
 
 <p>
 	      <span class="emph">Tkabber</span> can show all messages in user's native language.  This
@@ -1013,7 +994,7 @@
 </pre>
 <a name="s.preload-searching"></a><br /><hr />
 <table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2">&nbsp;TOC&nbsp;</a></td></tr></table>
-<a name="rfc.section.4.1.10"></a><h3>4.1.10.&nbsp;Searching</h3>
+<a name="rfc.section.4.1.9"></a><h3>4.1.9.&nbsp;Searching</h3>
 
 <p><span class="emph">Tkabber</span> allows the user to perform textual
 		searching in certain classes of its windows. This searching
@@ -1114,6 +1095,7 @@
 
 # the ispell module
 
+    set plugins::ispell::options(enable)              1
     set plugins::ispell::options(executable)          /usr/bin/ispell
     set plugins::ispell::options(dictionary)          russian
     set plugins::ispell::options(dictionary_encoding) koi8-r
@@ -1486,8 +1468,15 @@
 <a name="rfc.section.4.2.11"></a><h3>4.2.11.&nbsp;The Ispell Module</h3>
 
 <p>
-	    If you enabled this module <a class="info" href="#s.preload-ispell">earlier<span> (</span><span class="info">Use ispell to check spelling</span><span>)</span></a>,
-	    then you can define:
+	    On Unix, <span class="emph">Tkabber</span> can check spelling of what you entered by
+	    calling an external program <span class="emph">ispell</span>.  To enable this feature, add
+	    following lines to postload function:
+	    
+</p><pre>
+set plugins::ispell::options(dictionary) 1
+</pre>
+<p>
+	    If you enabled this module, then you can also define:
 </p>
 <ul class="text">
 <li>the path to the <span class="emph">ispell</span> executable by setting

Modified: trunk/tkabber/doc/tkabber.xml
===================================================================
--- trunk/tkabber/doc/tkabber.xml	2007-01-14 11:25:08 UTC (rev 872)
+++ trunk/tkabber/doc/tkabber.xml	2007-01-14 19:22:48 UTC (rev 873)
@@ -502,11 +502,6 @@
 set use_external_tclxml 0
 
 
-# use ispell to check spelling
-
-set use_ispell 0
-
-
 # debugging output
 
 set debug_lvls {jlib warning}
@@ -641,19 +636,6 @@
 	  </figure>
 	</section>
 
-	<section anchor='s.preload-ispell' title="Use ispell to check spelling">
-	  <figure>
-	    <preamble>
-	      On Unix, <spanx>Tkabber</spanx> can check spelling of what you entered by
-	      calling an external program <spanx>ispell</spanx>.  To enable this feature, add
-	      following line:
-	    </preamble>
-<artwork>
-set use_ispell 1
-</artwork>
-	  </figure>
-	</section>
-
 <section anchor='s.preload-debugoutput' title='Debugging Output'>
 <t><spanx>Tkabber</spanx> has a lot of debugging output.
 By default,
@@ -837,6 +819,7 @@
 
 # the ispell module
 
+    set plugins::ispell::options(enable)              1
     set plugins::ispell::options(executable)          /usr/bin/ispell
     set plugins::ispell::options(dictionary)          russian
     set plugins::ispell::options(dictionary_encoding) koi8-r
@@ -1209,9 +1192,19 @@
 </section>
 
 	<section anchor='s.postload-ispell' title="The Ispell Module">
+	  <figure>
+	    <preamble>
+	    On Unix, <spanx>Tkabber</spanx> can check spelling of what you entered by
+	    calling an external program <spanx>ispell</spanx>.  To enable this feature, add
+	    following lines to postload function:
+	    </preamble>
+<artwork>
+set plugins::ispell::options(dictionary) 1
+</artwork>
+	  </figure>
+
 	  <t>
-	    If you enabled this module <xref target="s.preload-ispell">earlier</xref>,
-	    then you can define:
+	    If you enabled this module, then you can also define:
 <list style='symbols'>
 <t>the path to the <spanx>ispell</spanx> executable by setting
 <spanx style='verb'>plugins::ispell::options(executable)</spanx></t>

Modified: trunk/tkabber/plugins/unix/ispell.tcl
===================================================================
--- trunk/tkabber/plugins/unix/ispell.tcl	2007-01-14 11:25:08 UTC (rev 872)
+++ trunk/tkabber/plugins/unix/ispell.tcl	2007-01-14 19:22:48 UTC (rev 873)
@@ -1,32 +1,60 @@
 # $Id$
 
-if {![info exists ::use_ispell] || !$::use_ispell} {
-    return
-}
-
 package require textutil
 
 namespace eval ispell {
-    custom::defgroup Plugins [::msgcat::mc "Plugins options."] -group Tkabber
-    custom::defgroup Ispell [::msgcat::mc "Spell check options."] -group Plugins
+    custom::defgroup Plugins [::msgcat::mc "Plugins options."] \
+	-group Tkabber
+    custom::defgroup Ispell [::msgcat::mc "Spell check options."] \
+    -group Plugins
 
     variable options
-    #set options(executable) /usr/bin/ispell
+
+    custom::defvar options(enable) 0 \
+	[::msgcat::mc "Enable spellchecker in text input windows."] \
+	-type boolean \
+	-group Ispell \
+	-command [namespace current]::stop
+
     custom::defvar options(executable) /usr/bin/ispell \
-	[::msgcat::mc "Path to the ispell executable."] -group Ispell
-    #set options(check_every_symbol) 0
+	[::msgcat::mc "Path to the ispell executable."] \
+	-group Ispell \
+	-command [namespace current]::stop
+
     custom::defvar options(check_every_symbol) 0 \
-	[::msgcat::mc "Check spell after every entered symbol."] -type boolean -group Ispell
+	[::msgcat::mc "Check spell after every entered symbol."] \
+	-type boolean \
+	-group Ispell \
+	-command [namespace current]::stop
+
     custom::defvar options(dictionary) "" \
-	[::msgcat::mc "Ispell dictionary. If it is empty, default dictionary is used."] -type string -group Ispell
+	[::msgcat::mc "Ispell dictionary. If it is empty,\
+		       default dictionary is used."] \
+	-type string \
+	-group Ispell \
+	-command [namespace current]::stop
+
     custom::defvar options(dictionary_encoding) "" \
-	[::msgcat::mc "Ispell dictionary encoding. If it is empty, system encoding is used."] -type string -group Ispell
+	[::msgcat::mc "Ispell dictionary encoding. If it is empty,\
+		       system encoding is used."] \
+	-type string \
+	-group Ispell \
+	-command [namespace current]::stop
+
     variable misspelled
     variable word_id 0
+
     option add *Text.errorColor Red widgetDefault
     option add *Text.comboColor Blue widgetDefault
 }
 
+proc ispell::stop {args} {
+    variable pipe
+
+    catch {close $pipe}
+    catch {unset pipe}
+}
+
 proc ispell::start {} {
     variable options
     variable pipe
@@ -40,14 +68,17 @@
     set pipe [open "|[list $options(executable)] -a $dict_string" r+]
     set version [gets $pipe]
     if {[cequal $version ""]} {
-	debugmsg plugins "ISPELL: Could not start ispell server. Check your dictionary name."
+	stop
 	return
     }
     if {[info exists options(dictionary_encoding)] \
 	    && ![cequal $options(dictionary_encoding) ""]} {
-	fconfigure $pipe -blocking off -buffering line -encoding $options(dictionary_encoding)
+	fconfigure $pipe -blocking off \
+			 -buffering line \
+			 -encoding $options(dictionary_encoding)
     } else {
-	fconfigure $pipe -blocking off -buffering line
+	fconfigure $pipe -blocking off \
+			 -buffering line
     }
     fileevent $pipe readable [namespace current]::process_filter
 }
@@ -81,15 +112,29 @@
 }
 
 proc ispell::pipe_word {word} {
+    variable options
     variable pipe
     variable response
     variable current_word
     variable misspelled
 
+    if {!$options(enable)} return
+
     set current_word $word
 
     if {![info exist pipe]} {
 	start
+	if {![info exist pipe]} {
+	    after idle [list NonmodalMessageDlg .ispell_error \
+			     -aspect 50000 \
+			     -icon error \
+			     -message [::msgcat::mc "Could not start ispell\
+						     server. Check your ispell\
+						     path and dictionary name.\
+						     Ispell is disabled now"]]
+	    set options(enable) 0
+	    return
+	}
     }
     if {[string length $word] <= 1} {
 	set misspelled($word) ok



More information about the Tkabber-dev mailing list