From bb1653f64c0998f3c90d9cf0e7a2183dccd4611f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 14 Nov 2009 10:39:55 -0500 Subject: =?UTF-8?q?Bug=C2=A0600397=20-=20Delete=20option=20enabled=20for?= =?UTF-8?q?=20undeletable=20ESource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/addressbook/e-book-shell-view.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/addressbook/e-book-shell-view.c') diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c index d5f160d407..568bc4567a 100644 --- a/modules/addressbook/e-book-shell-view.c +++ b/modules/addressbook/e-book-shell-view.c @@ -237,6 +237,7 @@ book_shell_view_update_actions (EShellView *shell_view) /* Be descriptive. */ gboolean any_contacts_selected; + gboolean can_delete_primary_source; gboolean has_primary_source; gboolean multiple_contacts_selected; gboolean primary_source_is_system; @@ -277,6 +278,8 @@ book_shell_view_update_actions (EShellView *shell_view) has_primary_source = (state & E_BOOK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE); + can_delete_primary_source = + (state & E_BOOK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE); primary_source_is_system = (state & E_BOOK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM); @@ -284,7 +287,7 @@ book_shell_view_update_actions (EShellView *shell_view) (single_contact_selected || multiple_contacts_selected); action = ACTION (ADDRESS_BOOK_DELETE); - sensitive = has_primary_source && !primary_source_is_system; + sensitive = can_delete_primary_source; gtk_action_set_sensitive (action, sensitive); action = ACTION (ADDRESS_BOOK_PRINT); -- cgit v1.2.3