changeset 2f30fb341de4 in /home/hg/repos/gajim
branches: gtk3
details:http://hg.gajim.org/gajim?cmd=changeset;node=2f30fb341de4
description: don't enable register button in disco when we select the server line
diffstat:
src/disco.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 322e3a542b4b -r 2f30fb341de4 src/disco.py
--- a/src/disco.py Thu Mar 14 12:45:53 2013 +0100
+++ b/src/disco.py Thu Mar 14 12:47:49 2013 +0100
@@ -1531,15 +1531,18 @@
self.execute_button.set_sensitive(True)
if self.search_button and nbxmpp.NS_SEARCH in features:
self.search_button.set_sensitive(True)
- if self.register_button and nbxmpp.NS_REGISTER in features:
+ # Don't autorize to register with a server via disco
+ if self.register_button and nbxmpp.NS_REGISTER in features and \
+ jid != self.jid:
# We can register this agent
registered_transports = []
jid_list = gajim.contacts.get_jid_list(self.account)
- for jid in jid_list:
+ for jid_ in jid_list:
contact = gajim.contacts.get_first_contact_from_jid(
- self.account, jid)
+ self.account, jid_)
if _('Transports') in contact.groups:
- registered_transports.append(jid)
+ registered_transports.append(jid_)
+ registered_transports.append(self.jid)
if jid in registered_transports:
self.register_button.set_label(_('_Edit'))
else: