| ... |
... |
@@ -342,8 +342,9 @@ class ServicesCache: |
|
342
|
342
|
# Some services list it in features and respond to
|
|
343
|
343
|
# NS_DISCO_ITEMS anyways.
|
|
344
|
344
|
# Allow browsing for unknown types as well.
|
|
345
|
|
- if (not features and not identities) or \
|
|
346
|
|
- nbxmpp.NS_DISCO_ITEMS in features or nbxmpp.NS_BROWSE in features:
|
|
|
345
|
+ if ((not features and not identities) or
|
|
|
346
|
+ nbxmpp.NS_DISCO_ITEMS in features or
|
|
|
347
|
+ nbxmpp.NS_BROWSE in features):
|
|
347
|
348
|
return ToplevelAgentBrowser
|
|
348
|
349
|
return None
|
|
349
|
350
|
|
| ... |
... |
@@ -1038,7 +1039,7 @@ class AgentBrowser: |
|
1038
|
1039
|
if not items:
|
|
1039
|
1040
|
if not self.window.address_comboboxtext:
|
|
1040
|
1041
|
# We can't travel anywhere else.
|
|
1041
|
|
- self.window.destroy()
|
|
|
1042
|
+ self.window.window.destroy()
|
|
1042
|
1043
|
ErrorDialog(_('The service is not browsable'),
|
|
1043
|
1044
|
_('This service does not contain any items '
|
|
1044
|
1045
|
'to browse.'),
|
| ... |
... |
@@ -1405,8 +1406,8 @@ class ToplevelAgentBrowser(AgentBrowser): |
|
1405
|
1406
|
if self.search_button and nbxmpp.NS_SEARCH in features:
|
|
1406
|
1407
|
self.search_button.set_sensitive(True)
|
|
1407
|
1408
|
# Don't authorize to register with a server via disco
|
|
1408
|
|
- if self.register_button and nbxmpp.NS_REGISTER in features and \
|
|
1409
|
|
- jid != self.jid:
|
|
|
1409
|
+ if (self.register_button and nbxmpp.NS_REGISTER in features and
|
|
|
1410
|
+ jid != self.jid):
|
|
1410
|
1411
|
# We can register this agent
|
|
1411
|
1412
|
registered_transports = []
|
|
1412
|
1413
|
jid_list = app.contacts.get_jid_list(self.account)
|
| ... |
... |
@@ -1766,7 +1767,7 @@ class MucBrowser(AgentBrowser): |
|
1766
|
1767
|
else:
|
|
1767
|
1768
|
window.set_room(service)
|
|
1768
|
1769
|
window.present()
|
|
1769
|
|
- self.window.destroy()
|
|
|
1770
|
+ self.window.window.destroy()
|
|
1770
|
1771
|
|
|
1771
|
1772
|
def update_actions(self):
|
|
1772
|
1773
|
sens = \
|
| ... |
... |
@@ -1862,8 +1863,8 @@ class MucBrowser(AgentBrowser): |
|
1862
|
1863
|
name = identities[0].name or ''
|
|
1863
|
1864
|
for form in data:
|
|
1864
|
1865
|
typefield = form.vars.get('FORM_TYPE')
|
|
1865
|
|
- if typefield and typefield.value == \
|
|
1866
|
|
- 'http://jabber.org/protocol/muc#roominfo':
|
|
|
1866
|
+ if (typefield and typefield.value ==
|
|
|
1867
|
+ 'http://jabber.org/protocol/muc#roominfo'):
|
|
1867
|
1868
|
# Fill model row from the form's fields
|
|
1868
|
1869
|
users = form.vars.get('muc#roominfo_occupants')
|
|
1869
|
1870
|
descr = form.vars.get('muc#roominfo_description')
|