[Tkabber-dev] r137 - trunk/plugins/singularity

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 11 16:56:58 MSD 2008


Author: kostix
Date: 2008-10-11 16:56:58 +0400 (Sat, 11 Oct 2008)
New Revision: 137

Modified:
   trunk/plugins/singularity/singularity.tcl
Log:
singularity/singularity.tcl: Modified to work with the new
 [chat::close] command introduced in tkabber's mainline
 in revision 1511.


Modified: trunk/plugins/singularity/singularity.tcl
===================================================================
--- trunk/plugins/singularity/singularity.tcl	2008-09-28 20:14:19 UTC (rev 136)
+++ trunk/plugins/singularity/singularity.tcl	2008-10-11 12:56:58 UTC (rev 137)
@@ -33,25 +33,16 @@
 	set savedinput ""
 	set savedhistory [list]
 
-	if {$ifacetk::options(use_tabbar)} {
-		foreach page [.nb pages] {
-			upvar #0 chat::chat_id([ifacetk::nbpath $page]) cid 
-			if {![info exists cid] || [chat::is_groupchat $from]} continue
-			set jid [chat::get_jid $cid]
-			if {![string equal $from $jid] &&
-					[string equal $barejid [node_and_server_from_jid $jid]]} {
-				if {$savedinput != ""} { append savedinput \n }
-				append savedinput [[chat::input_win $cid] get 1.0 end-1c]
-				set savedhistory [concat $savedhistory $history(stack,$cid)]
-				eval destroy [pack slaves [.nb getframe $page]]
-				.nb delete $page 1
-				ifacetk::tab_move .nb 0
-			}
+	foreach cid [chat::opened] {
+		set jid [chat::get_jid $cid]
+		if {![string equal $from $jid] &&
+				[string equal $barejid [node_and_server_from_jid $jid]]} {
+			if {$savedinput != ""} { append savedinput \n }
+			append savedinput [[chat::input_win $cid] get 1.0 end-1c]
+			set savedhistory [concat $savedhistory $history(stack,$cid)]
+			chat::close $cid
 		}
-	} else {
-		# TODO implement this for windowed interface
 	}
-
 }
 
 proc singularity::restore_chat_context {chatid type} {



More information about the Tkabber-dev mailing list