[Tkabber-dev] r1642 - in trunk/tkabber: . ifacetk msgs plugins/roster

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Feb 9 22:39:02 MSK 2009


Author: sergei
Date: 2009-02-09 22:39:02 +0300 (Mon, 09 Feb 2009)
New Revision: 1642

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iroster.tcl
   trunk/tkabber/msgs/ru.msg
   trunk/tkabber/plugins/roster/conferences.tcl
   trunk/tkabber/roster.tcl
Log:
	* ifacetk/iroster.tcl, msgs/ru.msg, plugins/roster/conferences.tcl,
	  roster.tcl: Changed semantics of operation 'remove all users in
	  roster group'. Now all the users are removed from the roster even if
	  they are in some other groups.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-02-09 18:18:39 UTC (rev 1641)
+++ trunk/tkabber/ChangeLog	2009-02-09 19:39:02 UTC (rev 1642)
@@ -3,6 +3,11 @@
 	* utils.tcl: Made [rand $n] procedure to produce numbers uniformly
 	  distributed among integers from 0 to $n.
 
+	* ifacetk/iroster.tcl, msgs/ru.msg, plugins/roster/conferences.tcl,
+	  roster.tcl: Changed semantics of operation 'remove all users in
+	  roster group'. Now all the users are removed from the roster even if
+	  they are in some other groups.
+
 2009-02-05  Sergei Golovan  <sgolovan at nes.ru>
 
 	* custom.tcl: Store customization variables to a temporary file and

Modified: trunk/tkabber/ifacetk/iroster.tcl
===================================================================
--- trunk/tkabber/ifacetk/iroster.tcl	2009-02-09 18:18:39 UTC (rev 1641)
+++ trunk/tkabber/ifacetk/iroster.tcl	2009-02-09 19:39:02 UTC (rev 1642)
@@ -1790,7 +1790,7 @@
     set res [MessageDlg .remove_item -aspect 50000 -icon question -type user \
 		 -buttons {yes no} -default 0 -cancel 1 \
 		 -message [::msgcat::mc "Are you sure to remove all users in group '%s' from roster?\
-\n(Users which are in another groups too, will not be removed from the roster.)" $name]]
+\n(Users which are not in this groups only, will be removed from the roster as well.)" $name]]
 
     if {$res == 0} {
 	roster::send_remove_users_group $xlib $name

Modified: trunk/tkabber/msgs/ru.msg
===================================================================
--- trunk/tkabber/msgs/ru.msg	2009-02-09 18:18:39 UTC (rev 1641)
+++ trunk/tkabber/msgs/ru.msg	2009-02-09 19:39:02 UTC (rev 1642)
@@ -198,10 +198,10 @@
 ::msgcat::mcset ru "Are you sure to remove %s from roster?" "Вы действительно\
 	хотите удалить %s из контактов?"
 ::msgcat::mcset ru "Are you sure to remove all users in group '%s' from\
-	roster? \n(Users which are in another groups too, will not be removed\
-	from the roster.)" "Вы действительно хотите удалить всех, входящих в\
-	группу '%s', из контактов? \n(Контакты, которые есть не только в этой\
-	группе, не удаляются.)"
+	roster? \n(Users which are not in this group only, will be removed\
+	from the roster as well.)" "Вы действительно хотите удалить всех,\
+	входящих в группу '%s', из контактов? \n(Контакты, которые есть не\
+	только в этой группе, удаляются тоже.)"
 ::msgcat::mcset ru "Are you sure to remove group '%s' from roster?" "Удалить\
 	группу '%s' из контактов?"
 ::msgcat::mcset ru "Are you sure to remove group '%s' from roster? \n(Users\

Modified: trunk/tkabber/plugins/roster/conferences.tcl
===================================================================
--- trunk/tkabber/plugins/roster/conferences.tcl	2009-02-09 18:18:39 UTC (rev 1641)
+++ trunk/tkabber/plugins/roster/conferences.tcl	2009-02-09 19:39:02 UTC (rev 1642)
@@ -672,7 +672,7 @@
 	set jid $bookmarks($idx)
 
 	set groups $bookmarks($xlib,groups,$jid)
-	if {(([llength $groups] == 1) && [lcontain $groups $name]) || \
+	if {[lcontain $groups $name] || \
 		(($name == $roster::undef_group_name) && ($groups == {}))} {
 	    
 	    client:roster_push $xlib $jid \
@@ -688,18 +688,6 @@
 	    catch { unset bookmarks($xlib,groups,$jid) }
 	    
 	    set store 1
-	} elseif {[lcontain $groups $name]} {
-	    set idx [lsearch -exact $groups $name]
-	    set groups [lreplace $groups $idx $idx]
-	    
-	    client:roster_push $xlib $jid \
-			       -name $bookmarks($xlib,name,$jid) \
-			       -groups $groups \
-			       -subscription bookmark
-	    roster::override_category_and_subtype $xlib $jid conference ""
-	    set bookmarks($xlib,groups,$jid) $groups
-	    
-	    set store 1
 	}
     }
     if {$store} {

Modified: trunk/tkabber/roster.tcl
===================================================================
--- trunk/tkabber/roster.tcl	2009-02-09 18:18:39 UTC (rev 1641)
+++ trunk/tkabber/roster.tcl	2009-02-09 19:39:02 UTC (rev 1642)
@@ -622,13 +622,9 @@
 	}
 
 	set groups $roster(group,$xlib,$jid)
-	if {(([llength $groups] == 1) && [lcontain $groups $name]) || \
+	if {[lcontain $groups $name] || \
 		(($name == $undef_group_name) && ($groups == {}))} {
 	    remove_item $xlib $jid
-	} elseif {[lcontain $groups $name]} {
-	    set idx [lsearch -exact $groups $name]
-	    set roster(group,$xlib,$jid) [lreplace $groups $idx $idx]
-	    lappend items [item_to_xml $xlib $jid]
 	}
     }
 



More information about the Tkabber-dev mailing list