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:
parent
d792723caa
commit
cac3cd810f
1 changed files with 53 additions and 24 deletions
|
|
@ -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"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue