From 4e53d5e948214fceadb1eb477dac11c1bcaae8d5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 12 May 2010 19:27:45 +0200 Subject: Bug #603006 - Move All Contacts To enabled for read-only address books --- addressbook/gui/widgets/e-addressbook-view.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'addressbook/gui/widgets') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index c4d9ad236a..88255fc0a9 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1507,18 +1507,25 @@ view_transfer_contacts (EAddressbookView *view, GtkWindow *parent; book = e_addressbook_model_get_book (view->priv->model); + parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); if (all) { EBookQuery *query; + GError *error = NULL; query = e_book_query_any_field_contains (""); - e_book_get_contacts (book, query, &contacts, NULL); + e_book_get_contacts (book, query, &contacts, &error); e_book_query_unref (query); + + if (error) { + e_alert_run_dialog_for_args (parent, "addressbook:search-error", error->message, NULL); + g_error_free (error); + return; + } } else { contacts = e_addressbook_view_get_selected (view); } - parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); eab_transfer_contacts (book, contacts, delete_from_source, parent); g_object_unref(book); -- cgit