[empathy] empathy_idle_init: fallback to OFFLINE instead of UNSET if empathy_idle_get_actual_presence failed



commit 79b35ff58934c0ed20c4092138973c88a827a16b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Sun Jun 14 17:36:37 2009 +0100

    empathy_idle_init: fallback to OFFLINE instead of UNSET if empathy_idle_get_actual_presence failed
    
    If MC is not running, mission_control_get_presence_actual will return
    OFFLINE and set an error. Empathy should do the same and use OFFLINE
    instead of UNSET to avoid to not display the status icon in such cases
    (there is no UNSET presence icon).

 libempathy/empathy-idle.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index 92ab9f3..c723079 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -465,7 +465,10 @@ empathy_idle_init (EmpathyIdle *idle)
 	if (error) {
 		DEBUG ("Error getting actual presence: %s", error->message);
 
-		priv->state = TP_CONNECTION_PRESENCE_TYPE_UNSET;
+		/* Fallback to OFFLINE as that's what mission_control_get_presence_actual
+		does. This also ensure to always display the status icon (there is no
+		unset presence icon). */
+		priv->state = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
 		g_clear_error (&error);
 	}
 	priv->status = mission_control_get_presence_message_actual (priv->mc, &error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]