[empathy] Don't add invalid presence type as favorite (#585053)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Don't add invalid presence type as favorite (#585053)
- Date: Thu, 18 Jun 2009 04:40:49 -0400 (EDT)
commit f3696aa8cb23fc853e298f9614768233f69f1298
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Jun 17 18:39:13 2009 +0100
Don't add invalid presence type as favorite (#585053)
libempathy-gtk/empathy-presence-chooser.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 27928aa..8fba26f 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]