diff options
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 024128151..82b638182 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -579,18 +579,15 @@ contact_widget_cell_toggled (GtkCellRendererToggle *cell, if (group) { - if (enabled) - { - empathy_contact_list_remove_from_group ( - EMPATHY_CONTACT_LIST (information->manager), information->contact, - group); - } - else + FolksIndividual *individual = folks_individual_from_empathy_contact ( + information->contact); + + if (individual) { - empathy_contact_list_add_to_group ( - EMPATHY_CONTACT_LIST (information->manager), information->contact, - group); + folks_groups_change_group (FOLKS_GROUPS (individual), group, !enabled); + g_object_unref (individual); } + g_free (group); } } @@ -797,6 +794,7 @@ contact_widget_button_group_clicked_cb (GtkButton *button, GtkTreeView *view; GtkListStore *store; GtkTreeIter iter; + FolksIndividual *individual; const gchar *group; view = GTK_TREE_VIEW (information->treeview_groups); @@ -810,9 +808,13 @@ contact_widget_button_group_clicked_cb (GtkButton *button, COL_ENABLED, TRUE, -1); - empathy_contact_list_add_to_group ( - EMPATHY_CONTACT_LIST (information->manager), information->contact, - group); + individual = folks_individual_from_empathy_contact (information->contact); + + if (individual) + { + folks_groups_change_group (FOLKS_GROUPS (individual), group, TRUE); + g_object_unref (individual); + } } static void |