aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-15 00:36:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-15 00:43:28 +0800
commit79b35ff58934c0ed20c4092138973c88a827a16b (patch)
treee09e4e7d5cab966364eb2b270558eec9b4f1be2f
parent3064b1394d1d98f10808b0cf25474c2541851dd4 (diff)
downloadgsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar.gz
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar.bz2
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar.lz
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar.xz
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.tar.zst
gsoc2013-empathy-79b35ff58934c0ed20c4092138973c88a827a16b.zip
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).
-rw-r--r--libempathy/empathy-idle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index 92ab9f39f..c72307920 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);