[Tkabber-dev] r1769 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Mar 31 19:20:53 MSD 2009


Author: sergei
Date: 2009-03-31 19:20:53 +0400 (Tue, 31 Mar 2009)
New Revision: 1769

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/filetransfer.tcl
Log:
	* filetransfer.tcl: Added unregistering filetransfer trantports.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-30 19:20:52 UTC (rev 1768)
+++ trunk/tkabber/ChangeLog	2009-03-31 15:20:53 UTC (rev 1769)
@@ -1,3 +1,7 @@
+2009-03-31  Sergei Golovan  <sgolovan at nes.ru>
+
+	* filetransfer.tcl: Added unregistering filetransfer trantports.
+
 2009-03-30  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/general/session.tcl: Changed default values for saving state

Modified: trunk/tkabber/filetransfer.tcl
===================================================================
--- trunk/tkabber/filetransfer.tcl	2009-03-30 19:20:52 UTC (rev 1768)
+++ trunk/tkabber/filetransfer.tcl	2009-03-31 15:20:53 UTC (rev 1769)
@@ -24,6 +24,9 @@
 	-type string -group {File Transfer}
 
     variable winid 0
+
+    variable protocols
+    set protocols(names) {}
 }
 
 ###############################################################################
@@ -62,6 +65,16 @@
     }
 }
 
+proc ft::unregister_protocol {name} {
+    variable protocols
+
+    while {[set idx [lsearch -glob $protocols(names) [list $name *]]] >= 0} {
+	set protocols(names) [lreplace $protocols(names) $idx $idx]
+    }
+
+    array unset protocols *,$name
+}
+
 plugins::load [file join plugins filetransfer]
 
 ###############################################################################



More information about the Tkabber-dev mailing list