aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-view.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/widgets/e-addressbook-view.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/widgets/e-addressbook-view.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 70c3c2334e..187b08b290 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -67,7 +67,7 @@
#define d(x)
static void status_message (EAddressbookView *view, const gchar *status);
-static void search_result (EAddressbookView *view, EBookViewStatus status);
+static void search_result (EAddressbookView *view, EBookViewStatus status, const gchar *error_msg);
static void folder_bar_message (EAddressbookView *view, const gchar *status);
static void stop_state_changed (GtkObject *object, EAddressbookView *view);
static void backend_died (EAddressbookView *view);
@@ -1084,14 +1084,15 @@ status_message (EAddressbookView *view,
static void
search_result (EAddressbookView *view,
- EBookViewStatus status)
+ EBookViewStatus status,
+ const gchar *error_msg)
{
EShellView *shell_view;
EShellWindow *shell_window;
shell_view = e_addressbook_view_get_shell_view (view);
shell_window = e_shell_view_get_shell_window (shell_view);
- eab_search_result_dialog (GTK_WIDGET (shell_window), status);
+ eab_search_result_dialog (GTK_WIDGET (shell_window), status, error_msg);
}
static void
@@ -1252,9 +1253,9 @@ e_addressbook_view_print (EAddressbookView *view,
* which a user doesnt have write permission
*/
static void
-delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure)
+delete_contacts_cb (EBook *book, const GError *error, gpointer closure)
{
- switch (status) {
+ switch (error ? error->code : E_BOOK_ERROR_OK) {
case E_BOOK_ERROR_OK :
case E_BOOK_ERROR_CANCELLED :
break;
@@ -1265,7 +1266,7 @@ delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure)
break;
default :
/* Unknown error */
- eab_error_dialog (_("Failed to delete contact"), status);
+ eab_error_dialog (_("Failed to delete contact"), error);
break;
}
}
@@ -1391,10 +1392,10 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
}
/* Remove the cards all at once. */
- e_book_async_remove_contacts (book,
- ids,
- delete_contacts_cb,
- NULL);
+ e_book_async_remove_contacts_ex (book,
+ ids,
+ delete_contacts_cb,
+ NULL);
g_list_free (ids);
}
@@ -1402,10 +1403,10 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
for (l=list;l;l=g_list_next(l)) {
contact = l->data;
/* Remove the card. */
- e_book_async_remove_contact (book,
- contact,
- delete_contacts_cb,
- NULL);
+ e_book_async_remove_contact_ex (book,
+ contact,
+ delete_contacts_cb,
+ NULL);
}
}