From 1e948307c25c8980ba2e0839af32236f6b943ea8 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 9 Jun 2005 09:32:19 +0000
Subject: [PATCH] fix account creation pb

---
 src/config.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/config.py b/src/config.py
index 8988f864f5..67dbc01b64 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1075,7 +1075,10 @@ class Account_modification_window:
 		self.plugin = plugin
 		self.account = account
 		self.modify = False
-		
+
+		# init proxy list
+		self.update_proxy_list()
+
 		self.xml.signal_autoconnect(self)
 		if account:
 			self.modify = True
@@ -1113,7 +1116,10 @@ class Account_modification_window:
 			entry.set_text(gpgpassword)
 
 	def update_proxy_list(self):
-		our_proxy = gajim.config.get_per('accounts', self.account, 'proxy')
+		if self.account:
+			our_proxy = gajim.config.get_per('accounts', self.account, 'proxy')
+		else:
+			our_proxy = ''
 		if not our_proxy:
 			our_proxy = 'None'
 		self.proxy_combobox = self.xml.get_widget('proxies_combobox')
@@ -1147,9 +1153,6 @@ class Account_modification_window:
 		self.xml.get_widget('priority_spinbutton').set_value(gajim.config.\
 			get_per('accounts', self.account, 'priority'))
 
-		# init proxy list
-		self.update_proxy_list()
-
 		usessl = gajim.config.get_per('accounts', self.account, 'usessl')
 		self.xml.get_widget('use_ssl_checkbutton').set_active(usessl)
 
-- 
GitLab