diff options
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 11 | ||||
-rw-r--r-- | modules/addressbook/e-book-shell-view.c | 4 |
2 files changed, 13 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); diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c index 3ecea2c49f..e7b1c7b0b0 100644 --- a/modules/addressbook/e-book-shell-view.c +++ b/modules/addressbook/e-book-shell-view.c @@ -299,6 +299,10 @@ book_shell_view_update_actions (EShellView *shell_view) any_contacts_selected = (single_contact_selected || multiple_contacts_selected); + action = ACTION (ADDRESS_BOOK_MOVE); + sensitive = source_is_editable; + gtk_action_set_sensitive (action, sensitive); + action = ACTION (ADDRESS_BOOK_DELETE); sensitive = can_delete_primary_source; gtk_action_set_sensitive (action, sensitive); |