Allow to close private chat

This commit is contained in:
Marco Pesenti Gritti 2006-04-26 17:05:05 -04:00
parent 50183927d0
commit 06680398a9

View File

@ -172,6 +172,10 @@ class BuddyChat(Chat):
self._act_name = "Chat: %s" % buddy.nick() self._act_name = "Chat: %s" % buddy.nick()
Chat.__init__(self, controller) Chat.__init__(self, controller)
def activity_on_connected_to_shell(self):
Chat.activity_on_connected_to_shell(self)
self.activity_set_can_close(True)
def recv_message(self, msg): def recv_message(self, msg):
Chat.recv_message(self, self._buddy, msg) Chat.recv_message(self, self._buddy, msg)
@ -189,6 +193,10 @@ class BuddyChat(Chat):
success = False success = False
self._local_message(success, msg) self._local_message(success, msg)
def activity_on_close_from_user(self):
Chat.activity_on_close_from_user(self)
self._buddy.set_chat(None)
class ChatRequestHandler(object): class ChatRequestHandler(object):
def __init__(self, parent): def __init__(self, parent):
self._parent = parent self._parent = parent