From 1020f57c4a8ea74b7738b6a8e20d299cdd65115d Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Thu, 12 Nov 2009 10:58:34 +0000 Subject: Force an unset presence type to appear as offline in the presence chooser and status icon. An unset presence type *does* make sense, but not in these contexts. As an aside, there is no icon for an unset presence, so nothing is displayed, which is bad. Fixes bug #597819 --- src/empathy-status-icon.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 21cb2dd3d..c2faaea02 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -239,6 +239,13 @@ status_icon_update_icon (EmpathyStatusIcon *icon) TpConnectionPresenceType state; state = empathy_idle_get_state (priv->idle); + + /* An unset presence type here doesn't make sense. Force it + * to be offline. */ + if (state == TP_CONNECTION_PRESENCE_TYPE_UNSET) { + state = TP_CONNECTION_PRESENCE_TYPE_OFFLINE; + } + icon_name = empathy_icon_name_for_presence (state); } -- cgit v1.2.3