aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-14 20:04:15 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-14 20:24:05 +0800
commit6fce69d7080341d3064850ceaab52eec531c5e6a (patch)
tree37e990594eedc26b1c0a27b2a2fbff1a2ea5bae1
parenta5bde7ca2676d538c0534b7acaf72ec47005649b (diff)
downloadgsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar.gz
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar.bz2
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar.lz
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar.xz
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.tar.zst
gsoc2013-empathy-6fce69d7080341d3064850ceaab52eec531c5e6a.zip
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
-rw-r--r--libempathy-gtk/empathy-individual-menu.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index fa97877c0..0a2bf49a3 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;
}
}