[gnome-contacts] Display warnings if note save failed.



commit f72dcd2a5fec6b5e51507f55c094560cade923d9
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Oct 20 16:57:09 2011 +0200

    Display warnings if note save failed.

 src/contacts-contact-pane.vala |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 38fda36..9ac18d6 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1117,7 +1117,15 @@ public class Contacts.ContactPane : Grid {
       if (modified) {
 	var value = Value(notes.get_type ());
 	value.set_object (notes);
-	set_persona_property.begin (persona, "notes", value);
+	set_persona_property.begin (persona, "notes", value, (obj, result) => {
+	    try {
+	      set_persona_property.end (result);
+	    } catch (PropertyError e1) {
+	      warning ("Unable to save note: %s", e1.message);
+	    } catch (Error e2) {
+	      warning ("Unable to save note: %s", e2.message);
+	    }
+	  });
       }
     }
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]