Re: [evolution-patches] [calendar-gui]: revised fix for bug #310438
- From: chen <pchenthill novell com>
- To: Dinesh Layek <LDinesh novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] [calendar-gui]: revised fix for bug #310438
- Date: Wed, 10 Aug 2005 01:41:33 +0530
Committed the fix with some small modifications. Changed the word
calendar to task list. We need to call g_clear_error only if the
e_cal_get_object does not succeed and call update_objects if the
object is not found.
thanks, chenthill.
On Tue, 2005-08-09 at 12:18 +0530, Dinesh Layek wrote:
> Changes are made as per suggestions . The revised fix is attached.
> please review.
>
> Regards,
> Dinesh
>
>
> On Tue, 2005-08-09 at 02:01 +0530, chen wrote:
> > On Fri, 2005-08-05 at 06:30 -0600, Dinesh Layek wrote:
> > + icalcomponent *tmp_icalcomp = NULL;
> > This should be declared inside the following block
> >
> > if (e_cal_open (client, TRUE, NULL)) {d
> > -
> > The calendar needs to be opened first before making any calls to it, the
> > call should not be removed.
> >
> > > if (!e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL)) {
> > The tmp_icalcomp should be freed using the icalcomponent_free, if the
> > component, if it returns TRUE. The error value should be checked here,
> > instead of passing NULL to it.
> >
> > Please correct the typo errors in the ChangeLog
> >
> >
> > thanks, chenthill.
> >
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2789
diff -u -p -r1.2789 ChangeLog
--- ChangeLog 5 Aug 2005 12:15:33 -0000 1.2789
+++ ChangeLog 9 Aug 2005 19:43:57 -0000
@@ -1,3 +1,13 @@
+2005-08-09 Dinesh Layek < LDinesh novell com >
+
+ * 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
Index: gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.88
diff -u -p -r1.88 tasks-component.c
--- gui/tasks-component.c 23 Jun 2005 09:11:05 -0000 1.88
+++ gui/tasks-component.c 9 Aug 2005 19:44:03 -0000
@@ -743,10 +743,10 @@ selector_tree_drag_data_received (GtkWid
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 (GtkWid
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]