summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2014-02-20 18:21:27 -0300
committerTravis Reitter <travis.reitter@collabora.co.uk>2014-02-20 16:22:18 -0800
commit87e037787476ba645ced4b8d6a406b32f7dbfae0 (patch)
tree9cf6c55bdbcef35d0ec7ad8a96f0bff400fdf927
parent9685842537243b5086aaf7353280aef248e10488 (diff)
Replaced use of EVCard.remove_attribute to EVCard.remove_attributes.
https://bugzilla.gnome.org/show_bug.cgi?id=724809
-rw-r--r--NEWS1
-rw-r--r--backends/eds/lib/edsf-persona-store.vala14
2 files changed, 6 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 6d393ef7..333ac05a 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Bugs fixed:
not supported for this expression
• Bug 723540 — standalone-individuals test failing with master
• Bug 724339 — vala.m4: don't keep generated files in git
+ • Bug 724809 — Fail to unset contact favorite
API changes:
• Add Individual.display_name
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index c27565bd..ce4f00da 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -1325,11 +1325,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
private void _remove_attribute (E.Contact contact, string attr_name)
{
- unowned VCardAttribute? attr = contact.get_attribute (attr_name);
- if (attr != null)
- {
- contact.remove_attribute ((!) attr);
- }
+ contact.remove_attributes (null, attr_name);
}
internal async void _set_avatar (Edsf.Persona persona, LoadableIcon? avatar)
@@ -2064,14 +2060,14 @@ public class Edsf.PersonaStore : Folks.PersonaStore
private void _set_contact_system_groups (E.Contact contact, Set<string> system_groups)
{
+ var group_ids_str = "X-GOOGLE-SYSTEM-GROUP-IDS";
var vcard = (E.VCard) contact;
- unowned E.VCardAttribute? prev_attr =
- vcard.get_attribute ("X-GOOGLE-SYSTEM-GROUP-IDS");
+ unowned E.VCardAttribute? prev_attr = vcard.get_attribute (group_ids_str);
if (prev_attr != null)
- contact.remove_attribute (prev_attr);
+ contact.remove_attributes (null, group_ids_str);
- E.VCardAttribute new_attr = new E.VCardAttribute ("", "X-GOOGLE-SYSTEM-GROUP-IDS");
+ E.VCardAttribute new_attr = new E.VCardAttribute ("", group_ids_str);
foreach (var group in system_groups)
{
if (group == null || group == "")