aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-08-10 03:54:55 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-10 03:54:55 +0800
commite875bd691c9d0d57bb3e93907f54a2481b37c413 (patch)
treef3bdc27dd833d4260ec7a5825d41e81f90ff4296 /calendar/gui
parentc3a94ea730c9dff5a94573485fa648cee2adcac1 (diff)
downloadgsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.gz
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.zst
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.zip
Fixes #310438
svn path=/trunk/; revision=30054
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/tasks-component.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 702a0a730d..778c55f6c3 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -743,10 +743,10 @@ selector_tree_drag_data_received (GtkWidget *widget,
goto finish;
icalcomp = icalparser_parse_string (data->data);
-
+
if (icalcomp) {
char * uid;
-
+
/* FIXME deal with GDK_ACTION_ASK */
if (context->action == GDK_ACTION_COPY) {
uid = e_cal_component_gen_uid ();
@@ -758,13 +758,25 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (client) {
if (e_cal_open (client, TRUE, NULL)) {
- success = TRUE;
- update_objects (client, icalcomp);
+ icalcomponent *tmp_icalcomp = NULL;
+ GError *error = NULL;
+ uid = icalcomponent_get_uid (icalcomp);
+ if (!e_cal_get_object (client, uid, NULL, &tmp_icalcomp, &error)) {
+ if ((error != NULL) && (error->code != E_CALENDAR_STATUS_OBJECT_NOT_FOUND))
+ g_message ("Failed to search the object in destination task list: %s",error->message);
+ else {
+ success = TRUE;
+ update_objects (client, icalcomp);
+ }
+
+ g_clear_error (&error);
+ } else
+ icalcomponent_free (tmp_icalcomp);
}
-
+
g_object_unref (client);
}
-
+
icalcomponent_free (icalcomp);
}