aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-07-01 08:21:39 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-07-01 08:21:39 +0800
commit0318bd9626855693602a5fe47b037dff86fda962 (patch)
treedd32ef5a76904485fc0ffd48b47419a65e69ad89 /calendar/gui/e-week-view.c
parent1e53a6e3d58c50e1f28c8cc289f7d6da8e9d76aa (diff)
downloadgsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar.gz
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar.bz2
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar.lz
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar.xz
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.tar.zst
gsoc2013-evolution-0318bd9626855693602a5fe47b037dff86fda962.zip
fixed clibpoard command activation from the menu entries. CTRL-C and
2001-07-01 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.c (e_day_view_*_clipboard): fixed clibpoard command activation from the menu entries. CTRL-C and CTRL-X don't work though, since it seems the key presses are being captured by the text item gui/e-week-view.c (e_week_view_*_clipboard): ditto svn path=/trunk/; revision=10641
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c37
1 files changed, 34 insertions, 3 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 7d0f2e1641..c620560227 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1646,22 +1646,53 @@ e_week_view_set_24_hour_format (EWeekView *week_view,
void
e_week_view_cut_clipboard (EWeekView *week_view)
{
+ EWeekViewEvent *event;
+ char *uid;
+
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- e_week_view_on_cut (NULL, week_view);
+
+ if (week_view->editing_event_num == -1)
+ return;
+
+ event = &g_array_index (week_view->events, EWeekViewEvent,
+ week_view->editing_event_num);
+ if (event == NULL)
+ return;
+
+ e_week_view_copy_clipboard (week_view);
+ cal_component_get_uid (event->comp, &uid);
+ cal_client_remove_object (week_view->client, uid);
}
void
e_week_view_copy_clipboard (EWeekView *week_view)
{
+ EWeekViewEvent *event;
+ char *comp_str;
+
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- e_week_view_on_copy (NULL, week_view);
+
+ event = &g_array_index (week_view->events, EWeekViewEvent,
+ week_view->editing_event_num);
+ if (event == NULL)
+ return;
+
+ comp_str = cal_component_get_as_string (event->comp);
+ if (week_view->clipboard_selection != NULL)
+ g_free (week_view->clipboard_selection);
+ week_view->clipboard_selection = comp_str;
+ gtk_selection_owner_set (week_view->invisible, clipboard_atom, GDK_CURRENT_TIME);
}
void
e_week_view_paste_clipboard (EWeekView *week_view)
{
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- e_week_view_on_paste (NULL, week_view);
+
+ gtk_selection_convert (week_view->invisible,
+ clipboard_atom,
+ GDK_SELECTION_TYPE_STRING,
+ GDK_CURRENT_TIME);
}