diff options
author | Milan Crha <mcrha@redhat.com> | 2010-05-13 01:27:45 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-05-13 01:27:45 +0800 |
commit | 4e53d5e948214fceadb1eb477dac11c1bcaae8d5 (patch) | |
tree | 52f4ad40d7f5a5f2ed767754e81d5b0b4d43278b | |
parent | 4abf496f28e91caeb434b0d13259434302acade7 (diff) | |
download | gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.gz gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.tar.zst gsoc2013-evolution-4e53d5e948214fceadb1eb477dac11c1bcaae8d5.zip |
Bug #603006 - Move All Contacts To enabled for read-only address books
-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); |