diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-14 16:10:31 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-04-14 16:10:31 +0200 |
commit | aec895206f9ee308f75f3ffa4008d7fc1ec853b0 (patch) | |
tree | 1d645d6d4648f9a2a88c6ed4df0a2a59495e5022 /src/contacts-contact.vala | |
parent | 1a65ee457b0724d2f4c52830ba4ed9e826a91d08 (diff) | |
download | gnome-contacts-aec895206f9ee308f75f3ffa4008d7fc1ec853b0.tar.gz |
ContactPane: split set_edit_mode in 2 methods.
* A start_editing() method
* A stop_editing() method
Also clean up those methods a bit.
Diffstat (limited to 'src/contacts-contact.vala')
-rw-r--r-- | src/contacts-contact.vala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala index 9d63c60..44ba196 100644 --- a/src/contacts-contact.vala +++ b/src/contacts-contact.vala @@ -502,12 +502,11 @@ public class Contacts.Contact : GLib.Object { * if none, creates a new persona and writes to it, returning the new * persona. */ - public static async Persona? set_individual_property (Contact contact, - string property_name, - Value value) throws GLib.Error, PropertyError { + public async Persona? set_individual_property (string property_name, Value value) + throws GLib.Error, PropertyError { bool did_set = false; // Need to make a copy here as it could change during the yields - var personas_copy = contact.individual.personas.to_array (); + var personas_copy = this.individual.personas.to_array (); foreach (var p in personas_copy) { if (property_name in p.writeable_properties) { did_set = true; @@ -516,7 +515,7 @@ public class Contacts.Contact : GLib.Object { } if (!did_set) { - var fake = new FakePersona (contact.store, contact); + var fake = new FakePersona (this.store, this); return yield fake.make_real_and_set (property_name, value); } return null; |