* better way to propagate roster at start

This commit is contained in:
Anaël Verrier 2009-07-09 14:33:18 +02:00
parent 5e2d6efd0b
commit c66aee5b9d
3 changed files with 7 additions and 6 deletions

View File

@ -1951,6 +1951,11 @@ class Connection(ConnectionHandlers):
self.connection.SendAndCallForResponse(iq, _on_response) 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 # END Connection
# vim: se ts=3: # vim: se ts=3:

View File

@ -3423,7 +3423,8 @@ class Interface:
gtk.window_set_default_icon(pix) gtk.window_set_default_icon(pix)
self.roster = roster_window.RosterWindow() 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.init_emoticons()
self.make_regexps() self.make_regexps()

View File

@ -6176,11 +6176,6 @@ class RosterWindow:
# #self.xml.get_widget('menubar').hide() # #self.xml.get_widget('menubar').hide()
# return # 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)
################################################################################ ################################################################################
### ###
################################################################################ ################################################################################