SàT: multi-profile, plugins updated
- core: 2 new convenient methods: getJidNStream and getClient - new param in plugin info: "handler" to know if there is a handler to plug on profiles clients - plugins with handler now use an other class which is returned to profile client with the new method "getHandler" and pluged when connecting
This commit is contained in:
parent
7b520ddc93
commit
656bea30dd
3 changed files with 175 additions and 109 deletions
|
|
@ -133,7 +133,7 @@ class QuickApp():
|
|||
self.CM.update(from_jid, 'show', show)
|
||||
self.CM.update(from_jid, 'statuses', statuses)
|
||||
self.CM.update(from_jid, 'groups', groups)
|
||||
cache = self.bridge.getProfileCache(from_jid)
|
||||
cache = self.bridge.getCardCache(from_jid)
|
||||
if cache.has_key('nick'):
|
||||
self.CM.update(from_jid, 'nick', cache['nick'])
|
||||
if cache.has_key('avatar'):
|
||||
|
|
|
|||
|
|
@ -58,23 +58,23 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
def sendMessage(self, to, message):
|
||||
return self.db_comm_iface.sendMessage(to, message)
|
||||
|
||||
def sendFile(self, to, path):
|
||||
return self.db_comm_iface.sendFile(to, path)
|
||||
def sendFile(self, to, path, profile_key='@DEFAULT@'):
|
||||
return self.db_comm_iface.sendFile(to, path, profile_key)
|
||||
|
||||
def findGateways(self, target):
|
||||
return self.db_comm_iface.findGateways(target)
|
||||
|
||||
def getProfile(self, target):
|
||||
return self.db_comm_iface.getProfile(target)
|
||||
def getCard(self, target, profile_key='@DEFAULT@'):
|
||||
return self.db_comm_iface.getCard(target, profile_key)
|
||||
|
||||
def getProfileCache(self, target):
|
||||
return self.db_comm_iface.getProfileCache(target)
|
||||
def getCardCache(self, target):
|
||||
return self.db_comm_iface.getCardCache(target)
|
||||
|
||||
def getAvatarFile(self, hash):
|
||||
return self.db_comm_iface.getAvatarFile(hash)
|
||||
|
||||
def in_band_register(self, target):
|
||||
return self.db_comm_iface.in_band_register(target)
|
||||
def in_band_register(self, target, profile_key='@DEFAULT@'):
|
||||
return self.db_comm_iface.in_band_register(target, profile_key)
|
||||
|
||||
def setPresence(self, to="", show="", priority=0, statuses={}):
|
||||
return self.db_comm_iface.setPresence(to, show, priority, statuses)
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ class MainWindow(wx.Frame, QuickApp):
|
|||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
return
|
||||
id = self.bridge.getProfile(target.short)
|
||||
id = self.bridge.getCard(target.short)
|
||||
self.current_action_ids.add(id)
|
||||
self.current_action_ids_cb[id] = self.onProfileReceived
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue