improve speed when quitting Gajim, and prevent to send twice STATUS event when we quit
This commit is contained in:
parent
ec8044c4dc
commit
7ef62a99f2
src
|
@ -203,8 +203,8 @@ class Connection(ConnectionHandlers):
|
|||
# after we auth to server
|
||||
self.old_show = STATUS_LIST[self.connected]
|
||||
self.connected = 0
|
||||
self.dispatch('STATUS', 'offline')
|
||||
if not self.on_purpose:
|
||||
self.dispatch('STATUS', 'offline')
|
||||
self.disconnect()
|
||||
if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
|
||||
self.connected = -1
|
||||
|
|
|
@ -3762,17 +3762,19 @@ class RosterWindow:
|
|||
self.quit_on_next_offline -= 1
|
||||
if self.quit_on_next_offline < 1:
|
||||
self.quit_gtkgui_interface()
|
||||
if accountIter:
|
||||
model[accountIter][C_SECPIXBUF] = None
|
||||
if gajim.con_types.has_key(account):
|
||||
gajim.con_types[account] = None
|
||||
for jid in gajim.contacts.get_jid_list(account):
|
||||
lcontact = gajim.contacts.get_contacts(account, jid)
|
||||
lcontact_copy = []
|
||||
for contact in lcontact:
|
||||
lcontact_copy.append(contact)
|
||||
for contact in lcontact_copy:
|
||||
self.chg_contact_status(contact, 'offline', '', account)
|
||||
else:
|
||||
# No need to redraw contacts if we're quitting
|
||||
if accountIter:
|
||||
model[accountIter][C_SECPIXBUF] = None
|
||||
if gajim.con_types.has_key(account):
|
||||
gajim.con_types[account] = None
|
||||
for jid in gajim.contacts.get_jid_list(account):
|
||||
lcontact = gajim.contacts.get_contacts(account, jid)
|
||||
lcontact_copy = []
|
||||
for contact in lcontact:
|
||||
lcontact_copy.append(contact)
|
||||
for contact in lcontact_copy:
|
||||
self.chg_contact_status(contact, 'offline', '', account)
|
||||
self.actions_menu_needs_rebuild = True
|
||||
self.update_status_combobox()
|
||||
|
||||
|
|
Loading…
Reference in New Issue