aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-quick-add.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
committerMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
commit03d626856b294bc98919ac244e04e9b8821a681d (patch)
tree62433e158f1791aa6b9222ecbe05d164c4703f6c /addressbook/gui/contact-editor/e-contact-quick-add.c
parent6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff)
downloadgsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.bz2
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.lz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.xz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.zst
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.zip
Bug #623204 - Be able to report detailed errors from backends
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-quick-add.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 0feced4ca0..032f4ac475 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -121,11 +121,11 @@ quick_add_set_vcard (QuickAdd *qa, const gchar *vcard)
}
static void
-merge_cb (EBook *book, EBookStatus status, gpointer closure)
+merge_cb (EBook *book, const GError *error, gpointer closure)
{
QuickAdd *qa = (QuickAdd *) closure;
- if (status == E_BOOK_ERROR_OK) {
+ if (!error) {
if (e_book_is_writable (book))
eab_merging_book_add_contact (book, qa->contact, NULL, NULL);
else
@@ -186,14 +186,14 @@ editor_closed_cb (GtkWidget *w, gpointer closure)
}
static void
-ce_have_contact (EBook *book, EBookStatus status, EContact *contact, gpointer closure)
+ce_have_contact (EBook *book, const GError *error, EContact *contact, gpointer closure)
{
QuickAdd *qa = (QuickAdd *) closure;
- if (status != E_BOOK_ERROR_OK) {
+ if (error) {
if (book)
g_object_unref (book);
- g_warning ("Failed to find contact, status %d.", status);
+ g_warning ("Failed to find contact, status %d (%s).", error->code, error->message);
quick_add_unref (qa);
} else {
EShell *shell;
@@ -235,14 +235,14 @@ ce_have_contact (EBook *book, EBookStatus status, EContact *contact, gpointer cl
}
static void
-ce_have_book (EBook *book, EBookStatus status, gpointer closure)
+ce_have_book (EBook *book, const GError *error, gpointer closure)
{
QuickAdd *qa = (QuickAdd *) closure;
- if (status != E_BOOK_ERROR_OK) {
+ if (error) {
if (book)
g_object_unref (book);
- g_warning ("Couldn't open local address book.");
+ g_warning ("Couldn't open local address book (%s).", error->message);
quick_add_unref (qa);
} else {
eab_merging_book_find_contact (book, qa->contact, ce_have_contact, qa);