diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-15 17:54:18 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-15 17:54:18 +0800 |
commit | 5d15b2ed1f68d17364a53549ceb503275c62769d (patch) | |
tree | 32dac87c02cf13e29a715e5432170ff7e0676b56 /libempathy-gtk | |
parent | cb0e2e0239d2bdad3aa4afbd683684f9ca2d1815 (diff) | |
parent | ff49ee828e63dd35b5c4faf3a0ccd962c7cd63a8 (diff) | |
download | gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar.gz gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar.bz2 gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar.lz gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar.xz gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.tar.zst gsoc2013-empathy-5d15b2ed1f68d17364a53549ceb503275c62769d.zip |
Merge remote branch 'pwith/634754-folks-api-changes'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-information-dialog.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 42 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-linking-dialog.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 3 |
5 files changed, 29 insertions, 26 deletions
diff --git a/libempathy-gtk/empathy-individual-information-dialog.c b/libempathy-gtk/empathy-individual-information-dialog.c index bb52e7d85..7659c8ba6 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_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); empathy_individual_widget_set_individual ( EMPATHY_INDIVIDUAL_WIDGET (priv->individual_widget), individual); set_label_visibility (dialog); diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index d30ce1a87..96bea8042 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -167,7 +167,7 @@ add_individual_to_store (GtkTreeStore *self, gtk_tree_store_insert_with_values (self, iter, parent, 0, EMPATHY_INDIVIDUAL_STORE_COL_NAME, - folks_individual_get_alias (individual), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, individual, EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE, EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR, FALSE, @@ -378,12 +378,12 @@ individual_store_add_individual (EmpathyIndividualStore *self, priv = GET_PRIV (self); - if (EMP_STR_EMPTY (folks_individual_get_alias (individual))) + if (EMP_STR_EMPTY (folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)))) return; if (priv->show_groups) { - group_set = folks_individual_get_groups (individual); + group_set = folks_groupable_get_groups (FOLKS_GROUPABLE (individual)); groups = g_hash_table_get_keys (group_set); } @@ -432,8 +432,6 @@ individual_store_add_individual (EmpathyIndividualStore *self, individual); } g_list_free (groups); - if (group_set != NULL) - g_hash_table_unref (group_set); if (priv->show_groups && folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual))) @@ -518,7 +516,8 @@ individual_store_contact_active_new (EmpathyIndividualStore *self, ShowActiveData *data; DEBUG ("Individual'%s' now active, and %s be removed", - folks_individual_get_alias (individual), remove_ ? "WILL" : "WILL NOT"); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), + remove_ ? "WILL" : "WILL NOT"); data = g_slice_new0 (ShowActiveData); @@ -562,12 +561,12 @@ individual_store_contact_active_cb (ShowActiveData *data) if (data->remove) { DEBUG ("Individual'%s' active timeout, removing item", - folks_individual_get_alias (data->individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (data->individual))); individual_store_remove_individual (data->self, data->individual); } DEBUG ("Individual'%s' no longer active", - folks_individual_get_alias (data->individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (data->individual))); individual_store_contact_set_active (data->self, data->individual, FALSE, TRUE); @@ -596,7 +595,7 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual, if (error != NULL) { DEBUG ("failed to retrieve pixbuf for individual %s: %s", - folks_individual_get_alias (individual), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), error->message); g_clear_error (&error); } @@ -662,12 +661,12 @@ individual_store_contact_update (EmpathyIndividualStore *self, } /* Get online state now. */ - now_online = folks_individual_is_online (individual); + now_online = folks_presence_is_online (FOLKS_PRESENCE (individual)); if (!in_list) { DEBUG ("Individual'%s' in list:NO, should be:YES", - folks_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); individual_store_add_individual (self, individual); @@ -681,7 +680,7 @@ individual_store_contact_update (EmpathyIndividualStore *self, else { DEBUG ("Individual'%s' in list:YES, should be:YES", - folks_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); /* Get online state before. */ if (iters && g_list_length (iters) > 0) @@ -747,11 +746,11 @@ 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_individual_get_alias (individual), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)), EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE, - folks_individual_get_presence_type (individual), + folks_presence_get_presence_type (FOLKS_PRESENCE (individual)), EMPATHY_INDIVIDUAL_STORE_COL_STATUS, - folks_individual_get_presence_message (individual), + folks_presence_get_presence_message (FOLKS_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, @@ -791,7 +790,7 @@ individual_store_individual_updated_cb (FolksIndividual *individual, EmpathyIndividualStore *self) { DEBUG ("Individual'%s' updated, checking roster is in sync...", - folks_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); individual_store_contact_update (self, individual); } @@ -1339,8 +1338,9 @@ individual_store_contact_sort (FolksIndividual *individual_a, g_return_val_if_fail (individual_a != NULL || individual_b != NULL, 0); /* alias */ - ret_val = g_utf8_collate (folks_individual_get_alias (individual_a), - folks_individual_get_alias (individual_b)); + ret_val = g_utf8_collate ( + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual_a)), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual_b))); if (ret_val != 0) goto out; @@ -1411,8 +1411,10 @@ individual_store_state_sort_func (GtkTreeModel *model, /* If we managed to get this far, we can start looking at * the presences. */ - folks_presence_type_a = folks_individual_get_presence_type (individual_a); - folks_presence_type_b = folks_individual_get_presence_type (individual_b); + folks_presence_type_a = + folks_presence_get_presence_type (FOLKS_PRESENCE (individual_a)); + folks_presence_type_b = + folks_presence_get_presence_type (FOLKS_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); diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 5f604058a..6eb301d34 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -680,7 +680,7 @@ individual_view_drag_motion (GtkWidget *widget, } if (individual != NULL && - folks_individual_is_online (individual) && + folks_presence_is_online (FOLKS_PRESENCE (individual)) && (caps & EMPATHY_CAPABILITIES_FT)) { gdk_drag_status (context, GDK_ACTION_COPY, time_); @@ -1665,7 +1665,7 @@ individual_view_is_visible_individual (EmpathyIndividualView *self, return (priv->show_offline || is_online); /* check alias name */ - str = folks_individual_get_alias (individual); + str = folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)); if (empathy_live_search_match (live, str)) return TRUE; @@ -2348,7 +2348,7 @@ individual_view_remove_activate_cb (GtkMenuItem *menuitem, text = g_strdup_printf (_ ("Do you really want to remove the contact '%s'?"), - folks_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); if (individual_view_remove_dialog_show (parent, _("Removing contact"), text)) { diff --git a/libempathy-gtk/empathy-linking-dialog.c b/libempathy-gtk/empathy-linking-dialog.c index d0a091053..323ec4e03 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_individual_get_alias (individual)); + folks_aliasable_get_alias (FOLKS_ALIASABLE (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-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index 667c11090..f33b6ebc0 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -231,7 +231,8 @@ empathy_icon_name_for_individual (FolksIndividual *individual) FolksPresenceType folks_presence; TpConnectionPresenceType presence; - folks_presence = folks_individual_get_presence_type (individual); + folks_presence = + folks_presence_get_presence_type (FOLKS_PRESENCE (individual)); presence = empathy_folks_presence_type_to_tp (folks_presence); return empathy_icon_name_for_presence (presence); |