From c66aee5b9d0c8544d6e408e33b4468381ee12543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=ABl=20Verrier?= Date: Thu, 9 Jul 2009 14:33:18 +0200 Subject: [PATCH] * better way to propagate roster at start --- src/common/connection.py | 5 +++++ src/gajim.py | 3 ++- src/roster_window.py | 5 ----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 362631095..3e1fbdf5e 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1951,6 +1951,11 @@ class Connection(ConnectionHandlers): self.connection.SendAndCallForResponse(iq, _on_response) + def load_roster_from_db(self): + roster = gajim.logger.get_roster(gajim.get_jid_from_account(self.name)) + self.dispatch('ROSTER', roster) + + # END Connection # vim: se ts=3: diff --git a/src/gajim.py b/src/gajim.py index 868e00e74..33e7f575e 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -3423,7 +3423,8 @@ class Interface: gtk.window_set_default_icon(pix) self.roster = roster_window.RosterWindow() - self.roster.init_roster() + for account in gajim.connections: + gajim.connections[account].load_roster_from_db() self.init_emoticons() self.make_regexps() diff --git a/src/roster_window.py b/src/roster_window.py index ef7c7b0be..8b152de04 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -6176,11 +6176,6 @@ class RosterWindow: # #self.xml.get_widget('menubar').hide() # return - def init_roster(self): - for account in gajim.connections: - roster = gajim.logger.get_roster(gajim.get_jid_from_account(account)) - gajim.handlers['ROSTER'](account, roster) - ################################################################################ ### ################################################################################