[Tkabber-dev] r1709 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Mar 11 09:14:50 MSK 2009


Author: sergei
Date: 2009-03-11 09:14:50 +0300 (Wed, 11 Mar 2009)
New Revision: 1709

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/custom.tcl
Log:
	* custom.tcl: Fixed duplicates in customization groups. This is useful
	  if a config variable could be added several times on plugins
	  loading/unloading.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-10 16:02:09 UTC (rev 1708)
+++ trunk/tkabber/ChangeLog	2009-03-11 06:14:50 UTC (rev 1709)
@@ -1,3 +1,9 @@
+2009-03-11  Sergei Golovan  <sgolovan at nes.ru>
+
+	* custom.tcl: Fixed duplicates in customization groups. This is useful
+	  if a config variable could be added several times on plugins
+	  loading/unloading.
+
 2009-03-09  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/si/socks5.tcl: Removed proxy.netlabs.cz from proxies list

Modified: trunk/tkabber/custom.tcl
===================================================================
--- trunk/tkabber/custom.tcl	2009-03-10 16:02:09 UTC (rev 1708)
+++ trunk/tkabber/custom.tcl	2009-03-11 06:14:50 UTC (rev 1709)
@@ -36,7 +36,6 @@
 		set group(subgroups,$val) [lrmdups $group(subgroups,$val)]
 		lappend group(parents,$id) $val
 		set group(parents,$id) [lrmdups $group(parents,$id)]
-		#set group(members,$val) [lrmdups $group(members,$val)]
 	    }
 	    -type {
 		set group(type,$id) $val
@@ -119,8 +118,9 @@
 		set var(type,$fullname) $val
 	    }
 	    -group {
-		lappend group(members,$val) [list var $fullname]
-		#set group(members,$val) [lrmdups $group(members,$val)]
+		if {[lsearch -exact $group(members,$val) [list var $fullname]] < 0} {
+		    lappend group(members,$val) [list var $fullname]
+		}
 	    }
 	    -values {
 		set var(values,$fullname) $val



More information about the Tkabber-dev mailing list