[Tkabber-dev] r209 - in trunk/plugins: . urgent

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Apr 8 04:07:44 MSD 2009


Author: kostix
Date: 2009-04-08 04:07:44 +0400 (Wed, 08 Apr 2009)
New Revision: 209

Modified:
   trunk/plugins/
   trunk/plugins/urgent/INSTALL
   trunk/plugins/urgent/urgent.tcl
Log:
Backport fix made on "plugins-0.11.1" branch in rev 208



Property changes on: trunk/plugins
___________________________________________________________________
Added: svn:mergeinfo
   + /branches/plugins-0.11.1:208


Property changes on: trunk/plugins/urgent/INSTALL
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /branches/plugins-0.11.1/urgent/INSTALL:208

Modified: trunk/plugins/urgent/urgent.tcl
===================================================================
--- trunk/plugins/urgent/urgent.tcl	2009-04-07 23:39:39 UTC (rev 208)
+++ trunk/plugins/urgent/urgent.tcl	2009-04-08 00:07:44 UTC (rev 209)
@@ -104,13 +104,17 @@
     xclientwinid $tkwin
 }
 
+proc urgent::initialize {chatid type} {
+    variable state
+    set state(active,$chatid) false
+}
+
 proc urgent::record_xwinid {chatid _type} {
     variable state
     set state(xwinid,$chatid) [xwinid $chatid]
-    set state(active,$chatid) false
 }
 
-proc urgent::forget_xwinid {chatid} {
+proc urgent::cleanup {chatid} {
     variable state
 
     unset state(xwinid,$chatid)
@@ -165,8 +169,9 @@
 	}
     }]
 
+    hook::add open_chat_pre_hook [namespace current]::initialize
     hook::add open_chat_post_hook [namespace current]::record_xwinid 40
-    hook::add close_chat_post_hook [namespace current]::forget_xwinid
+    hook::add close_chat_post_hook [namespace current]::cleanup
     hook::add draw_message_hook [namespace current]::chat_message_notify 19
     hook::add got_focus_hook [namespace current]::clear_urgency_hint
 }



More information about the Tkabber-dev mailing list