add_contact window is better filled

This commit is contained in:
Yann Leboulanger 2005-04-25 20:41:29 +00:00
parent 928af2fa9c
commit 518a4877ae
1 changed files with 6 additions and 1 deletions

View File

@ -271,9 +271,14 @@ class Add_new_contact_window:
if jid:
self.xml.get_widget('jid_entry').set_text(jid)
jid_splited = jid.split('@')
self.xml.get_widget('uid_entry').set_text(jid_splited[0])
if jid_splited[1] in jid_agents:
uid = jid_splited[0].replace('%', '@')
self.xml.get_widget('uid_entry').set_text(uid)
protocol_combobox.set_active(jid_agents.index(jid_splited[1]) + 1)
else:
self.xml.get_widget('uid_entry').set_text(jid)
protocol_combobox.set_active(0)
self.set_nickname()
self.group_comboboxentry = self.xml.get_widget('group_comboboxentry')
liststore = gtk.ListStore(str)