GNOME Bugzilla – Bug 657991
Use asynchronous property setters
Last modified: 2011-09-02 18:46:32 UTC
Shiny new API from bug #657510 which is here to ruin your day. Patch coming.
Created attachment 195428 [details] [review] Use asynchronous property setters As mentioned in the commit message, this patch unfortunately can't be nicer due to the lack of support for async delegates in Vala. It ports the property setting to use the new async setters and adds a few yield statements, but doesn't do anything new about error handling since I wasn't sure how you wanted to handle it. If you let me know how you want to handle PropertyError errors which come back from the change_*() methods, I can update the patch/provide a new patch to do that. (The only PropertyErrors you're likely to encounter are obscure ones like “the backend failed to respond in a reasonable amount of time” or “unknown error”, since the code in gnome-contacts already checks whether a property's writeable before attempting to set it.
Looks good to me, please commit that when the folks side lands.
Comment on attachment 195428 [details] [review] Use asynchronous property setters commit 461395e64fd49846384bb87f3befb553162a5c94 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Thu Sep 1 19:31:50 2011 +0100 Bug 657991 — Use asynchronous property setters Port the contact pane to use the new asynchronous property setters in folks. This isn't as tidy as it should be: ideally each editing widget constructor would take an async delegate which it calls to set the appropriate property values in folks. However, async. delegates aren't supported yet by Vala (see: bgo#604827). Therefore we have to make do with a big switch statement on the property names. :-( Closes: bgo#657991 src/contacts-contact-pane.vala | 16 +++++---- src/contacts-contact.vala | 70 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 8 deletions(-)