diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-16 17:11:26 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-16 17:24:59 +0800 |
commit | cb2741bee8b6808953a6afeea90114f123a47982 (patch) | |
tree | e1b0df9a14caf29e7047ec403db51d0752533895 /libempathy-gtk | |
parent | 15761dfafa40dce3e5acb2f9fecc5b808fa11e47 (diff) | |
download | gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar.gz gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar.bz2 gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar.lz gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar.xz gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.tar.zst gsoc2013-empathy-cb2741bee8b6808953a6afeea90114f123a47982.zip |
depends on folks 0.4.0
This is based on Travis's commits from master.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 17 | ||||
-rw-r--r-- | libempathy-gtk/empathy-groups-widget.c | 114 | ||||
-rw-r--r-- | libempathy-gtk/empathy-groups-widget.h | 8 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-dialogs.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-information-dialog.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-menu.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 52 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 29 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-widget.c | 35 | ||||
-rw-r--r-- | libempathy-gtk/empathy-linking-dialog.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-persona-store.c | 33 | ||||
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 6 |
12 files changed, 162 insertions, 146 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 0159e8838..61e04560e 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -586,11 +586,11 @@ contact_widget_groups_update (EmpathyContactWidget *information) FolksPersona *persona = empathy_contact_get_persona (information->contact); - if (FOLKS_IS_GROUPABLE (persona)) + if (FOLKS_IS_GROUP_DETAILS (persona)) { - empathy_groups_widget_set_groupable ( + empathy_groups_widget_set_group_details ( EMPATHY_GROUPS_WIDGET (information->groups_widget), - FOLKS_GROUPABLE (persona)); + FOLKS_GROUP_DETAILS (persona)); gtk_widget_show (information->groups_widget); return; @@ -1284,10 +1284,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); } @@ -1418,10 +1418,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); } } diff --git a/libempathy-gtk/empathy-groups-widget.c b/libempathy-gtk/empathy-groups-widget.c index 4bfcd554e..45a90568a 100644 --- a/libempathy-gtk/empathy-groups-widget.c +++ b/libempathy-gtk/empathy-groups-widget.c @@ -40,20 +40,20 @@ /** * SECTION:empathy-groups-widget * @title:EmpathyGroupsWidget - * @short_description: A widget used to edit the groups of a #FolksGroupable + * @short_description: A widget used to edit the groups of a #FolksGroupDetails * @include: libempathy-gtk/empathy-groups-widget.h * - * #EmpathyGroupsWidget is a widget which lists the groups of a #FolksGroupable - * (i.e. a #FolksPersona or a #FolksIndividual) and allows them to be added and - * removed. + * #EmpathyGroupsWidget is a widget which lists the groups of a + * #FolksGroupDetails (i.e. a #FolksPersona or a #FolksIndividual) and allows + * them to be added and removed. */ /** * EmpathyGroupsWidget: * @parent: parent object * - * Widget which displays and allows editing of the groups of a #FolksGroupable - * (i.e. a #FolksPersona or #FolksIndividual). + * Widget which displays and allows editing of the groups of a + * #FolksGroupDetails (i.e. a #FolksPersona or #FolksIndividual). */ /* Delay before updating the widget when the id entry changed (seconds) */ @@ -64,7 +64,7 @@ typedef struct { /* The object we're actually changing the groups of */ - FolksGroupable *groupable; /* owned */ + FolksGroupDetails *group_details; /* owned */ GtkListStore *group_store; /* owned */ GtkWidget *add_group_entry; /* child widget */ @@ -72,7 +72,7 @@ typedef struct } EmpathyGroupsWidgetPriv; enum { - PROP_GROUPABLE = 1, + PROP_GROUP_DETAILS = 1, }; enum { @@ -165,8 +165,8 @@ populate_data (EmpathyGroupsWidget *self) EMPATHY_CONTACT_LIST (manager)); g_object_unref (manager); - /* Get the list of groups that this #FolksGroupable is currently in */ - my_groups = folks_groupable_get_groups (priv->groupable); + /* Get the list of groups that this #FolksGroupDetails is currently in */ + my_groups = folks_group_details_get_groups (priv->group_details); for (l = all_groups; l != NULL; l = l->next) { @@ -217,13 +217,13 @@ add_group_entry_activate_cb (GtkEntry *entry, } static void -change_group_cb (FolksGroupable *groupable, +change_group_cb (FolksGroupDetails *group_details, GAsyncResult *async_result, EmpathyGroupsWidget *self) { GError *error = NULL; - folks_groupable_change_group_finish (groupable, async_result, &error); + folks_group_details_change_group_finish (group_details, async_result, &error); if (error != NULL) { @@ -248,7 +248,7 @@ add_group_button_clicked_cb (GtkButton *button, COL_ENABLED, TRUE, -1); - folks_groupable_change_group (priv->groupable, group, TRUE, + folks_group_details_change_group (priv->group_details, group, TRUE, (GAsyncReadyCallback) change_group_cb, self); } @@ -280,15 +280,15 @@ cell_toggled_cb (GtkCellRendererToggle *cell, if (group != NULL) { - folks_groupable_change_group (priv->groupable, group, !was_enabled, - (GAsyncReadyCallback) change_group_cb, self); + folks_group_details_change_group (priv->group_details, group, + !was_enabled, (GAsyncReadyCallback) change_group_cb, self); g_free (group); } } static void -groupable_group_changed_cb (FolksGroupable *groups, +group_details_group_changed_cb (FolksGroupDetails *groups, const gchar *group, gboolean is_member, EmpathyGroupsWidget *self) @@ -452,8 +452,8 @@ get_property (GObject *object, switch (param_id) { - case PROP_GROUPABLE: - g_value_set_object (value, priv->groupable); + case PROP_GROUP_DETAILS: + g_value_set_object (value, priv->group_details); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); @@ -473,8 +473,8 @@ set_property (GObject *object, switch (param_id) { - case PROP_GROUPABLE: - empathy_groups_widget_set_groupable (EMPATHY_GROUPS_WIDGET (object), + case PROP_GROUP_DETAILS: + empathy_groups_widget_set_group_details (EMPATHY_GROUPS_WIDGET (object), g_value_get_object (value)); break; default: @@ -488,7 +488,8 @@ dispose (GObject *object) { EmpathyGroupsWidgetPriv *priv = GET_PRIV (object); - empathy_groups_widget_set_groupable (EMPATHY_GROUPS_WIDGET (object), NULL); + empathy_groups_widget_set_group_details (EMPATHY_GROUPS_WIDGET (object), + NULL); tp_clear_object (&priv->group_store); G_OBJECT_CLASS (empathy_groups_widget_parent_class)->dispose (object); @@ -504,16 +505,16 @@ empathy_groups_widget_class_init (EmpathyGroupsWidgetClass *klass) object_class->dispose = dispose; /** - * EmpathyGroupsWidget:groupable: + * EmpathyGroupsWidget:group_details: * - * The #FolksGroupable whose group membership is to be edited by the + * The #FolksGroupDetails whose group membership is to be edited by the * #EmpathyGroupsWidget. */ - g_object_class_install_property (object_class, PROP_GROUPABLE, - g_param_spec_object ("groupable", - "Groupable", - "The #FolksGroupable whose groups are being edited.", - FOLKS_TYPE_GROUPABLE, + g_object_class_install_property (object_class, PROP_GROUP_DETAILS, + g_param_spec_object ("group-details", + "Group Details", + "The #FolksGroupDetails whose groups are being edited.", + FOLKS_TYPE_GROUP_DETAILS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_type_class_add_private (object_class, sizeof (EmpathyGroupsWidgetPriv)); @@ -521,80 +522,83 @@ empathy_groups_widget_class_init (EmpathyGroupsWidgetClass *klass) /** * empathy_groups_widget_new: - * @groupable: a #FolksGroupable, or %NULL + * @group_details: a #FolksGroupDetails, or %NULL * * Creates a new #EmpathyGroupsWidget to edit the groups of the given - * @groupable. + * @group_details. * * Return value: a new #EmpathyGroupsWidget */ GtkWidget * -empathy_groups_widget_new (FolksGroupable *groupable) +empathy_groups_widget_new (FolksGroupDetails *group_details) { - g_return_val_if_fail (groupable == NULL || FOLKS_IS_GROUPABLE (groupable), + g_return_val_if_fail ( + group_details == NULL || FOLKS_IS_GROUP_DETAILS (group_details), NULL); return GTK_WIDGET (g_object_new (EMPATHY_TYPE_GROUPS_WIDGET, - "groupable", groupable, + "group-details", group_details, NULL)); } /** - * empathy_groups_widget_get_groupable: + * empathy_groups_widget_get_group_details: * @self: an #EmpathyGroupsWidget * - * Get the #FolksGroupable whose group membership is being edited by the + * Get the #FolksGroupDetails whose group membership is being edited by the * #EmpathyGroupsWidget. * - * Returns: the #FolksGroupable associated with @widget, or %NULL + * Returns: the #FolksGroupDetails associated with @widget, or %NULL */ -FolksGroupable * -empathy_groups_widget_get_groupable (EmpathyGroupsWidget *self) +FolksGroupDetails * +empathy_groups_widget_get_group_details (EmpathyGroupsWidget *self) { g_return_val_if_fail (EMPATHY_IS_GROUPS_WIDGET (self), NULL); - return GET_PRIV (self)->groupable; + return GET_PRIV (self)->group_details; } /** - * empathy_groups_widget_set_groupable: + * empathy_groups_widget_set_group_details: * @self: an #EmpathyGroupsWidget - * @groupable: the #FolksGroupable whose membership is to be edited, or %NULL + * @group_details: the #FolksGroupDetails whose membership is to be edited, or + * %NULL * - * Change the #FolksGroupable whose group membership is to be edited by the + * Change the #FolksGroupDetails whose group membership is to be edited by the * #EmpathyGroupsWidget. */ void -empathy_groups_widget_set_groupable (EmpathyGroupsWidget *self, - FolksGroupable *groupable) +empathy_groups_widget_set_group_details (EmpathyGroupsWidget *self, + FolksGroupDetails *group_details) { EmpathyGroupsWidgetPriv *priv; g_return_if_fail (EMPATHY_IS_GROUPS_WIDGET (self)); - g_return_if_fail (groupable == NULL || FOLKS_IS_GROUPABLE (groupable)); + g_return_if_fail ( + group_details == NULL || FOLKS_IS_GROUP_DETAILS (group_details)); priv = GET_PRIV (self); - if (groupable == priv->groupable) + if (group_details == priv->group_details) return; - if (priv->groupable != NULL) + if (priv->group_details != NULL) { - g_signal_handlers_disconnect_by_func (priv->groupable, - groupable_group_changed_cb, self); + g_signal_handlers_disconnect_by_func (priv->group_details, + group_details_group_changed_cb, self); } - tp_clear_object (&priv->groupable); + tp_clear_object (&priv->group_details); - if (groupable != NULL) + if (group_details != NULL) { - priv->groupable = g_object_ref (groupable); + priv->group_details = g_object_ref (group_details); - g_signal_connect (priv->groupable, "group-changed", - (GCallback) groupable_group_changed_cb, self); + g_signal_connect (priv->group_details, "group-changed", + (GCallback) group_details_group_changed_cb, self); populate_data (self); } - g_object_notify (G_OBJECT (self), "groupable"); + g_object_notify (G_OBJECT (self), "group-details"); } diff --git a/libempathy-gtk/empathy-groups-widget.h b/libempathy-gtk/empathy-groups-widget.h index d74750194..1085fac4f 100644 --- a/libempathy-gtk/empathy-groups-widget.h +++ b/libempathy-gtk/empathy-groups-widget.h @@ -54,12 +54,12 @@ typedef struct { GType empathy_groups_widget_get_type (void) G_GNUC_CONST; -GtkWidget * empathy_groups_widget_new (FolksGroupable *groupable); +GtkWidget * empathy_groups_widget_new (FolksGroupDetails *group_details); -FolksGroupable * empathy_groups_widget_get_groupable ( +FolksGroupDetails * empathy_groups_widget_get_group_details ( EmpathyGroupsWidget *self); -void empathy_groups_widget_set_groupable (EmpathyGroupsWidget *self, - FolksGroupable *groupable); +void empathy_groups_widget_set_group_details (EmpathyGroupsWidget *self, + FolksGroupDetails *group_details); G_END_DECLS diff --git a/libempathy-gtk/empathy-individual-dialogs.c b/libempathy-gtk/empathy-individual-dialogs.c index 938406e31..2d3c6889f 100644 --- a/libempathy-gtk/empathy-individual-dialogs.c +++ b/libempathy-gtk/empathy-individual-dialogs.c @@ -196,7 +196,7 @@ empathy_block_individual_dialog_show (GtkWindow *parent, dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Block %s?"), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); /* build a list of personas that support blocking */ personas = folks_individual_get_personas (individual); @@ -237,7 +237,7 @@ empathy_block_individual_dialog_show (GtkWindow *parent, g_string_append_printf (text, _("Are you sure you want to block '%s' from contacting you again?"), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); if (npersonas_blocked > 0) g_string_append_printf (text, "\n\n%s\n%s", diff --git a/libempathy-gtk/empathy-individual-information-dialog.c b/libempathy-gtk/empathy-individual-information-dialog.c index fcbec1228..e14293d45 100644 --- a/libempathy-gtk/empathy-individual-information-dialog.c +++ b/libempathy-gtk/empathy-individual-information-dialog.c @@ -180,7 +180,7 @@ individual_information_dialog_set_individual ( /* Update the UI */ gtk_window_set_title (GTK_WINDOW (dialog), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); empathy_individual_widget_set_individual ( EMPATHY_INDIVIDUAL_WIDGET (priv->individual_widget), individual); set_label_visibility (dialog); diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c index a86aed966..4f4a7e20c 100644 --- a/libempathy-gtk/empathy-individual-menu.c +++ b/libempathy-gtk/empathy-individual-menu.c @@ -755,7 +755,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)); } @@ -767,7 +768,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); diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index 5035b77d3..242bad2be 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -168,7 +168,7 @@ add_individual_to_store (GtkTreeStore *self, gtk_tree_store_insert_with_values (self, iter, parent, 0, EMPATHY_INDIVIDUAL_STORE_COL_NAME, - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)), EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, individual, EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE, EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR, FALSE, @@ -387,12 +387,14 @@ individual_store_add_individual (EmpathyIndividualStore *self, priv = GET_PRIV (self); - if (EMP_STR_EMPTY (folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)))) + if (EMP_STR_EMPTY (folks_alias_details_get_alias ( + FOLKS_ALIAS_DETAILS (individual)))) return; if (priv->show_groups) { - group_set = folks_groupable_get_groups (FOLKS_GROUPABLE (individual)); + group_set = folks_group_details_get_groups ( + FOLKS_GROUP_DETAILS (individual)); groups = g_hash_table_get_keys (group_set); } @@ -445,7 +447,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; @@ -525,7 +528,7 @@ individual_store_contact_active_new (EmpathyIndividualStore *self, ShowActiveData *data; DEBUG ("Individual'%s' now active, and %s be removed", - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)), remove_ ? "WILL" : "WILL NOT"); data = g_slice_new0 (ShowActiveData); @@ -570,12 +573,13 @@ individual_store_contact_active_cb (ShowActiveData *data) if (data->remove) { DEBUG ("Individual'%s' active timeout, removing item", - folks_aliasable_get_alias (FOLKS_ALIASABLE (data->individual))); + folks_alias_details_get_alias ( + FOLKS_ALIAS_DETAILS (data->individual))); individual_store_remove_individual (data->self, data->individual); } DEBUG ("Individual'%s' no longer active", - folks_aliasable_get_alias (FOLKS_ALIASABLE (data->individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (data->individual))); individual_store_contact_set_active (data->self, data->individual, FALSE, TRUE); @@ -604,7 +608,7 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual, if (error != NULL) { DEBUG ("failed to retrieve pixbuf for individual %s: %s", - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)), error->message); g_clear_error (&error); } @@ -673,13 +677,13 @@ individual_store_contact_update (EmpathyIndividualStore *self, } /* Get online state now. */ - now_online = folks_presence_owner_is_online ( - FOLKS_PRESENCE_OWNER (individual)); + now_online = folks_presence_details_is_online ( + FOLKS_PRESENCE_DETAILS (individual)); if (!in_list) { DEBUG ("Individual'%s' in list:NO, should be:YES", - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); individual_store_add_individual (self, individual); @@ -693,7 +697,7 @@ individual_store_contact_update (EmpathyIndividualStore *self, else { DEBUG ("Individual'%s' in list:YES, should be:YES", - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); /* Get online state before. */ if (iters && g_list_length (iters) > 0) @@ -759,13 +763,13 @@ individual_store_contact_update (EmpathyIndividualStore *self, EMPATHY_INDIVIDUAL_STORE_COL_ICON_STATUS, pixbuf_status, EMPATHY_INDIVIDUAL_STORE_COL_PIXBUF_AVATAR_VISIBLE, show_avatar, EMPATHY_INDIVIDUAL_STORE_COL_NAME, - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)), EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE, - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (individual)), + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (individual)), EMPATHY_INDIVIDUAL_STORE_COL_STATUS, - folks_presence_owner_get_presence_message ( - FOLKS_PRESENCE_OWNER (individual)), + folks_presence_details_get_presence_message ( + FOLKS_PRESENCE_DETAILS (individual)), EMPATHY_INDIVIDUAL_STORE_COL_COMPACT, priv->is_compact, EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE, EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, now_online, @@ -804,7 +808,7 @@ individual_store_individual_updated_cb (FolksIndividual *individual, EmpathyIndividualStore *self) { DEBUG ("Individual'%s' updated, checking roster is in sync...", - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); individual_store_contact_update (self, individual); } @@ -1353,8 +1357,8 @@ individual_store_contact_sort (FolksIndividual *individual_a, /* alias */ ret_val = g_utf8_collate ( - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual_a)), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual_b))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual_a)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual_b))); if (ret_val != 0) goto out; @@ -1426,11 +1430,11 @@ individual_store_state_sort_func (GtkTreeModel *model, * the presences. */ folks_presence_type_a = - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (individual_a)); + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (individual_a)); folks_presence_type_b = - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (individual_b)); + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (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); diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index f455cd74e..3d8f00a2b 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -233,10 +233,10 @@ groups_change_group_cb (GObject *source, GAsyncResult *result, gpointer user_data) { - FolksGroupable *groupable = FOLKS_GROUPABLE (source); + FolksGroupDetails *group_details = FOLKS_GROUP_DETAILS (source); GError *error = NULL; - folks_groupable_change_group_finish (groupable, result, &error); + folks_group_details_change_group_finish (group_details, result, &error); if (error != NULL) { g_warning ("failed to change group: %s", error->message); @@ -367,14 +367,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; @@ -382,14 +384,14 @@ real_drag_individual_received_cb (EmpathyIndividualView *self, if (new_group != NULL) { - folks_groupable_change_group (FOLKS_GROUPABLE (individual), new_group, TRUE, - groups_change_group_cb, NULL); + folks_group_details_change_group (FOLKS_GROUP_DETAILS (individual), + new_group, TRUE, groups_change_group_cb, NULL); } if (old_group != NULL && action == GDK_ACTION_MOVE) { - folks_groupable_change_group (FOLKS_GROUPABLE (individual), old_group, - FALSE, groups_change_group_cb, NULL); + folks_group_details_change_group (FOLKS_GROUP_DETAILS (individual), + old_group, FALSE, groups_change_group_cb, NULL); } } @@ -621,7 +623,8 @@ individual_view_drag_motion (GtkWidget *widget, } if (individual != NULL && - folks_presence_owner_is_online (FOLKS_PRESENCE_OWNER (individual)) && + folks_presence_details_is_online ( + FOLKS_PRESENCE_DETAILS (individual)) && (caps & EMPATHY_CAPABILITIES_FT)) { gdk_drag_status (context, GDK_ACTION_COPY, time_); @@ -1638,13 +1641,13 @@ 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); /* check alias name */ - str = folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)); + str = folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)); if (empathy_live_search_match (live, str)) return TRUE; @@ -2374,7 +2377,7 @@ individual_view_remove_activate_cb (GtkMenuItem *menuitem, text = g_strdup_printf ( _("Are you sure you want to remove '%s' from your contacts?"), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); res = individual_view_remove_dialog_show (parent, _("Removing contact"), text, can_block); if (res == GTK_RESPONSE_YES || res == GTK_RESPONSE_REJECT) diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c index 19d0f81a7..ed5e3be6f 100644 --- a/libempathy-gtk/empathy-individual-widget.c +++ b/libempathy-gtk/empathy-individual-widget.c @@ -435,9 +435,9 @@ groups_update (EmpathyIndividualWidget *self) if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_EDIT_GROUPS && priv->individual != NULL) { - empathy_groups_widget_set_groupable ( + empathy_groups_widget_set_group_details ( EMPATHY_GROUPS_WIDGET (priv->groups_widget), - FOLKS_GROUPABLE (priv->individual)); + FOLKS_GROUP_DETAILS (priv->individual)); gtk_widget_show (priv->groups_widget); } else @@ -761,8 +761,8 @@ location_update (EmpathyIndividualWidget *self) /* Add a marker to the map */ marker = champlain_marker_new_with_text ( - folks_aliasable_get_alias (FOLKS_ALIASABLE (persona)), NULL, - NULL, NULL); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona)), + NULL, NULL, NULL); champlain_base_marker_set_position ( CHAMPLAIN_BASE_MARKER (marker), lat, lon); clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL); @@ -1058,7 +1058,8 @@ entry_alias_focus_event_cb (GtkEditable *editable, } else { - folks_aliasable_set_alias (FOLKS_ALIASABLE (priv->individual), alias); + folks_alias_details_set_alias (FOLKS_ALIAS_DETAILS (priv->individual), + alias); } } @@ -1070,8 +1071,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 @@ -1133,12 +1134,12 @@ notify_alias_cb (gpointer folks_object, if (GTK_IS_ENTRY (alias_widget)) { gtk_entry_set_text (GTK_ENTRY (alias_widget), - folks_aliasable_get_alias (FOLKS_ALIASABLE (folks_object))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (folks_object))); } else { gtk_label_set_label (GTK_LABEL (alias_widget), - folks_aliasable_get_alias (FOLKS_ALIASABLE (folks_object))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (folks_object))); } } @@ -1167,13 +1168,13 @@ notify_presence_cb (gpointer folks_object, state_image = g_object_get_data (table, "state-image"); /* FIXME: Default messages should be moved into libfolks (bgo#627403) */ - message = folks_presence_owner_get_presence_message ( - FOLKS_PRESENCE_OWNER (folks_object)); + message = folks_presence_details_get_presence_message ( + FOLKS_PRESENCE_DETAILS (folks_object)); if (EMP_STR_EMPTY (message)) { message = empathy_presence_get_default_message ( - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (folks_object))); + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (folks_object))); } if (message != NULL) @@ -1183,8 +1184,8 @@ notify_presence_cb (gpointer folks_object, gtk_image_set_from_icon_name (GTK_IMAGE (state_image), empathy_icon_name_for_presence ( - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (folks_object))), + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (folks_object))), GTK_ICON_SIZE_BUTTON); gtk_widget_show (state_image); } @@ -1213,8 +1214,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))); } } diff --git a/libempathy-gtk/empathy-linking-dialog.c b/libempathy-gtk/empathy-linking-dialog.c index b71b3660c..4818f604e 100644 --- a/libempathy-gtk/empathy-linking-dialog.c +++ b/libempathy-gtk/empathy-linking-dialog.c @@ -180,7 +180,7 @@ linking_response_cb (EmpathyLinkingDialog *self, /* Show a confirmation dialogue first */ dialog = gtk_message_dialog_new (GTK_WINDOW (self), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("Unlink meta-contact '%s'?"), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual))); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _("Are you sure you want to unlink this meta-contact? This will " "completely split the meta-contact into the contacts it " diff --git a/libempathy-gtk/empathy-persona-store.c b/libempathy-gtk/empathy-persona-store.c index c1c8ea956..060898bb5 100644 --- a/libempathy-gtk/empathy-persona-store.c +++ b/libempathy-gtk/empathy-persona-store.c @@ -142,7 +142,7 @@ persona_active_new (EmpathyPersonaStore *self, ShowActiveData *data; DEBUG ("Contact:'%s' now active, and %s be removed", - folks_aliasable_get_alias (FOLKS_ALIASABLE (persona)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona)), remove_ ? "WILL" : "WILL NOT"); data = g_slice_new0 (ShowActiveData); @@ -213,7 +213,7 @@ static gboolean persona_active_cb (ShowActiveData *data) { const gchar *alias = - folks_aliasable_get_alias (FOLKS_ALIASABLE (data->persona)); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (data->persona)); if (data->remove) { @@ -235,7 +235,7 @@ persona_updated_cb (FolksPersona *persona, EmpathyPersonaStore *self) { DEBUG ("Contact:'%s' updated, checking roster is in sync...", - folks_aliasable_get_alias (FOLKS_ALIASABLE (persona))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona))); update_persona (self, persona); } @@ -289,7 +289,7 @@ add_persona (EmpathyPersonaStore *self, priv = GET_PRIV (self); - alias = folks_aliasable_get_alias (FOLKS_ALIASABLE (persona)); + alias = folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona)); if (EMP_STR_EMPTY (alias)) return; @@ -408,7 +408,7 @@ update_persona (EmpathyPersonaStore *self, const gchar *alias; path = find_persona (self, persona); - alias = folks_aliasable_get_alias (FOLKS_ALIASABLE (persona)); + alias = folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona)); if (path == NULL) { @@ -438,8 +438,8 @@ update_persona (EmpathyPersonaStore *self, gtk_tree_path_free (path); /* Get online state now. */ - now_online = folks_presence_owner_is_online ( - FOLKS_PRESENCE_OWNER (persona)); + now_online = folks_presence_details_is_online ( + FOLKS_PRESENCE_DETAILS (persona)); /* Get online state before. */ gtk_tree_model_get (GTK_TREE_MODEL (self), &iter, @@ -485,11 +485,11 @@ update_persona (EmpathyPersonaStore *self, EMPATHY_PERSONA_STORE_COL_DISPLAY_ID, folks_persona_get_display_id (persona), EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE, - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (persona)), + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (persona)), EMPATHY_PERSONA_STORE_COL_STATUS, - folks_presence_owner_get_presence_message ( - FOLKS_PRESENCE_OWNER (persona)), + folks_presence_details_get_presence_message ( + FOLKS_PRESENCE_DETAILS (persona)), EMPATHY_PERSONA_STORE_COL_IS_ONLINE, now_online, EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL, empathy_contact_get_capabilities (contact) & @@ -556,8 +556,8 @@ sort_personas (FolksPersona *persona_a, /* alias */ ret_val = g_utf8_collate ( - folks_aliasable_get_alias (FOLKS_ALIASABLE (persona_a)), - folks_aliasable_get_alias (FOLKS_ALIASABLE (persona_b))); + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona_a)), + folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (persona_b))); if (ret_val != 0) goto out; @@ -622,9 +622,10 @@ state_sort_func (GtkTreeModel *model, * the presences. */ ret_val = -tp_connection_presence_type_cmp_availability ( - folks_presence_owner_get_presence_type (FOLKS_PRESENCE_OWNER (persona_a)), - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (persona_b))); + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (persona_a)), + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (persona_b))); if (ret_val == 0) { /* Fallback: compare by name et al. */ diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index 11a0f4776..a23b1de2a 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -232,8 +232,8 @@ empathy_icon_name_for_individual (FolksIndividual *individual) TpConnectionPresenceType presence; folks_presence = - folks_presence_owner_get_presence_type ( - FOLKS_PRESENCE_OWNER (individual)); + folks_presence_details_get_presence_type ( + FOLKS_PRESENCE_DETAILS (individual)); presence = empathy_folks_presence_type_to_tp (folks_presence); return empathy_icon_name_for_presence (presence); @@ -634,7 +634,7 @@ empathy_pixbuf_avatar_from_individual_scaled_async ( empathy_pixbuf_avatar_from_individual_scaled_async); avatar_file = - folks_avatar_owner_get_avatar (FOLKS_AVATAR_OWNER (individual)); + folks_avatar_details_get_avatar (FOLKS_AVATAR_DETAILS (individual)); if (avatar_file == NULL) goto out; |