[Tkabber-dev] r1562 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Oct 19 14:28:56 MSD 2008


Author: sergei
Date: 2008-10-19 14:28:55 +0400 (Sun, 19 Oct 2008)
New Revision: 1562

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/login.tcl
   trunk/tkabber/privacy.tcl
Log:
	* login.tcl: Use non-modal dialog when stream error is incoming.

	* privacy.tcl: Break the procedure of querying privacy lists items
	  when its result is "abort". This helps to cleanup lists on
	  disconnect.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-10-19 07:55:31 UTC (rev 1561)
+++ trunk/tkabber/ChangeLog	2008-10-19 10:28:55 UTC (rev 1562)
@@ -27,6 +27,12 @@
 	   (::xmpp::jid::node, ::xmpp::jid::server, ::xmpp::jid::resource,
 	   ::xmpp::jid::stripResource, ::xmpp::jid::normalize).
 
+	* login.tcl: Use non-modal dialog when stream error is incoming.
+
+	* privacy.tcl: Break the procedure of querying privacy lists items
+	  when its result is "abort". This helps to cleanup lists on
+	  disconnect.
+
 2008-10-18  Sergei Golovan  <sgolovan at nes.ru>
 
 	* presence.tcl: Fixed sending directed presence.

Modified: trunk/tkabber/login.tcl
===================================================================
--- trunk/tkabber/login.tcl	2008-10-19 07:55:31 UTC (rev 1561)
+++ trunk/tkabber/login.tcl	2008-10-19 10:28:55 UTC (rev 1562)
@@ -821,8 +821,8 @@
 	}
     }
 
-    MessageDlg .client_error -aspect 50000 -icon error \
-	-message $message -type user -buttons ok -default 0 -cancel 0
+    NonmodalMessageDlg .client_error -aspect 50000 -icon error \
+				     -message $message
 }
 
 # TODO

Modified: trunk/tkabber/privacy.tcl
===================================================================
--- trunk/tkabber/privacy.tcl	2008-10-19 07:55:31 UTC (rev 1561)
+++ trunk/tkabber/privacy.tcl	2008-10-19 10:28:55 UTC (rev 1562)
@@ -1022,8 +1022,11 @@
 	    -command [list [namespace current]::get_items $xlib]
 
 	vwait [namespace current]::litems($xlib)
+	lassign $litems($xlib) res ritems
 
-	foreach item $litems($xlib) {
+	if {$res == "abort"} return
+
+	foreach item $ritems {
 	    ::xmpp::xml::split $item tag xmlns attrs cdata subels
 	    catch { array unset tmp }
 	    array set tmp $attrs
@@ -1050,7 +1053,7 @@
     variable litems
 
     if {$res != "ok"} {
-	set litems($xlib) {}
+	set litems($xlib) [list $res {}]
 	return
     }
 
@@ -1058,9 +1061,9 @@
     ::xmpp::xml::split [lindex $subels 0] tag xmlns attrs cdata subels
 
     if {$tag == "list"} {
-	set litems($xlib) $subels
+	set litems($xlib) [list ok $subels]
     } else {
-	set litems($xlib) {}
+	set litems($xlib) [list ok {}]
     }
 }
 



More information about the Tkabber-dev mailing list