call register_handlers only once at startup, it's not account specific
This commit is contained in:
parent
e55db9645d
commit
c2042e8689
|
@ -2592,7 +2592,6 @@ _('You can set advanced account options by pressing Advanced button, or later by
|
|||
def acc_is_ok(self, config):
|
||||
'''Account creation succeeded'''
|
||||
con = gajim.connections[self.account]
|
||||
gajim.interface.register_handlers(con)
|
||||
self.create_vars(config)
|
||||
self.finish_button.set_sensitive(True)
|
||||
self.finish_button.set_property('has-default', True)
|
||||
|
@ -2705,7 +2704,6 @@ _('You can set advanced account options by pressing Advanced button,or later by
|
|||
con.new_account(self.account, config)
|
||||
return
|
||||
gajim.connections[self.account] = con
|
||||
gajim.interface.register_handlers(con)
|
||||
self.create_vars(config)
|
||||
|
||||
def create_vars(self, config):
|
||||
|
|
|
@ -1111,7 +1111,7 @@ class Interface:
|
|||
# update regular expressions
|
||||
self.make_regexps()
|
||||
|
||||
def register_handlers(self, con):
|
||||
def register_handlers(self):
|
||||
self.handlers = {
|
||||
'ROSTER': self.handle_event_roster,
|
||||
'WARNING': self.handle_event_warning,
|
||||
|
@ -1273,6 +1273,7 @@ class Interface:
|
|||
gajim.socks5queue = socks5.SocksQueue(
|
||||
self.handle_event_file_rcv_completed,
|
||||
self.handle_event_file_progress)
|
||||
self.register_handlers()
|
||||
for account in gajim.config.get_per('accounts'):
|
||||
gajim.connections[account] = common.connection.Connection(account)
|
||||
|
||||
|
@ -1357,7 +1358,6 @@ class Interface:
|
|||
for account in gajim.connections:
|
||||
self.windows[account]['xml_console'] = \
|
||||
dialogs.XMLConsoleWindow(account)
|
||||
self.register_handlers(gajim.connections[account])
|
||||
|
||||
gobject.timeout_add(100, self.autoconnect)
|
||||
gobject.timeout_add(200, self.process_connections)
|
||||
|
|
Loading…
Reference in New Issue