[Tkabber-dev] r1387 - in trunk/tkabber: . plugins/chat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 7 12:20:22 MSK 2008


Author: sergei
Date: 2008-03-07 12:20:21 +0300 (Fri, 07 Mar 2008)
New Revision: 1387

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/chat/draw_xhtml_message.tcl
Log:
	* plugins/chat/draw_xhtml_message.tcl: Fixed a bug with xhtml_symb tag
	  which was introduced when removing global font variable.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-03-06 20:03:43 UTC (rev 1386)
+++ trunk/tkabber/ChangeLog	2008-03-07 09:20:21 UTC (rev 1387)
@@ -1,3 +1,8 @@
+2008-03-07  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/chat/draw_xhtml_message.tcl: Fixed a bug with xhtml_symb tag
+	  which was introduced when removing global font variable.
+
 2008-03-06  Sergei Golovan  <sgolovan at nes.ru>
 
 	* disco.tcl: Added new hook disco_node_reply_hook to allow answering

Modified: trunk/tkabber/plugins/chat/draw_xhtml_message.tcl
===================================================================
--- trunk/tkabber/plugins/chat/draw_xhtml_message.tcl	2008-03-06 20:03:43 UTC (rev 1386)
+++ trunk/tkabber/plugins/chat/draw_xhtml_message.tcl	2008-03-07 09:20:21 UTC (rev 1387)
@@ -356,30 +356,28 @@
 	set fweight bold
 	if {$state(slant)} {
 	    set fslant i
-	    set font boldItalicFont
+	    set fnt boldItalicFont
 	} else {
 	    set fslant r
-	    set font boldFont
+	    set fnt boldFont
 	}
     } else {
 	set fweight normal
 	if {$state(slant)} {
 	    set fslant i
-	    set font italicFont
+	    set fnt italicFont
 	} else {
 	    set fslant r
-	    set font font
+	    set fnt $::font
 	}
     }
     # TODO: use different sizes
     set fsize $state(size)
     set font_tag tag_font_${fsize}_${fslant}_${fweight}
-    $chatw tag configure $font_tag -font $font
+    $chatw tag configure $font_tag -font $fnt
     lappend tags $font_tag
     $chatw tag lower $font_tag xhtml_symb
-    
 
-
     return $tags
 }
 
@@ -399,3 +397,11 @@
     return $tag
 }
 
+proc xhtml::setup_xhtml_tags {chatid type} {
+    set cw [::chat::chat_win $chatid]
+    $cw tag configure xhtml_symb -font $::font
+    $cw tag raise xhtml_symb
+}
+
+hook::add open_chat_post_hook [namespace current]::xhtml::setup_xhtml_tags
+



More information about the Tkabber-dev mailing list