aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2009-11-12 18:58:34 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-12 18:58:34 +0800
commit1020f57c4a8ea74b7738b6a8e20d299cdd65115d (patch)
tree4a8d071394a6a98ca89effef1d0b40fc4eb561cd /src
parent4950a9c2e79b6c92510c738283a2b40c936570d6 (diff)
downloadgsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar.gz
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar.bz2
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar.lz
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar.xz
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.tar.zst
gsoc2013-empathy-1020f57c4a8ea74b7738b6a8e20d299cdd65115d.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/empathy-status-icon.c7
1 files changed, 7 insertions, 0 deletions
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);
}