[Tkabber-dev] r1660 - in trunk/tkabber: . plugins/roster

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 15 00:47:23 MSK 2009


Author: sergei
Date: 2009-02-15 00:47:23 +0300 (Sun, 15 Feb 2009)
New Revision: 1660

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/roster/metacontacts.tcl
Log:
	* plugins/roster/metacontacts.tcl: Fixed bug with deleting user from a
	  metacontact.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-02-14 21:32:19 UTC (rev 1659)
+++ trunk/tkabber/ChangeLog	2009-02-14 21:47:23 UTC (rev 1660)
@@ -20,6 +20,9 @@
 
 	* msgs/de.msg: Updated German translation (thanks to Roger Sondermann).
 
+	* plugins/roster/metacontacts.tcl: Fixed bug with deleting user from a
+	  metacontact.
+
 2009-02-13  Sergei Golovan  <sgolovan at nes.ru>
 
 	* muc.tcl: Move focus and scroll down to 'add new JID' field in MUC

Modified: trunk/tkabber/plugins/roster/metacontacts.tcl
===================================================================
--- trunk/tkabber/plugins/roster/metacontacts.tcl	2009-02-14 21:32:19 UTC (rev 1659)
+++ trunk/tkabber/plugins/roster/metacontacts.tcl	2009-02-14 21:47:23 UTC (rev 1660)
@@ -60,6 +60,14 @@
 
 	set contacts($xlib,jids,$tag) $jids
 
+	foreach idx [array names contacts $xlib,tag,*] {
+	    if {[set idx1 [lsearch -exact $contacts($idx) $tag]] >= 0} {
+		set contacts($idx) [lreplace $contacts($idx) $idx1 $idx1]
+		if {[llength $contacts($idx)] == 0} {
+		    unset contacts($idx)
+		}
+	    }
+	}
 	foreach jid $jids {
 	    lappend contacts($xlib,tag,$jid) $tag
 	    set contacts($xlib,tag,$jid) [lsort -unique $contacts($xlib,tag,$jid)]



More information about the Tkabber-dev mailing list