some Jabber servers doesn't understand http://jabber.org/protocol/disco#items (jabber.sk don't) so use jabber:iq:browse instead
This commit is contained in:
parent
17f66ed851
commit
db3d8e5e56
|
@ -772,12 +772,7 @@ class GajimCore:
|
|||
#('REQ_AGENTS', account, ())
|
||||
elif ev[0] == 'REQ_AGENTS':
|
||||
config = self.cfgParser.__getattr__(ev[1])
|
||||
#do we need that ?
|
||||
#con.discoverInfo(config['hostname'])
|
||||
agents = con.discoverItems(config['hostname'])
|
||||
self.hub.sendPlugin('AGENTS', ev[1], agents)
|
||||
for agent in agents:
|
||||
self.request_infos(ev[1], con, agent['jid'])
|
||||
self.request_infos(ev[1], con, config['hostname'])
|
||||
#('REG_AGENT_INFO', account, agent)
|
||||
elif ev[0] == 'REG_AGENT_INFO':
|
||||
con.requestRegInfo(ev[2])
|
||||
|
|
|
@ -966,9 +966,8 @@ class browseAgent_Window:
|
|||
"""When we recieve informations about an agent"""
|
||||
model = self.treeview.get_model()
|
||||
iter = model.get_iter_root()
|
||||
if not iter:
|
||||
return
|
||||
while (1):
|
||||
expand = 0
|
||||
while (iter):
|
||||
if agent == model.get_value(iter, 1):
|
||||
break
|
||||
if model.iter_has_child(iter):
|
||||
|
@ -978,7 +977,9 @@ class browseAgent_Window:
|
|||
iter = model.iter_parent(iter)
|
||||
iter = model.iter_next(iter)
|
||||
if not iter:
|
||||
return
|
||||
iter = model.append(None, (agent, agent))
|
||||
self.agent_infos[agent] = {'features' : []}
|
||||
expand = 1
|
||||
self.agent_infos[agent]['features'] = features
|
||||
if len(identities):
|
||||
self.agent_infos[agent]['identities'] = identities
|
||||
|
@ -987,6 +988,8 @@ class browseAgent_Window:
|
|||
for item in items:
|
||||
model.append(iter, (item['name'], item['jid']))
|
||||
self.agent_infos[item['jid']] = {'identities': [item]}
|
||||
if expand:
|
||||
self.treeview.expand_row((model.get_path(iter)), False)
|
||||
|
||||
def on_refresh(self, widget):
|
||||
"""When refresh button is clicked :
|
||||
|
|
Loading…
Reference in New Issue