From 1a8b77f1ccf1ba0fbb5fbf59b6764b791e4cc1a1 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 23 Oct 2008 16:17:03 +0000
Subject: [PATCH] revert thorstenp's patch [10510] that breaks setting all
 contacts offline when we go offline.

---
 src/roster_window.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/roster_window.py b/src/roster_window.py
index 28ca72b464..d84cd04ad8 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -2070,9 +2070,9 @@ class RosterWindow:
 				for jid in gajim.contacts.get_jid_list(account):
 					lcontact = gajim.contacts.get_contacts(account, jid)
 					ctrl = gajim.interface.msg_win_mgr.get_gc_control(jid, account)
-					for contact in lcontact:
-						if (contact.show != 'offline' or contact.is_transport()) and not ctrl:
-							self.chg_contact_status(contact, 'offline', '', account)
+					for contact in [c for c in lcontact if ((c.show != 'offline' or \
+					c.is_transport()) and not ctrl)]:
+						self.chg_contact_status(contact, 'offline', '', account)
 			self.actions_menu_needs_rebuild = True
 		self.update_status_combobox()
 		# Force the rebuild now since the on_activates on the menu itself does
-- 
GitLab