aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/tasks-component.c24
2 files changed, 29 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 427c7e08fc..f88c237c22 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,14 @@
+2005-08-10 Dinesh Layek < LDinesh@novell.com >
+
+ Fixes #310438
+ * gui/e-tasks.c:
+ (table_drag_data_delete): removing e_cal_object only when the
+ success flag is true
+ * gui/tasks-component.c:
+ (selector_tree_drag_data_received): made the success flag FALSE
+ when the data is already present in the destination calendar,
+ and TRUE otherwise.
+
2005-08-05 Chenthill Palanisamy <pchenthill@novell.com>
* gui/e-cal-component-preview.c: (write_html): Using format
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);
}