From ca2a03e84bd231e8e9c8522f42778493c977a478 Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xclaesse@src.gnome.org>
Date: Tue, 6 Jan 2009 16:46:07 +0000
Subject: Don't emit sound when changing state and properly play login sound.

svn path=/trunk/; revision=2027
---
 libempathy-gtk/empathy-ui-utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'libempathy-gtk/empathy-ui-utils.c')

diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index a7a468c3f..83141afbf 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1509,11 +1509,13 @@ empathy_sound_pref_is_enabled (const char *key)
 		return FALSE;
 	}
 
-	idle = empathy_idle_new ();	
+	idle = empathy_idle_new ();
 	presence = empathy_idle_get_state (idle);
 	g_object_unref (idle);
 
-	if (presence > MC_PRESENCE_AVAILABLE) {
+
+	if (presence != MC_PRESENCE_AVAILABLE &&
+	    presence != MC_PRESENCE_UNSET) {
 		empathy_conf_get_bool (conf, EMPATHY_PREFS_SOUNDS_DISABLED_AWAY,
 				       &res);
 		if (res) {
-- 
cgit