[Tkabber-dev] r1273 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Oct 14 18:48:52 MSD 2007


Author: sergei
Date: 2007-10-14 18:48:51 +0400 (Sun, 14 Oct 2007)
New Revision: 1273

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
Log:
	* chats.tcl: Added a procedure which returns chat ID given its window
	  name (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-10-11 19:49:10 UTC (rev 1272)
+++ trunk/tkabber/ChangeLog	2007-10-14 14:48:51 UTC (rev 1273)
@@ -1,3 +1,8 @@
+2007-10-14  Sergei Golovan  <sgolovan at nes.ru>
+
+	* chats.tcl: Added a procedure which returns chat ID given its window
+	  name (thanks to Konstantin Khomoutov).
+
 2007-10-11  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/iface.tcl: Fixed binding of <FocusIn> and <FocusOut> to chat

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2007-10-11 19:49:10 UTC (rev 1272)
+++ trunk/tkabber/chats.tcl	2007-10-14 14:48:51 UTC (rev 1273)
@@ -147,6 +147,11 @@
     return .chat_${connid}_$tag
 }
 
+proc chat::winid_to_chatid {winid} {
+    variable chat_id
+    expr {[info exists chat_id($winid)] ? $chat_id($winid) : ""}
+}
+
 proc chat::chatid {connid jid} {
     return [list $connid $jid]
 }



More information about the Tkabber-dev mailing list