now_listen. correct disconnecting from chat control

This commit is contained in:
Denis Fomin
2011-10-17 20:13:08 +03:00
parent cebc539c08
commit 6a8c6cad65

View File

@@ -95,6 +95,8 @@ class Base(object):
self.chat_control.handlers[self.id_] = self.chat_control.msg_textview
def disconnect_from_chat_control(self):
if self.id_ not in self.chat_control.handlers:
return
if self.chat_control.handlers[self.id_].handler_is_connected(self.id_):
self.chat_control.handlers[self.id_].disconnect(self.id_)
del self.chat_control.handlers[self.id_]