we can now create a new account

This commit is contained in:
Yann Leboulanger 2005-08-10 11:52:37 +00:00
parent fc734097fe
commit 8393d9e5fd
2 changed files with 6 additions and 0 deletions

View File

@ -1342,6 +1342,7 @@ _('To change the account name, you must be disconnected.')).get_response()
self.plugin.register_handlers(con)
#if we need to register a new account
if new_account:
gajim.events_for_ui[name] = []
con.new_account(name, config)
return
# The account we add already exists on the server

View File

@ -769,10 +769,14 @@ class Interface:
self.roster.popup_notification_windows.append(instance)
def handle_event_stanza_arrived(self, account, stanza):
if not self.windows.has_key(account):
return
if self.windows[account].has_key('xml_console'):
self.windows[account]['xml_console'].print_stanza(stanza, 'incoming')
def handle_event_stanza_sent(self, account, stanza):
if not self.windows.has_key(account):
return
if self.windows[account].has_key('xml_console'):
self.windows[account]['xml_console'].print_stanza(stanza, 'outgoing')
@ -965,6 +969,7 @@ class Interface:
gajim.connections[account].process(0.01)
if gajim.socks5queue.connected:
gajim.socks5queue.process(0.01)
for account in gajim.events_for_ui: #when we create a new account we don't have gajim.connection
while len(gajim.events_for_ui[account]):
gajim.mutex_events_for_ui.lock(self.exec_event, account)
gajim.mutex_events_for_ui.unlock()