[Tkabber-dev] r1718 - in trunk/tkabber-plugins: . whiteboard

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 13 15:00:38 MSK 2009


Author: sergei
Date: 2009-03-13 15:00:38 +0300 (Fri, 13 Mar 2009)
New Revision: 1718

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/whiteboard/svgrender.tcl
   trunk/tkabber-plugins/whiteboard/whiteboard.tcl
Log:
	* whiteboard/svgrender.tcl, whiteboard/whiteboard.tcl: Fixed cid: URI
	  usage.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2009-03-13 08:08:20 UTC (rev 1717)
+++ trunk/tkabber-plugins/ChangeLog	2009-03-13 12:00:38 UTC (rev 1718)
@@ -1,3 +1,8 @@
+2009-03-13  Sergei Golovan <sgolovan at nes.ru>
+
+	* whiteboard/svgrender.tcl, whiteboard/whiteboard.tcl: Fixed cid: URI
+	  usage.
+
 2009-03-12  Sergei Golovan <sgolovan at nes.ru>
 
 	* whiteboard/svgrender.tcl, whiteboard/whiteboard.tcl: Switched to

Modified: trunk/tkabber-plugins/whiteboard/svgrender.tcl
===================================================================
--- trunk/tkabber-plugins/whiteboard/svgrender.tcl	2009-03-13 08:08:20 UTC (rev 1717)
+++ trunk/tkabber-plugins/whiteboard/svgrender.tcl	2009-03-13 12:00:38 UTC (rev 1718)
@@ -409,8 +409,13 @@
 
     # Works only with BOB data included in the same XMPP stanza
     set cid [::xmpp::xml::getAttr $attrs http://www.w3.org/1999/xlink:href]
-    lassign [::xmpp::bob::get $cid] type data
 
+    if {[string first cid: $cid] != 0} {
+	return
+    }
+
+    lassign [::xmpp::bob::get [string range $cid 4 end]] type data
+
     if {![info exists data] || $data == ""} {
 	return ""
     }

Modified: trunk/tkabber-plugins/whiteboard/whiteboard.tcl
===================================================================
--- trunk/tkabber-plugins/whiteboard/whiteboard.tcl	2009-03-13 08:08:20 UTC (rev 1717)
+++ trunk/tkabber-plugins/whiteboard/whiteboard.tcl	2009-03-13 12:00:38 UTC (rev 1718)
@@ -1251,7 +1251,7 @@
     
     set id [create_id]
     set attrs [list id $id x $image_info(x) y $image_info(y) \
-		    type $type xlink:href $cid]
+		    type $type xlink:href cid:$cid]
 
     set tag [::xmpp::xml::create image -attrs $attrs]
 



More information about the Tkabber-dev mailing list