Commit 07434728 authored by Travis Reitter's avatar Travis Reitter

Adjust for Folks Favouritable -> FavouriteDetails rename

Helps bgo#644470 - Empathy needs to catch up with Folks interface name change
(API/ABI breaks)
parent 04358054
......@@ -1477,10 +1477,10 @@ contact_widget_contact_update (EmpathyContactWidget *information)
FolksPersona *persona = empathy_contact_get_persona (
information->contact);
if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
if (persona != NULL && FOLKS_IS_FAVOURITE_DETAILS (persona))
{
gboolean is_favourite = folks_favouritable_get_is_favourite (
FOLKS_FAVOURITABLE (persona));
gboolean is_favourite = folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (persona));
contact_widget_favourites_changed_cb (information->manager,
information->contact, is_favourite, information);
}
......@@ -1611,10 +1611,11 @@ favourite_toggled_cb (GtkToggleButton *button,
{
FolksPersona *persona = empathy_contact_get_persona (information->contact);
if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
if (persona != NULL && FOLKS_IS_FAVOURITE_DETAILS (persona))
{
gboolean active = gtk_toggle_button_get_active (button);
folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (persona), active);
folks_favourite_details_set_is_favourite (
FOLKS_FAVOURITE_DETAILS (persona), active);
}
}
......
......@@ -750,7 +750,8 @@ static void
favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
FolksIndividual *individual)
{
folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual),
folks_favourite_details_set_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual),
gtk_check_menu_item_get_active (item));
}
......@@ -762,7 +763,8 @@ empathy_individual_favourite_menu_item_new (FolksIndividual *individual)
item = gtk_check_menu_item_new_with_label (_("Favorite"));
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)));
folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual)));
g_signal_connect (item, "toggled",
G_CALLBACK (favourite_menu_item_toggled_cb), individual);
......
......@@ -479,7 +479,8 @@ individual_store_add_individual (EmpathyIndividualStore *self,
g_list_free (groups);
if (priv->show_groups &&
folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)))
folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual)))
{
/* Add contact to the fake 'Favorites' group */
GtkTreeIter iter_group;
......
......@@ -374,14 +374,16 @@ real_drag_individual_received_cb (EmpathyIndividualView *self,
if (!tp_strdiff (new_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Mark contact as favourite */
folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), TRUE);
folks_favourite_details_set_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual), TRUE);
return;
}
if (!tp_strdiff (old_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Remove contact as favourite */
folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), FALSE);
folks_favourite_details_set_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual), FALSE);
/* Don't try to remove it */
old_group = NULL;
......@@ -1706,8 +1708,8 @@ individual_view_is_visible_individual (EmpathyIndividualView *self,
if (contains_interesting_persona == FALSE)
return FALSE;
is_favorite = folks_favouritable_get_is_favourite (
FOLKS_FAVOURITABLE (individual));
is_favorite = folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual));
if (is_searching == FALSE)
return (priv->show_offline || is_online || is_favorite);
......
......@@ -1145,8 +1145,8 @@ favourite_toggled_cb (GtkToggleButton *button,
EmpathyIndividualWidget *self)
{
gboolean active = gtk_toggle_button_get_active (button);
folks_favouritable_set_is_favourite (
FOLKS_FAVOURITABLE (GET_PRIV (self)->individual), active);
folks_favourite_details_set_is_favourite (
FOLKS_FAVOURITE_DETAILS (GET_PRIV (self)->individual), active);
}
static void
......@@ -1288,8 +1288,8 @@ notify_is_favourite_cb (gpointer folks_object,
if (GTK_IS_TOGGLE_BUTTON (favourite_widget))
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (favourite_widget),
folks_favouritable_get_is_favourite (
FOLKS_FAVOURITABLE (folks_object)));
folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (folks_object)));
}
}
......
......@@ -84,8 +84,8 @@ individual_notify_is_favourite_cb (FolksIndividual *individual,
GParamSpec *pspec,
EmpathyIndividualManager *self)
{
gboolean is_favourite = folks_favouritable_get_is_favourite (
FOLKS_FAVOURITABLE (individual));
gboolean is_favourite = folks_favourite_details_get_is_favourite (
FOLKS_FAVOURITE_DETAILS (individual));
g_signal_emit (self, signals[FAVOURITES_CHANGED], 0, individual,
is_favourite);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment