Catch up with three interface renamings which have happened in folks master.
This bumps Empathy's folks dependency to 0.3.3. Closes: bgo#637097
# Minimal version required
# Hardp deps
-FOLKS_REQUIRED=0.3.2
+FOLKS_REQUIRED=0.3.3
GLIB_REQUIRED=2.27.2
GNUTLS_REQUIRED=2.8.5
GTK_REQUIRED=2.91.3
FolksPersona *persona = empathy_contact_get_persona (
information->contact);
- if (persona != NULL && FOLKS_IS_FAVOURITE (persona))
+ if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
{
- gboolean is_favourite = folks_favourite_get_is_favourite (
- FOLKS_FAVOURITE (persona));
+ gboolean is_favourite = folks_favouritable_get_is_favourite (
+ FOLKS_FAVOURITABLE (persona));
contact_widget_favourites_changed_cb (information->manager,
information->contact, is_favourite, information);
}
{
FolksPersona *persona = empathy_contact_get_persona (information->contact);
- if (persona != NULL && FOLKS_IS_FAVOURITE (persona))
+ if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
{
gboolean active = gtk_toggle_button_get_active (button);
- folks_favourite_set_is_favourite (FOLKS_FAVOURITE (persona), active);
+ folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (persona), active);
}
}
favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
FolksIndividual *individual)
{
- folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual),
+ folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual),
gtk_check_menu_item_get_active (item));
}
item = gtk_check_menu_item_new_with_label (_("Favorite"));
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
- folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)));
+ folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)));
g_signal_connect (item, "toggled",
G_CALLBACK (favourite_menu_item_toggled_cb), individual);
personas = folks_individual_get_personas (individual);
for (l = personas; l != NULL; l = l->next)
{
- FolksPresence *presence;
+ FolksHasPresence *presence;
- /* We only want personas which implement FolksPresence */
- if (!FOLKS_IS_PRESENCE (l->data))
+ /* We only want personas which implement FolksHasPresence */
+ if (!FOLKS_IS_HAS_PRESENCE (l->data))
continue;
- presence = FOLKS_PRESENCE (l->data);
+ presence = FOLKS_HAS_PRESENCE (l->data);
- if (folks_presence_typecmp (folks_presence_get_presence_type (presence),
+ if (folks_has_presence_typecmp (
+ folks_has_presence_get_presence_type (presence),
presence_type) > 0)
{
TpContact *tp_contact;
- presence_type = folks_presence_get_presence_type (presence);
+ presence_type = folks_has_presence_get_presence_type (presence);
tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
types = tp_contact_get_client_types (tp_contact);
g_list_free (groups);
if (priv->show_groups &&
- folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)))
+ folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)))
{
/* Add contact to the fake 'Favorites' group */
GtkTreeIter iter_group;
}
/* Get online state now. */
- now_online = folks_presence_is_online (FOLKS_PRESENCE (individual));
+ now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual));
if (!in_list)
{
EMPATHY_INDIVIDUAL_STORE_COL_NAME,
folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)),
EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
- folks_presence_get_presence_type (FOLKS_PRESENCE (individual)),
+ folks_has_presence_get_presence_type (
+ FOLKS_HAS_PRESENCE (individual)),
EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
- folks_presence_get_presence_message (FOLKS_PRESENCE (individual)),
+ folks_has_presence_get_presence_message (
+ FOLKS_HAS_PRESENCE (individual)),
EMPATHY_INDIVIDUAL_STORE_COL_COMPACT, priv->is_compact,
EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE,
EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, now_online,
* the presences.
*/
folks_presence_type_a =
- folks_presence_get_presence_type (FOLKS_PRESENCE (individual_a));
+ folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_a));
folks_presence_type_b =
- folks_presence_get_presence_type (FOLKS_PRESENCE (individual_b));
+ folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_b));
tp_presence_a = empathy_folks_presence_type_to_tp (folks_presence_type_a);
tp_presence_b = empathy_folks_presence_type_to_tp (folks_presence_type_b);
if (!tp_strdiff (new_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Mark contact as favourite */
- folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), TRUE);
+ folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), TRUE);
return;
}
if (!tp_strdiff (old_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
{
/* Remove contact as favourite */
- folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), FALSE);
+ folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), FALSE);
/* Don't try to remove it */
old_group = NULL;
}
if (individual != NULL &&
- folks_presence_is_online (FOLKS_PRESENCE (individual)) &&
+ folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual)) &&
(caps & EMPATHY_CAPABILITIES_FT))
{
gdk_drag_status (context, GDK_ACTION_COPY, time_);
personas = folks_individual_get_personas (priv->individual);
for (l = personas; l != NULL; l = l->next)
{
- FolksPresence *presence;
+ FolksHasPresence *presence;
/* We only want personas which implement FolksPresence */
- if (!FOLKS_IS_PRESENCE (l->data))
+ if (!FOLKS_IS_HAS_PRESENCE (l->data))
continue;
- presence = FOLKS_PRESENCE (l->data);
+ presence = FOLKS_HAS_PRESENCE (l->data);
- if (folks_presence_typecmp (folks_presence_get_presence_type (presence),
+ if (folks_has_presence_typecmp (
+ folks_has_presence_get_presence_type (presence),
presence_type) > 0
&& TPF_IS_PERSONA (presence))
{
- presence_type = folks_presence_get_presence_type (presence);
+ presence_type = folks_has_presence_get_presence_type (presence);
tp_contact = tpf_persona_get_contact (TPF_PERSONA (l->data));
}
}
/* FIXME: We just choose the first Persona which has an avatar, and save that.
* The avatar handling in EmpathyContact needs to be moved into libfolks as
- * much as possible, and this code rewritten to use FolksAvatar.
+ * much as possible, and this code rewritten to use FolksHasAvatar.
* (bgo#627401) */
personas = folks_individual_get_personas (individual);
for (l = personas; l != NULL; l = l->next)
EmpathyIndividualWidget *self)
{
gboolean active = gtk_toggle_button_get_active (button);
- folks_favourite_set_is_favourite (
- FOLKS_FAVOURITE (GET_PRIV (self)->individual), active);
+ folks_favouritable_set_is_favourite (
+ FOLKS_FAVOURITABLE (GET_PRIV (self)->individual), active);
}
static void
state_image = g_object_get_data (table, "state-image");
/* FIXME: Default messages should be moved into libfolks (bgo#627403) */
- message = folks_presence_get_presence_message (FOLKS_PRESENCE (folks_object));
+ message = folks_has_presence_get_presence_message (
+ FOLKS_HAS_PRESENCE (folks_object));
if (EMP_STR_EMPTY (message))
{
message = empathy_presence_get_default_message (
- folks_presence_get_presence_type (FOLKS_PRESENCE (folks_object)));
+ folks_has_presence_get_presence_type (
+ FOLKS_HAS_PRESENCE (folks_object)));
}
if (message != NULL)
gtk_image_set_from_icon_name (GTK_IMAGE (state_image),
empathy_icon_name_for_presence (
- folks_presence_get_presence_type (FOLKS_PRESENCE (folks_object))),
+ folks_has_presence_get_presence_type (
+ FOLKS_HAS_PRESENCE (folks_object))),
GTK_ICON_SIZE_BUTTON);
gtk_widget_show (state_image);
}
if (GTK_IS_TOGGLE_BUTTON (favourite_widget))
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (favourite_widget),
- folks_favourite_get_is_favourite (FOLKS_FAVOURITE (folks_object)));
+ folks_favouritable_get_is_favourite (
+ FOLKS_FAVOURITABLE (folks_object)));
}
}
gtk_tree_path_free (path);
/* Get online state now. */
- now_online = folks_presence_is_online (FOLKS_PRESENCE (persona));
+ now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (persona));
/* Get online state before. */
gtk_tree_model_get (GTK_TREE_MODEL (self), &iter,
EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
folks_persona_get_display_id (persona),
EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
- folks_presence_get_presence_type (FOLKS_PRESENCE (persona)),
+ folks_has_presence_get_presence_type (
+ FOLKS_HAS_PRESENCE (persona)),
EMPATHY_PERSONA_STORE_COL_STATUS,
- folks_presence_get_presence_message (FOLKS_PRESENCE (persona)),
+ folks_has_presence_get_presence_message (
+ FOLKS_HAS_PRESENCE (persona)),
EMPATHY_PERSONA_STORE_COL_IS_ONLINE, now_online,
EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
empathy_contact_get_capabilities (contact) &
* the presences.
*/
ret_val = -tp_connection_presence_type_cmp_availability (
- folks_presence_get_presence_type (FOLKS_PRESENCE (persona_a)),
- folks_presence_get_presence_type (FOLKS_PRESENCE (persona_b)));
+ folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_a)),
+ folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_b)));
if (ret_val == 0) {
/* Fallback: compare by name et al. */
TpConnectionPresenceType presence;
folks_presence =
- folks_presence_get_presence_type (FOLKS_PRESENCE (individual));
+ folks_has_presence_get_presence_type (
+ FOLKS_HAS_PRESENCE (individual));
presence = empathy_folks_presence_type_to_tp (folks_presence);
return empathy_icon_name_for_presence (presence);
callback, user_data,
empathy_pixbuf_avatar_from_individual_scaled_async);
- avatar_file = folks_avatar_get_avatar (FOLKS_AVATAR (individual));
+ avatar_file =
+ folks_has_avatar_get_avatar (FOLKS_HAS_AVATAR (individual));
if (avatar_file == NULL)
goto out;
if (priv->persona != NULL)
{
- folks_presence_set_presence_message (FOLKS_PRESENCE (priv->persona),
- message);
+ folks_has_presence_set_presence_message (
+ FOLKS_HAS_PRESENCE (priv->persona), message);
}
}
priv = GET_PRIV (contact);
if (priv->persona != NULL)
- return folks_presence_get_presence_message (FOLKS_PRESENCE (priv->persona));
+ {
+ return folks_has_presence_get_presence_message (
+ FOLKS_HAS_PRESENCE (priv->persona));
+ }
return NULL;
}
presence_cmp_func (EmpathyContact *a,
EmpathyContact *b)
{
- FolksPresence *presence_a, *presence_b;
+ FolksHasPresence *presence_a, *presence_b;
- presence_a = FOLKS_PRESENCE (empathy_contact_get_persona (a));
- presence_b = FOLKS_PRESENCE (empathy_contact_get_persona (b));
+ presence_a = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (a));
+ presence_b = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (b));
/* We negate the result because we're sorting in reverse order (i.e. such that
* the Personas with the highest presence are at the beginning of the list. */
- return -folks_presence_typecmp (folks_presence_get_presence_type (presence_a),
- folks_presence_get_presence_type (presence_b));
+ return -folks_has_presence_typecmp (
+ folks_has_presence_get_presence_type (presence_a),
+ folks_has_presence_get_presence_type (presence_b));
}
static gint
GParamSpec *pspec,
EmpathyIndividualManager *self)
{
- gboolean is_favourite = folks_favourite_get_is_favourite (
- FOLKS_FAVOURITE (individual));
+ gboolean is_favourite = folks_favouritable_get_is_favourite (
+ FOLKS_FAVOURITABLE (individual));
g_signal_emit (self, signals[FAVOURITES_CHANGED], 0, individual,
is_favourite);
}