[Tkabber-dev] r12 - trunk/plugins/attline

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jul 12 20:22:22 MSD 2007


Author: kostix
Date: 2007-07-12 20:22:22 +0400 (Thu, 12 Jul 2007)
New Revision: 12

Modified:
   trunk/plugins/attline/TODO
   trunk/plugins/attline/attline.tcl
Log:
attline:
* attline.tcl: added ugly checking for whether ::hook::add proc uses real numbers as hook prios (introduced in rev 1149), or integers.
  If real numbers are used, the draw_message_hook handler gets prio of 5.5 (which is where it should be), or 14 otherwise.
* TODO: deleted completed tasks, added new one.


Modified: trunk/plugins/attline/TODO
===================================================================
--- trunk/plugins/attline/TODO	2007-07-10 22:13:16 UTC (rev 11)
+++ trunk/plugins/attline/TODO	2007-07-12 16:22:22 UTC (rev 12)
@@ -1,13 +1,12 @@
 $Id$
 
+* 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.
 
-* Test virtual event "see the attention line".
-
-* Move exp. timeout and removal cond. to Customize vars.
-
 * Write ChangeLog, INSTALL, README, etc. files.
 
 * Remove references to [assert] since starpacks don't have it.

Modified: trunk/plugins/attline/attline.tcl
===================================================================
--- trunk/plugins/attline/attline.tcl	2007-07-10 22:13:16 UTC (rev 11)
+++ trunk/plugins/attline/attline.tcl	2007-07-12 16:22:22 UTC (rev 12)
@@ -51,7 +51,14 @@
 	hook::add open_chat_post_hook [my draw_chat_history_separator] 101
 
 	# must perform earlier than drawing of timestamp:
-	hook::add draw_message_hook [my on_draw_message] 14
+	# TODO UGLY HACK: rev 1149 introcuced hook prios as real numbers,
+	# before they were integers. Really we should use 5.5, but we must
+	# use integer number for older revisions:
+	if {[string first -integer [info body ::hook::add]] < 0} {
+		hook::add draw_message_hook [my on_draw_message] 5.5
+	} else {
+		hook::add draw_message_hook [my on_draw_message] 14
+	}
 
 	hook::add got_focus_hook  [my on_focused]
 	hook::add lost_focus_hook [my on_lost_focus]



More information about the Tkabber-dev mailing list