From a472b4a3214e9d3b66d5f11dc96a65a81d5be3e5 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 11 May 2005 15:21:13 +0000
Subject: [PATCH] we can have popup notification even if we don't have sound
 enabled when a contact disconnect

---
 src/gajim.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index eaa5179b2d..319f69bda5 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -249,9 +249,10 @@ class Interface:
 														'Contact Online', jid, account)
 						self.roster.popup_notification_windows.append(instance)
 						
-			elif old_show > 1 and new_show < 2 and gajim.config.get_per( \
-				'soundevents', 'contact_disconnected', 'enabled'):
-				self.play_sound('contact_disconnected')
+			elif old_show > 1 and new_show < 2:
+				if gajim.config.get_per('soundevents', 'contact_disconnected',
+												'enabled'):
+					self.play_sound('contact_disconnected')
 				if not self.windows[account]['chats'].has_key(jid) and \
 					not self.queues[account].has_key(jid) and \
 					gajim.config.get('notify_on_offline'):
-- 
GitLab