[empathy] Show a contact as blocked if *all* is personas are blocked
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Show a contact as blocked if *all* is personas are blocked
- Date: Wed, 14 Dec 2011 12:25:08 +0000 (UTC)
commit 6fce69d7080341d3064850ceaab52eec531c5e6a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Dec 14 13:04:15 2011 +0100
Show a contact as blocked if *all* is personas are blocked
It's clearer that way.
https://bugzilla.gnome.org/show_bug.cgi?id=665038
libempathy-gtk/empathy-individual-menu.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index fa97877..0a2bf49 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -593,18 +593,21 @@ update_block_menu_item (GtkWidget *item,
FolksIndividual *individual)
{
GList *contacts, *l;
- gboolean is_blocked = FALSE;
+ gboolean is_blocked = TRUE;
contacts = get_contacts_supporting_blocking (individual);
- /* Check the menu item if there is at least one persona blocked */
+ if (contacts == NULL)
+ is_blocked = FALSE;
+
+ /* Check the menu item if all his personas are blocked */
for (l = contacts; l != NULL; l = g_list_next (l))
{
TpContact *contact = l->data;
- if (tp_contact_is_blocked (contact))
+ if (!tp_contact_is_blocked (contact))
{
- is_blocked = TRUE;
+ is_blocked = FALSE;
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]