fix GPG in zeroconf account

This commit is contained in:
Yann Leboulanger 2007-12-01 12:47:41 +00:00
parent c94d22dcb1
commit 021e8fb275
1 changed files with 5 additions and 1 deletions

View File

@ -1514,7 +1514,8 @@ class AccountsWindow:
# Personal tab
gpg_key_label = self.xml.get_widget('gpg_key_label2')
if gajim.connections[gajim.ZEROCONF_ACC_NAME].gpg:
if gajim.connections.has_key(gajim.ZEROCONF_ACC_NAME) and \
gajim.connections[gajim.ZEROCONF_ACC_NAME].gpg:
self.xml.get_widget('gpg_choose_button2').set_sensitive(True)
self.init_account_gpg()
else:
@ -2133,6 +2134,9 @@ class AccountsWindow:
# enable (will create new account if not present)
gajim.connections[gajim.ZEROCONF_ACC_NAME] = common.zeroconf.\
connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME)
if gajim.connections[gajim.ZEROCONF_ACC_NAME].gpg:
self.xml.get_widget('gpg_choose_button2').set_sensitive(True)
self.init_account_gpg()
# update variables
gajim.interface.instances[gajim.ZEROCONF_ACC_NAME] = {'infos': {},
'disco': {}, 'gc_config': {}, 'search': {}}