diff options
author | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-04-30 04:33:04 +0800 |
---|---|---|
committer | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-07 00:30:52 +0800 |
commit | 736b4f3d04f1e826dd8252fed88a7445b52ad461 (patch) | |
tree | e043a1787299eed54393477c1d540fe56710538c /libempathy-gtk/empathy-individual-dialogs.c | |
parent | faa40483fd000099a0593c09d0e92b938beaaaa7 (diff) | |
download | gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar.gz gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar.bz2 gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar.lz gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar.xz gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.tar.zst gsoc2013-empathy-736b4f3d04f1e826dd8252fed88a7445b52ad461.zip |
Adapt to API break in folks_individual_get_personas.
Helps: bgo#648822 - Port Empathy to Folks 0.5.1
Diffstat (limited to 'libempathy-gtk/empathy-individual-dialogs.c')
-rw-r--r-- | libempathy-gtk/empathy-individual-dialogs.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-individual-dialogs.c b/libempathy-gtk/empathy-individual-dialogs.c index 2e88a742b..a19787662 100644 --- a/libempathy-gtk/empathy-individual-dialogs.c +++ b/libempathy-gtk/empathy-individual-dialogs.c @@ -186,7 +186,8 @@ empathy_block_individual_dialog_show (GtkWindow *parent, empathy_contact_manager_dup_singleton (); GtkWidget *dialog; GtkWidget *abusive_check = NULL; - GList *personas, *l; + GeeSet *personas; + GeeIterator *iter; GString *text = g_string_new (""); GString *blocked_str = g_string_new (""); GString *notblocked_str = g_string_new (""); @@ -208,17 +209,17 @@ empathy_block_individual_dialog_show (GtkWindow *parent, /* build a list of personas that support blocking */ personas = folks_individual_get_personas (individual); - - for (l = personas; l != NULL; l = l->next) + iter = gee_iterable_iterator (GEE_ITERABLE (personas)); + while (gee_iterator_next (iter)) { - TpfPersona *persona = l->data; + TpfPersona *persona = gee_iterator_get (iter); TpContact *contact; EmpathyContactListFlags flags; GString *s; char *str; if (!TPF_IS_PERSONA (persona)) - continue; + goto while_finish; contact = tpf_persona_get_contact (persona); flags = empathy_contact_manager_get_flags_for_connection ( @@ -241,7 +242,11 @@ empathy_block_individual_dialog_show (GtkWindow *parent, str = contact_pretty_name (contact); g_string_append_printf (s, "\n " BULLET_POINT " %s", str); g_free (str); + +while_finish: + g_clear_object (&persona); } + g_clear_object (&iter); g_string_append_printf (text, _("Are you sure you want to block '%s' from contacting you again?"), |