aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-12 12:52:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-12 23:44:52 +0800
commitc12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d (patch)
tree4cbdb439735c9a1406e9294a152996e7c10cf49c /modules/addressbook/e-book-shell-view.c
parent7a2a0d05a9ba46c1d6c6f43f1a2d00c0ad93479a (diff)
downloadgsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar.gz
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar.bz2
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar.lz
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar.xz
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.tar.zst
gsoc2013-evolution-c12e485e47f5ac99f0ddd7f7e90b9ab28b077c3d.zip
Simplify clipboard handling in addressbook.
Diffstat (limited to 'modules/addressbook/e-book-shell-view.c')
-rw-r--r--modules/addressbook/e-book-shell-view.c5
1 files changed, 4 insertions, 1 deletions
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);