[Tkabber-dev] r814 - in trunk/tkabber: . plugins/richtext

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Nov 29 09:49:09 MSK 2006


Author: sergei
Date: 2006-11-29 09:49:06 +0300 (Wed, 29 Nov 2006)
New Revision: 814

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/richtext/chatlog.tcl
   trunk/tkabber/plugins/richtext/emoticons.tcl
   trunk/tkabber/plugins/richtext/highlight.tcl
   trunk/tkabber/plugins/richtext/stylecodes.tcl
Log:
	* plugins/richtext/stylecodes.tcl, plugins/richtext/emoticons.tcl:
	  Swapped priorities to make emoticons pluging move first (thanks
	  to Konstantin Khomoutov).

	* plugins/richtext/chatlog.tcl, plugins/richtext/highlight.tcl:
	  Replaced chatlog for highlight richtext entity in chatlog.tcl
	  because two plugins defined highlight entity (thanks to
	  Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-11-27 21:14:01 UTC (rev 813)
+++ trunk/tkabber/ChangeLog	2006-11-29 06:49:06 UTC (rev 814)
@@ -1,3 +1,14 @@
+2006-11-29  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/richtext/stylecodes.tcl, plugins/richtext/emoticons.tcl:
+	  Swapped priorities to make emoticons pluging move first (thanks
+	  to Konstantin Khomoutov).
+
+	* plugins/richtext/chatlog.tcl, plugins/richtext/highlight.tcl:
+	  Replaced chatlog for highlight richtext entity in chatlog.tcl
+	  because two plugins defined highlight entity (thanks to
+	  Konstantin Khomoutov).
+
 2006-11-27  Sergei Golovan  <sgolovan at nes.ru>
 
 	* chats.tcl: Fixed error messages processing.

Modified: trunk/tkabber/plugins/richtext/chatlog.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/chatlog.tcl	2006-11-27 21:14:01 UTC (rev 813)
+++ trunk/tkabber/plugins/richtext/chatlog.tcl	2006-11-29 06:49:06 UTC (rev 814)
@@ -1,26 +1,17 @@
 # $Id: chatlog.tcl 18 2006-10-24 00:38:28Z kostix $
 # This is a (pretty much eclectic) framework to support various highlights
-# in chat messages. It registers a rich text entity "highlight" and provides
+# in chat messages. It registers a rich text entity "chatlog" and provides
 # for configuring a text widget to be ready to display highlights.
 # On the other hand, detection of such highlights is done elsewhere -- in the
 # already existing bits of code (that is, handling /me messages, server messages,
 # MUC subjects, etc). There are plans to eventually move such code to
 # this "chatlog" plugin.
+# NOTE that "real" configurable chat highlights are handled by the
+# highlights.tcl rich text plugin.
 
 namespace eval chatlog {
 }
 
-# These procs are here just for the reference.
-# Also, neither parser nor renderer are registered for the "highlight"
-# richtext entity (to speedup message processing).
-if 0 {
-    proc chatlog::process_highlights {atLevel accName} {
-    }
-
-    proc chatlog::render_highlight {w type piece tags} {
-    }
-}
-
 # This proc provides for reconfiguration of the chatlog tags.
 # It is intended to be used for post-configuration of the rich text
 # widgets when creating them to server as chat log windows,
@@ -67,13 +58,13 @@
     $w tag configure server
     $w tag configure info
     $w tag configure err
-    $w tag configure highlight
 }
 
 namespace eval chatlog {
-    ::richtext::register_entity highlight \
+    ::richtext::register_entity chatlog \
 	-configurator [namespace current]::configure_richtext_widget
 
-    ::richtext::entity_state highlight 1
+    ::richtext::entity_state chatlog 1
 }
 
+# vim:ts=8:sw=4:sts=4:noet

Modified: trunk/tkabber/plugins/richtext/emoticons.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/emoticons.tcl	2006-11-27 21:14:01 UTC (rev 813)
+++ trunk/tkabber/plugins/richtext/emoticons.tcl	2006-11-29 06:49:06 UTC (rev 814)
@@ -627,7 +627,7 @@
 	-configurator [namespace current]::configure_richtext_widget \
 	-parser [namespace current]::process_emoticons \
 	-renderer [namespace current]::render_emoticon \
-	-parser-priority 80
+	-parser-priority 70
 	
 }
 

Modified: trunk/tkabber/plugins/richtext/highlight.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/highlight.tcl	2006-11-27 21:14:01 UTC (rev 813)
+++ trunk/tkabber/plugins/richtext/highlight.tcl	2006-11-29 06:49:06 UTC (rev 814)
@@ -31,6 +31,9 @@
 }
 
 proc highlight::configure_richtext_widget {w} {
+    # TODO some defaults may be?
+
+    $w tag configure highlight
 }
 
 proc highlight::process_highlights {atLevel accVar} {

Modified: trunk/tkabber/plugins/richtext/stylecodes.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/stylecodes.tcl	2006-11-27 21:14:01 UTC (rev 813)
+++ trunk/tkabber/plugins/richtext/stylecodes.tcl	2006-11-29 06:49:06 UTC (rev 814)
@@ -218,8 +218,9 @@
 	-configurator [namespace current]::configure_richtext_widget \
 	-parser [namespace current]::process_stylecodes \
 	-renderer [namespace current]::render_stylecode \
-	-parser-priority 70
+	-parser-priority 80
 
     ::richtext::entity_state stylecode 1
 }
 
+# vim:ts=8:sts=4:sw=4:noet



More information about the Tkabber-dev mailing list