aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-18 01:39:13 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-06-18 16:35:04 +0800
commitf3696aa8cb23fc853e298f9614768233f69f1298 (patch)
tree3c5ebdd1bbd45cf24a04c879dcdeb017b76bdf27
parent4ce928ce7b856c9fcbf61595fae83eed22b90b25 (diff)
downloadgsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar.gz
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar.bz2
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar.lz
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar.xz
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.tar.zst
gsoc2013-empathy-f3696aa8cb23fc853e298f9614768233f69f1298.zip
Don't add invalid presence type as favorite (#585053)
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 27928aa0d..8fba26ff7 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -468,6 +468,10 @@ presence_chooser_entry_icon_release_cb (EmpathyPresenceChooser *self,
state = empathy_idle_get_state (priv->idle);
status = empathy_idle_get_status (priv->idle);
+ if (!empathy_status_presets_is_valid (state))
+ /* It doesn't make sense to add such presence as favorite */
+ return;
+
if (presence_chooser_is_preset (self)) {
/* remove the entry */
DEBUG ("REMOVING PRESET (%i, %s)\n", state, status);