fix usage of get_per(). Fixes #7140

This commit is contained in:
Yann Leboulanger 2012-04-11 21:30:05 +02:00
parent b5c424a96f
commit 9a6519373f
3 changed files with 4 additions and 5 deletions

View File

@ -1024,7 +1024,7 @@ class Connection(CommonConnection, ConnectionHandlers):
proxy = {}
proxyptr = gajim.config.get_per('proxies', p)
for key in proxyptr.keys():
proxy[key] = proxyptr[key][1]
proxy[key] = proxyptr[key]
else:
proxy = None
use_srv = True

View File

@ -1435,7 +1435,7 @@ def get_proxy_info(account):
if not proxyptr:
return proxy
for key in proxyptr.keys():
proxy[key] = proxyptr[key][1]
proxy[key] = proxyptr[key]
return proxy
def _get_img_direct(attrs):

View File

@ -1485,8 +1485,7 @@ class ManageProxiesWindow:
gajim.config.del_per('proxies', old_name)
gajim.config.add_per('proxies', new_name)
for option in config:
gajim.config.set_per('proxies', new_name, option,
config[option][common.config.OPT_VAL])
gajim.config.set_per('proxies', new_name, option, config[option])
model.set_value(iter_, 0, new_name)
def on_proxytype_combobox_changed(self, widget):
@ -2116,7 +2115,7 @@ class AccountsWindow:
gajim.config.add_per('accounts', new_name)
old_config = gajim.config.get_per('accounts', old_name)
for opt in old_config:
gajim.config.set_per('accounts', new_name, opt, old_config[opt][1])
gajim.config.set_per('accounts', new_name, opt, old_config[opt])
gajim.config.del_per('accounts', old_name)
if self.current_account == old_name:
self.current_account = new_name