aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-06-23 23:46:38 +0800
committerTravis Reitter <treitter@gmail.com>2010-07-21 07:12:35 +0800
commit315a71325f98d86722d7c313d726828f767cef82 (patch)
tree5f25542a0d70ea1e63f67fe33b512f185610b15d /libempathy-gtk
parente53b7431a34c09ceed319a1680cde1e44a50dab2 (diff)
downloadgsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar.gz
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar.bz2
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar.lz
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar.xz
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.tar.zst
gsoc2013-empathy-315a71325f98d86722d7c313d726828f767cef82.zip
Use the new FolksFavourite interface for favourites support
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-menu.c9
-rw-r--r--libempathy-gtk/empathy-individual-store.c4
-rw-r--r--libempathy-gtk/empathy-individual-view.c2
3 files changed, 6 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 98afbc541..c618d2c37 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -516,10 +516,8 @@ favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
manager = empathy_individual_manager_dup_singleton ();
list = EMPATHY_INDIVIDUAL_MANAGER (manager);
- if (gtk_check_menu_item_get_active (item))
- empathy_individual_manager_add_to_favourites (list, individual);
- else
- empathy_individual_manager_remove_from_favourites (list, individual);
+ folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual),
+ gtk_check_menu_item_get_active (item));
g_object_unref (manager);
}
@@ -534,8 +532,7 @@ empathy_individual_favourite_menu_item_new (FolksIndividual *individual)
manager = empathy_individual_manager_dup_singleton ();
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
- empathy_individual_manager_is_favourite (
- EMPATHY_INDIVIDUAL_MANAGER (manager), individual));
+ folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)));
g_signal_connect (item, "toggled",
G_CALLBACK (favourite_menu_item_toggled_cb), individual);
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index 1931106a4..976053c07 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -412,9 +412,8 @@ individual_store_add_individual (EmpathyIndividualStore *self,
if (group_set != NULL)
g_hash_table_unref (group_set);
-#ifdef HAVE_FAVOURITE_CONTACTS
if (priv->show_groups &&
- empathy_individual_manager_is_favourite (priv->manager, individual))
+ folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)))
{
/* Add contact to the fake 'Favorites' group */
GtkTreeIter iter_group;
@@ -425,7 +424,6 @@ individual_store_add_individual (EmpathyIndividualStore *self,
add_individual_to_store (GTK_TREE_STORE (self), &iter, &iter_group,
individual, flags);
}
-#endif
individual_store_contact_update (self, individual);
}
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 5a0a56651..067fb60a0 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -345,6 +345,7 @@ individual_view_handle_drag (EmpathyIndividualView *self,
if (!tp_strdiff (new_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Mark contact as favourite */
+ folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), TRUE);
/* TODO: implement this */
DEBUG ("adding individual to favourites not fully implemented");
@@ -355,6 +356,7 @@ individual_view_handle_drag (EmpathyIndividualView *self,
if (!tp_strdiff (old_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Remove contact as favourite */
+ folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), FALSE);
/* TODO: implement this */
DEBUG ("removing individual from favourites not fully " "implemented");