From c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 11 Nov 2009 23:52:08 -0500 Subject: Simplify clipboard handling in addressbook. --- 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 8ea97caddc..88a503b024 100644 --- a/modules/addressbook/e-book-shell-view.c +++ b/modules/addressbook/e-book-shell-view.c @@ -246,6 +246,7 @@ book_shell_view_update_actions (EShellView *shell_view) gboolean source_is_busy; gboolean source_is_editable; gboolean source_is_empty; + gboolean clipboard_has_directory; priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (shell_view); @@ -268,6 +269,8 @@ book_shell_view_update_actions (EShellView *shell_view) (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE); source_is_empty = (state & E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY); + clipboard_has_directory = + (state & E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); state = e_shell_sidebar_check_state (shell_sidebar); @@ -301,7 +304,7 @@ book_shell_view_update_actions (EShellView *shell_view) gtk_action_set_sensitive (action, sensitive); action = ACTION (CONTACT_CLIPBOARD_PASTE); - sensitive = source_is_editable; + sensitive = source_is_editable && clipboard_has_directory; gtk_action_set_sensitive (action, sensitive); action = ACTION (CONTACT_COPY); -- cgit v1.2.3