[Tkabber-dev] r1313 - in trunk/tkabber-plugins: . attline ctcomp

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Nov 14 21:43:51 MSK 2007


Author: sergei
Date: 2007-11-14 21:43:51 +0300 (Wed, 14 Nov 2007)
New Revision: 1313

Added:
   trunk/tkabber-plugins/attline/INSTALL
   trunk/tkabber-plugins/attline/README
Removed:
   trunk/tkabber-plugins/attline/BUGS
Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/attline/TODO
   trunk/tkabber-plugins/ctcomp/README
Log:
	* ctcomp/README: Added info about keybindings (thanks to Konstantin
	  Khomoutov).

	* attline/BUGS: Removed since bugs mentioned in it are fixed (thanks
	  to Konstantin Khomoutov).

	* attline/TODO: Removed already done tasks (thanks to Konstantin
	  Khomoutov).

	* attline/README, attline/INSTALL: Added info about plugin and
	  installation instructions (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2007-11-13 18:28:58 UTC (rev 1312)
+++ trunk/tkabber-plugins/ChangeLog	2007-11-14 18:43:51 UTC (rev 1313)
@@ -1,3 +1,17 @@
+2007-11-14  Sergei Golovan <sgolovan at nes.ru>
+
+	* ctcomp/README: Added info about keybindings (thanks to Konstantin
+	  Khomoutov).
+
+	* attline/BUGS: Removed since bugs mentioned in it are fixed (thanks
+	  to Konstantin Khomoutov).
+
+	* attline/TODO: Removed already done tasks (thanks to Konstantin
+	  Khomoutov).
+
+	* attline/README, attline/INSTALL: Added info about plugin and
+	  installation instructions (thanks to Konstantin Khomoutov).
+
 2007-11-13  Sergei Golovan <sgolovan at nes.ru>
 
 	* checkers/checkers.tcl, chess/chess.tcl, renju/renju.tcl,

Deleted: trunk/tkabber-plugins/attline/BUGS
===================================================================
--- trunk/tkabber-plugins/attline/BUGS	2007-11-13 18:28:58 UTC (rev 1312)
+++ trunk/tkabber-plugins/attline/BUGS	2007-11-14 18:43:51 UTC (rev 1313)
@@ -1,26 +0,0 @@
-$Id$
-
-! Don't work with NotePad in 0.10.0. [.nb raise] returns ""
-when called from open_chat_post_hook event handler...
-
-bug in buttonbar.tcl:
-
-Hook got_focus_hook failed
-Procedure ::plugins::atline::on_focused returned code 1
-bad window path name ".pages.ftab_0"
-bad window path name ".pages.ftab_0"
-    while executing
-"pack slaves [.nb getframe $page]"
-    (procedure "ifacetk::nbpath" line 2)
-    invoked from within
-"ifacetk::nbpath $tab"
-    (procedure "active_chatid" line 9)
-    invoked from within
-"active_chatid $w"
-    (procedure "::plugins::atline::on_focused" line 2)
-    invoked from within
-"::plugins::atline::on_focused ."
-    ("eval" body line 1)
-    invoked from within
-"eval $func $args "
-

Added: trunk/tkabber-plugins/attline/INSTALL
===================================================================
--- trunk/tkabber-plugins/attline/INSTALL	                        (rev 0)
+++ trunk/tkabber-plugins/attline/INSTALL	2007-11-14 18:43:51 UTC (rev 1313)
@@ -0,0 +1,11 @@
+As usually, copy this directory under the ~/.tkabber/plugins directory
+so that you get a hierarchy like this:
+  ~/.tkabber/plugins
+  ~/.tkabber/plugins/attline/
+  ~/.tkabber/plugins/attline/attline.tcl
+
+Restart Tkabber, to get the plugin loaded.
+Visit the Tkabber->Customize->Chat->Attention Line
+block of settings, customize as you wish.
+Consult the README file for the details about using this plugin.
+


Property changes on: trunk/tkabber-plugins/attline/INSTALL
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/tkabber-plugins/attline/README
===================================================================
--- trunk/tkabber-plugins/attline/README	                        (rev 0)
+++ trunk/tkabber-plugins/attline/README	2007-11-14 18:43:51 UTC (rev 1313)
@@ -0,0 +1,138 @@
+$Id$
+"Attention line" -- chat plugin for Tkabber.
+
+
+I. The idea
+
+This plugin helps to track discussion flow in high-volume chats
+by remembering the last message you have read in each chat
+window when you're leaving it and drawing a horizontal line just
+below that message when you return back to that chat window.
+This line is called the "attention line" since its task is to
+draw your attention to the point at which you stopped to attend
+the chat when you're back.
+
+"Leaving of the chat window" described above applies not only to
+the physical top-level chat windows in windowed mode but
+also to switching between chat tabs in tabbed mode. In tabbed
+mode leaving the main window is also considered as leaving the
+currently active chat tab, if any. So everywhere in this
+document, when you see "chat window" you can safely interpret it
+as "chat tab" if you're using tabbed mode in Tkabber.
+
+
+II. Usage
+
+The behaviour of the attention line is governed by its
+"expiration timeout". When you switch to a chat window and the
+chat log in that window contains unread messages, expiration
+line is placed just below the last read message. At that time
+the attention line expiration timer starts to tick. If you leave
+the chat window again until the timeout expires, the attention
+line is left intact as if you haven't switched to that window at
+all. Otherwise, if the timeout expires while you're in this chat
+window its attention line is considered "expired" and the chat
+log is considered as read. Normally the attention line doesn't
+do anything when it expires but you can make it disappear, if
+you so like (see the "Configuration" section below). When you
+leave the chat window with expired attention line and then
+switch back to it later the attention line will be placed just
+above the first message arrived while you haven't attending that
+chat window and the expiration timer starts again.
+
+The expiration timeout is configurable and can be disabled.
+
+If it's still not quite clear, you can consider this "expiration
+timeout" as "time to read", i.e. the time which must tick before
+the chat window you're currently attending is considered "read"
+(by you).
+
+When the chat window is active and its attention line is expired
+any new messages arriving in this chat are considered "read"
+immediately and doesn't affect the attention line.
+
+Chat input window is given one special Tk virtual event [1]
+named <<ChatSeeAttentionLine>> which is unbound by default but
+can be bound [2] to any Tk event (usually, a keyboard shortcut)
+and then used to move the chat log viewport to the place where
+the attention line is currently located.
+
+
+III. Configuration.
+
+You can configure the behavior of the attention line via
+Tkabber's Customize mechanism and its visual appearance via Tk
+option database [3].
+
+Configuration parameters are available in the
+"Chat" -> "Attention Line" group of Customize settings (which
+are accessible via the "Tkabber" -> "Customize" main menu entry.
+There are two options to configure:
+
+* ::plugins::attline::options(expires_after) -- sets the
+  attention line expiration timeout (in milliseconds). If set
+  to 0 or a negative value attention line is considered expired
+  right after you switch to a chat window it's placed in.
+  The default value is 1000.
+
+* ::plugins::attline::options(remove_expired) -- when set, makes
+  the attention line disappear when it's expired. (Note that
+  when attention line is removed the text in the chat window is
+  shifted to fill the gap which may be visually disturbing.)
+  This flag is off by default.
+
+There's almost no sense to use removal of expired attention line
+along with its immediate expiration.
+
+Visual appearance is controlled by a set of Tk option database
+parameters:
+
+* Chat.attentionLineHeight -- controls the thickness (in pixels)
+  of the attention line. (Note that some amount of white space
+  is added above and below the attention line by the text widget
+  which draws the attention line.)
+  The default value is 1.
+ 
+* Chat.attentionLineColor -- color of the attention line. Can
+  be specified in any form described in [4].
+  The default value is "red".
+
+* Chat.attentionLinePadX -- amount of extra white space to pad
+  the attention line from left and right.
+  The default value is 5.
+
+* Chat.attentionLinePadY -- amount of extra white space to pad
+  the attention line above and below.
+  The default value is 0.
+
+Example:
+
+# Expire attention line after 5 seconds of attending
+# the chat window:
+set ::plugins::attline::options(expires_after) 5000
+
+# Make attention line green-coloured:
+option add *Chat.attentionLineColor green
+
+
+IV. Limitations.
+
+The attention line mechanism doesn't take into account the
+actual number of unread messages that exist in the chat window
+when you switch into it: after the expiration timeout is over
+the chat window is considered read no matter whether you have
+actually seen any unread messages. You can use the "chat
+bookmarks" builtin facility to attach a bookmark to any message
+in a chat window (this action can be accessed from the context
+menu of the widget that renders chat messages).
+
+
+V. Links
+
+1. http://www.tcl.tk/man/tcl8.4/TkCmd/event.htm
+2. http://www.tcl.tk/man/tcl8.4/TkCmd/bind.htm
+3. http://www.tcl.tk/man/tcl8.4/TkCmd/option.htm
+4. http://www.tcl.tk/man/tcl8.4/TkLib/GetColor.htm
+
+
+# vim:tw=64:noet


Property changes on: trunk/tkabber-plugins/attline/README
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: trunk/tkabber-plugins/attline/TODO
===================================================================
--- trunk/tkabber-plugins/attline/TODO	2007-11-13 18:28:58 UTC (rev 1312)
+++ trunk/tkabber-plugins/attline/TODO	2007-11-14 18:43:51 UTC (rev 1313)
@@ -3,20 +3,8 @@
 * Remove att. line when a buffer marked as read loses focus
   instead of moving it to the bottom may be?
 
-* Test removal of expired line.
-
-* Test and re-test the code after various conditions.
-
-* Write ChangeLog, INSTALL, README, etc. files.
-
-* Remove references to [assert] since starpacks don't have it.
-
-WIBNIs:
-
-* Check whether the att. line can be made even thinner.
-
 * Calculation of line width isn't quite correct: left padding
   seems to be more than right.
 
-* Get rid of "accessor" proc since only one is finally needed.
+* Check whether the att. line can be made even thinner.
 

Modified: trunk/tkabber-plugins/ctcomp/README
===================================================================
--- trunk/tkabber-plugins/ctcomp/README	2007-11-13 18:28:58 UTC (rev 1312)
+++ trunk/tkabber-plugins/ctcomp/README	2007-11-14 18:43:51 UTC (rev 1313)
@@ -284,6 +284,22 @@
 
 IV. Limitations and bugs
 
+Default keybindings <C-n> and <C-p> used by this plugin
+effectively "hijack" the same keybindings built into the chat
+input windows (they are used for moving forth and back through
+the history of outgoing messages). The <C-up> and <C-down>
+keybindings can be used for the input history management but if
+you want to continue using <C-n> and <C-p> for this while using
+this plugin, you should unbind <C-n> and <C-p> from the ctcomp
+plugin (and possibly bind the relevant actions to some other
+combinations of keys), like this:
+# Take <C-n> and <C-p> away from ctcomp:
+event delete <<ChatTextCompNext>> <Control-n>
+event delete <<ChatTextCompPrev>> <Control-p>
+# Use <M-n> and <M-p> to do the same actions:
+event add <<ChatTextCompNext>> <Alt-n>
+event add <<ChatTextCompPrev>> <Alt-p>
+
 No "automatic" completion ("propose completions as I type" found
 in certain text editing tools like Writer from the OpenOffice.org
 suite or some mobile phones) is not possible.



More information about the Tkabber-dev mailing list