Connection/disconnection signals
- wix, sortilege: management of this new signals /!\ sortilege is bugged, the contact list window is not updated correctly
This commit is contained in:
parent
3b2d29b632
commit
cf6075208a
1 changed files with 65 additions and 12 deletions
|
|
@ -45,6 +45,7 @@ from quick_frontend.quick_contact_list import QuickContactList
|
|||
from quick_frontend.quick_app import QuickApp
|
||||
from quick_frontend.quick_contact_management import QuickContactManagement
|
||||
|
||||
|
||||
### logging configuration FIXME: put this elsewhere ###
|
||||
logging.basicConfig(level=logging.CRITICAL, #TODO: configure it top put messages in a log file
|
||||
format='%(message)s')
|
||||
|
|
@ -78,7 +79,6 @@ class ChatList(QuickChatList):
|
|||
self.sizer.update()
|
||||
return chat
|
||||
|
||||
|
||||
class ContactList(Window, QuickContactList):
|
||||
|
||||
def __init__(self, host, CM):
|
||||
|
|
@ -101,6 +101,12 @@ class ContactList(Window, QuickContactList):
|
|||
def registerEnterCB(self, CB):
|
||||
self.__enterCB=CB
|
||||
|
||||
def clear_contacts(self):
|
||||
"""clear all the contact list"""
|
||||
del self.jid_list[:]
|
||||
self.__index = 0
|
||||
self.update() #FIXME: window is not updated correctly (contacts are still here until C-L)
|
||||
|
||||
def replace(self, jid):
|
||||
"""add a contact to the list"""
|
||||
name = self.CM.getAttr(jid,'name')
|
||||
|
|
@ -256,7 +262,7 @@ class SortilegeApp(QuickApp):
|
|||
def onContactChoosed(self, jid_txt):
|
||||
"""Called when a contact is selected in contact list."""
|
||||
jid=JID(jid_txt)
|
||||
debug ("contact choose: %s", jid)
|
||||
debug ("contact choosed: %s", jid)
|
||||
self.showChat(jid.short)
|
||||
self.statusBar.remove_item(jid.short)
|
||||
if len(self.statusBar)==0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue