From c2042e86897e69c89a09266487b598736b194647 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 10 Nov 2005 10:16:25 +0000 Subject: [PATCH] call register_handlers only once at startup, it's not account specific --- src/config.py | 2 -- src/gajim.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/config.py b/src/config.py index a018583b9..04d6e1429 100644 --- a/src/config.py +++ b/src/config.py @@ -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): diff --git a/src/gajim.py b/src/gajim.py index fe0782940..528704f12 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -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)