[evolution] Bug #603006 - Move All Contacts To enabled for read-only address books
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #603006 - Move All Contacts To enabled for read-only address books
- Date: Wed, 12 May 2010 17:29:12 +0000 (UTC)
commit 4e53d5e948214fceadb1eb477dac11c1bcaae8d5
Author: Milan Crha <mcrha redhat com>
Date: Wed May 12 19:27:45 2010 +0200
Bug #603006 - Move All Contacts To enabled for read-only address books
addressbook/gui/widgets/e-addressbook-view.c | 11 +++++++++--
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 c4d9ad2..88255fc 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 3ecea2c..e7b1c7b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]