primitivus, wix: auto-display MUC dialog after it has been joined:

- a patch will follow to add a parameter for the user to choose between "always open", "never open" and "ask each time".
This commit is contained in:
souliane 2013-10-28 18:29:34 +01:00
commit cac3cd810f

View file

@ -166,8 +166,24 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
if _present:
self.Insert(_present, gp_idx+1, contact)
def setSpecial(self, special_jid, special_type):
QuickContactList.setSpecial(self, special_jid, special_type)
def setSpecial(self, special_jid, special_type, show=False):
"""Set entity as a special
@param jid: jid of the entity
@param _type: special type (e.g.: "MUC")
@param show: True to display the dialog to chat with this entity
"""
QuickContactList.setSpecial(self, special_jid, special_type, show)
if show:
self._showDialog(special_jid)
def _showDialog(self, jid):
"""Show the dialog associated to the given jid."""
indexes = self.__find_idx(jid)
if not indexes:
return
self.DeselectAll()
self.SetSelection(indexes[0])
self.onActivated(wx.MouseEvent())
def remove(self, contact):
"""remove a contact from the list"""