aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
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
parentc3a94ea730c9dff5a94573485fa648cee2adcac1 (diff)
downloadgsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.gz
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.bz2
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.lz
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.xz
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.tar.zst
gsoc2013-evolution-e875bd691c9d0d57bb3e93907f54a2481b37c413.zip
Fixes #310438
svn path=/trunk/; revision=30054
Diffstat (limited to 'calendar')
-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);
}