aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkostix <kostix@cc602e41-bd33-0410-9637-a208f32f1443>2009-04-08 00:07:44 +0000
committerkostix <kostix@cc602e41-bd33-0410-9637-a208f32f1443>2009-04-08 00:07:44 +0000
commit4b9e04299a5c788b358dcab76f104163b7738b1d (patch)
tree66e92a1ddcbfb88b6738a9b8153453d291bbf4e2
parent380273cb66966441c44d0da8c2828499f6282e40 (diff)
downloadurgent-4b9e04299a5c788b358dcab76f104163b7738b1d.tar.gz
urgent-4b9e04299a5c788b358dcab76f104163b7738b1d.tar.xz
urgent-4b9e04299a5c788b358dcab76f104163b7738b1d.zip
Backport fix made on "plugins-0.11.1" branch in rev 208
git-svn-id: http://svn.xmpp.ru/repos/tkabber-3rd-party/trunk/plugins/urgent@209 cc602e41-bd33-0410-9637-a208f32f1443
-rw-r--r--urgent.tcl11
1 files changed, 8 insertions, 3 deletions
diff --git a/urgent.tcl b/urgent.tcl
index 4242987..b886eb5 100644
--- a/urgent.tcl
+++ b/urgent.tcl
@@ -104,13 +104,17 @@ proc urgent::chat_xwinid {chatid} {
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 @@ namespace eval urgent {
}
}]
+ 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
}