aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-content.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-content.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-content.c')
-rw-r--r--modules/addressbook/e-book-shell-content.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index 898bd2df39..4eccc971df 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -24,6 +24,7 @@
#include <glib/gi18n.h>
#include "e-util/e-binding.h"
+#include "e-util/e-selection.h"
#include "e-util/gconf-bridge.h"
#include "widgets/misc/e-paned.h"
@@ -258,6 +259,7 @@ book_shell_content_check_state (EShellContent *shell_content)
ESelectionModel *selection_model;
EAddressbookModel *model;
EAddressbookView *view;
+ GtkClipboard *clipboard;
guint32 state = 0;
gint n_contacts;
gint n_selected;
@@ -272,6 +274,8 @@ book_shell_content_check_state (EShellContent *shell_content)
n_selected = (selection_model != NULL) ?
e_selection_model_selected_count (selection_model) : 0;
+ clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+
/* FIXME Finish the rest of the flags. */
if (n_selected == 1)
state |= E_BOOK_SHELL_CONTENT_SELECTION_SINGLE;
@@ -283,6 +287,8 @@ book_shell_content_check_state (EShellContent *shell_content)
state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE;
if (n_contacts == 0)
state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY;
+ if (e_clipboard_wait_is_directory_available (clipboard))
+ state |= E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY;
return state;
}