autocompletion of server on creating/adding an account. Fixes #2274

This commit is contained in:
Yann Leboulanger 2006-09-09 12:26:26 +00:00
parent 92d94aec00
commit a15dbddca3
1 changed files with 7 additions and 1 deletions

View File

@ -2616,8 +2616,11 @@ class AccountCreationWizardWindow:
# Connect events from comboboxentry.child
server_comboboxentry = self.xml.get_widget('server_comboboxentry')
server_comboboxentry.child.connect('key_press_event',
entry = server_comboboxentry.child
entry.connect('key_press_event',
self.on_server_comboboxentry_key_press_event)
completion = gtk.EntryCompletion()
entry.set_completion(completion)
# parse servers.xml
servers_xml = os.path.join(gajim.DATA_DIR, 'other', 'servers.xml')
@ -2626,6 +2629,9 @@ class AccountCreationWizardWindow:
for server in servers:
servers_model.append((str(server[0]), int(server[1])))
completion.set_model(servers_model)
completion.set_text_column(0)
# Put servers into comboboxentries
server_comboboxentry.set_model(servers_model)
server_comboboxentry.set_text_column(0)