aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-12 09:40:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-12 09:41:46 +0800
commit425d49ebe1a6243d41984a87268353170e728187 (patch)
treec55b13c3702b9aa271e419e8c00c56d785363a47 /modules/calendar/e-cal-shell-view.c
parent623d0541ee69f1dfd37bd6e80d4afe15bba57c13 (diff)
downloadgsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar.gz
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar.bz2
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar.lz
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar.xz
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.tar.zst
gsoc2013-evolution-425d49ebe1a6243d41984a87268353170e728187.zip
Simplify clipboard handling in calendar.
Diffstat (limited to 'modules/calendar/e-cal-shell-view.c')
-rw-r--r--modules/calendar/e-cal-shell-view.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index b696660106..60a2781c71 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -284,6 +284,7 @@ cal_shell_view_update_actions (EShellView *shell_view)
gboolean sensitive;
gboolean is_meeting = FALSE;
gboolean is_delegatable = FALSE;
+ gboolean clipboard_has_calendar;
gint n_selected;
priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view);
@@ -356,6 +357,10 @@ cal_shell_view_update_actions (EShellView *shell_view)
uri = e_source_peek_relative_uri (source);
user_created_source = (uri != NULL && strcmp (uri, "system") != 0);
+ clipboard_has_calendar =
+ e_clipboard_wait_is_calendar_available (
+ gtk_clipboard_get (GDK_SELECTION_CLIPBOARD));
+
action = ACTION (CALENDAR_COPY);
sensitive = (source != NULL);
gtk_action_set_sensitive (action, sensitive);
@@ -381,7 +386,7 @@ cal_shell_view_update_actions (EShellView *shell_view)
gtk_action_set_sensitive (action, sensitive);
action = ACTION (EVENT_CLIPBOARD_PASTE);
- sensitive = editable;
+ sensitive = editable && clipboard_has_calendar;
gtk_action_set_sensitive (action, sensitive);
action = ACTION (EVENT_DELEGATE);