[Tkabber-dev] r1322 - in trunk/tkabber-plugins: . attline

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Nov 29 19:18:55 MSK 2007


Author: sergei
Date: 2007-11-29 19:18:54 +0300 (Thu, 29 Nov 2007)
New Revision: 1322

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/attline/attline.tcl
Log:
	* attline/attline.tcl: Fixed crash after closing chat tab/window
	  before attline is expired if option 'remove expired attline' is
	  turned on (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2007-11-28 12:52:51 UTC (rev 1321)
+++ trunk/tkabber-plugins/ChangeLog	2007-11-29 16:18:54 UTC (rev 1322)
@@ -1,3 +1,9 @@
+2007-11-29  Sergei Golovan <sgolovan at nes.ru>
+
+	* attline/attline.tcl: Fixed crash after closing chat tab/window
+	  before attline is expired if option 'remove expired attline' is
+	  turned on (thanks to Konstantin Khomoutov).
+
 2007-11-25  Sergei Golovan <sgolovan at nes.ru>
 
 	* latex/latex.tcl: use [winfo rgb] to get RGB color instead of

Modified: trunk/tkabber-plugins/attline/attline.tcl
===================================================================
--- trunk/tkabber-plugins/attline/attline.tcl	2007-11-28 12:52:51 UTC (rev 1321)
+++ trunk/tkabber-plugins/attline/attline.tcl	2007-11-29 16:18:54 UTC (rev 1322)
@@ -72,8 +72,10 @@
     variable state
     set cw [chat::chat_win $chatid]
     set iw [chat::input_win $chatid]
+    set winid [chat::winid $chatid]
 
-    set state($cw,mainwindow) [chat::winid $chatid]
+    set state($cw,mainwindow) $winid
+    set state($winid,chatwindow) $cw
 
     #unread $cw [expr {![has_focus $chatid]}]
     unread $cw false
@@ -83,11 +85,14 @@
     return
 }
 
-proc attline::cleanup w {
-    cancel_atline_expiration $w
+proc attline::cleanup winid {
+    variable state
 
-    variable state
-    array unset state $w,*
+    set cw $state($winid,chatwindow)
+    cancel_atline_expiration $cw
+
+    array unset state $cw,*
+    unset state($winid,chatwindow)
 }
 
 proc attline::getopt {cw opt} {



More information about the Tkabber-dev mailing list