aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-05-13 01:27:45 +0800
committerMilan Crha <mcrha@redhat.com>2010-05-13 01:27:45 +0800
commit4e53d5e948214fceadb1eb477dac11c1bcaae8d5 (patch)
tree52f4ad40d7f5a5f2ed767754e81d5b0b4d43278b /addressbook
parent4abf496f28e91caeb434b0d13259434302acade7 (diff)
downloadgsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.gz
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.bz2
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.lz
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.xz
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.zst
gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.zip
Bug #603006 - Move All Contacts To enabled for read-only address books
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c11
1 files changed, 9 insertions, 2 deletions
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);