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, ())
|
#('REQ_AGENTS', account, ())
|
||||||
elif ev[0] == 'REQ_AGENTS':
|
elif ev[0] == 'REQ_AGENTS':
|
||||||
config = self.cfgParser.__getattr__(ev[1])
|
config = self.cfgParser.__getattr__(ev[1])
|
||||||
#do we need that ?
|
self.request_infos(ev[1], con, config['hostname'])
|
||||||
#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'])
|
|
||||||
#('REG_AGENT_INFO', account, agent)
|
#('REG_AGENT_INFO', account, agent)
|
||||||
elif ev[0] == 'REG_AGENT_INFO':
|
elif ev[0] == 'REG_AGENT_INFO':
|
||||||
con.requestRegInfo(ev[2])
|
con.requestRegInfo(ev[2])
|
||||||
|
|
|
@ -966,9 +966,8 @@ class browseAgent_Window:
|
||||||
"""When we recieve informations about an agent"""
|
"""When we recieve informations about an agent"""
|
||||||
model = self.treeview.get_model()
|
model = self.treeview.get_model()
|
||||||
iter = model.get_iter_root()
|
iter = model.get_iter_root()
|
||||||
if not iter:
|
expand = 0
|
||||||
return
|
while (iter):
|
||||||
while (1):
|
|
||||||
if agent == model.get_value(iter, 1):
|
if agent == model.get_value(iter, 1):
|
||||||
break
|
break
|
||||||
if model.iter_has_child(iter):
|
if model.iter_has_child(iter):
|
||||||
|
@ -977,8 +976,10 @@ class browseAgent_Window:
|
||||||
if not model.iter_next(iter):
|
if not model.iter_next(iter):
|
||||||
iter = model.iter_parent(iter)
|
iter = model.iter_parent(iter)
|
||||||
iter = model.iter_next(iter)
|
iter = model.iter_next(iter)
|
||||||
if not iter:
|
if not iter:
|
||||||
return
|
iter = model.append(None, (agent, agent))
|
||||||
|
self.agent_infos[agent] = {'features' : []}
|
||||||
|
expand = 1
|
||||||
self.agent_infos[agent]['features'] = features
|
self.agent_infos[agent]['features'] = features
|
||||||
if len(identities):
|
if len(identities):
|
||||||
self.agent_infos[agent]['identities'] = identities
|
self.agent_infos[agent]['identities'] = identities
|
||||||
|
@ -987,6 +988,8 @@ class browseAgent_Window:
|
||||||
for item in items:
|
for item in items:
|
||||||
model.append(iter, (item['name'], item['jid']))
|
model.append(iter, (item['name'], item['jid']))
|
||||||
self.agent_infos[item['jid']] = {'identities': [item]}
|
self.agent_infos[item['jid']] = {'identities': [item]}
|
||||||
|
if expand:
|
||||||
|
self.treeview.expand_row((model.get_path(iter)), False)
|
||||||
|
|
||||||
def on_refresh(self, widget):
|
def on_refresh(self, widget):
|
||||||
"""When refresh button is clicked :
|
"""When refresh button is clicked :
|
||||||
|
|
Loading…
Reference in New Issue