summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liszt/main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/liszt/main.c b/liszt/main.c
index 00f5092c3..38bfeaeb7 100644
--- a/liszt/main.c
+++ b/liszt/main.c
@@ -9,6 +9,22 @@ enum
N_COLUMNS
};
+static gboolean
+model_delete_cb (ClutterModel *model,
+ ClutterModelIter *iter,
+ gpointer user_data)
+{
+ gpointer current_individual;
+ clutter_model_iter_get (iter, COLUMN_INDIVIDUAL, &current_individual, -1);
+ if (current_individual == user_data)
+ {
+ clutter_model_remove (model, clutter_model_iter_get_row (iter));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
static void
aggregator_individuals_changed_cb (FolksIndividualAggregator *aggregator,
GList *added,
@@ -20,6 +36,15 @@ aggregator_individuals_changed_cb (FolksIndividualAggregator *aggregator,
{
GList *l;
+ for (l = removed; l != NULL; l = l->next)
+ {
+ FolksIndividual *individual = l->data;
+
+ if (folks_individual_get_is_user (individual))
+ continue;
+
+ clutter_model_foreach (model, model_delete_cb, individual);
+ }
for (l = added; l != NULL; l = l->next)
{
FolksIndividual *individual = l->data;