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