[evolution-patches] Fixes bug #64682 [calendar]
- From: pchenthill <pchenthill novell com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Fixes bug #64682 [calendar]
- Date: Wed, 29 Sep 2004 21:41:32 +0530
Hi,
Added a X property to tell the backend that the calendar item is moved
from one calendar to another. IF it has been moved send a
createItemsRequest to the server so that it does not send mails to the
Recipients. Specified the box_type as personal else the server would
create the item defaultly in SentItems Folder.
thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2518
diff -u -p -r1.2518 ChangeLog
--- ChangeLog 27 Sep 2004 14:14:11 -0000 1.2518
+++ ChangeLog 29 Sep 2004 16:02:09 -0000
@@ -1,3 +1,10 @@
+2004-09-29 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #64682
+ * gui/e-calendar-view.c (transfer_item_to):
+ Added an X property so that backend could identify
+ that the appointment has been moved from another calendar.
+
2004-09-24 Rodrigo Moya <rodrigo novell com>
Fixes #65599
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.63
diff -u -p -r1.63 e-calendar-view.c
--- gui/e-calendar-view.c 10 Aug 2004 14:04:20 -0000 1.63
+++ gui/e-calendar-view.c 29 Sep 2004 16:02:09 -0000
@@ -1110,6 +1110,7 @@ transfer_item_to (ECalendarViewEvent *ev
const char *uid;
char *new_uid;
icalcomponent *orig_icalcomp;
+ icalproperty *icalprop;
uid = icalcomponent_get_uid (event->comp_data->icalcomp);
@@ -1121,6 +1122,10 @@ transfer_item_to (ECalendarViewEvent *ev
return;
} else {
orig_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
+
+ icalprop = icalproperty_new_x ("1");
+ icalproperty_set_x_name (icalprop, "X-EVOLUTION-MOVE-CALENDAR");
+ icalcomponent_add_property (orig_icalcomp, icalprop);
if (!remove_item) {
/* change the UID to avoid problems with duplicated UIDs */
Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.67
diff -u -p -r1.67 ChangeLog
--- servers/groupwise/ChangeLog 23 Sep 2004 16:45:29 -0000 1.67
+++ servers/groupwise/ChangeLog 29 Sep 2004 15:51:47 -0000
@@ -1,3 +1,13 @@
+2004-09-29 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #64682
+ * e-gw-item.[ch] (e_gw_item_set_box_type), (e_gw_item_get_box_type):
+ Added two api's to send the boxtype which specifies in which
+ folder the item should be created to the server.
+
+ * e-gw-item.c (e_gw_item_set_calendar_item_elements):
+ Send the box type (Item source) to the server.
+
2004-09-23 JP Rosevear <jpr novell com>
* Makefile.am: build versioned library and don't hard code pkg
Index: servers/groupwise/e-gw-item.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.h,v
retrieving revision 1.20
diff -u -p -r1.20 e-gw-item.h
--- servers/groupwise/e-gw-item.h 8 Sep 2004 11:34:12 -0000 1.20
+++ servers/groupwise/e-gw-item.h 29 Sep 2004 15:51:47 -0000
@@ -111,6 +111,8 @@ EGwItemType e_gw_item_get_item_type (EGw
void e_gw_item_set_item_type (EGwItem *item, EGwItemType new_type);
const char *e_gw_item_get_container_id (EGwItem *item);
void e_gw_item_set_container_id (EGwItem *item, const char *new_id);
+const char *e_gw_item_get_box_type (EGwItem *item);
+void e_gw_item_set_box_type (EGwItem *item, const char *box_type);
const char *e_gw_item_get_icalid (EGwItem *item);
void e_gw_item_set_icalid (EGwItem *item, const char *new_icalid);
const char *e_gw_item_get_id (EGwItem *item);
Index: servers/groupwise/e-gw-item.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v
retrieving revision 1.46
diff -u -p -r1.46 e-gw-item.c
--- servers/groupwise/e-gw-item.c 8 Sep 2004 11:34:13 -0000 1.46
+++ servers/groupwise/e-gw-item.c 29 Sep 2004 15:51:48 -0000
@@ -34,6 +34,7 @@
struct _EGwItemPrivate {
EGwItemType item_type;
char *container;
+ char *source;
GList *category_list; /*list of category ids*/
/* properties */
@@ -190,6 +191,11 @@ e_gw_item_dispose (GObject *object)
priv->container = NULL;
}
+ if (priv->source) {
+ g_free (priv->source);
+ priv->source = NULL;
+ }
+
if (priv->id) {
g_free (priv->id);
priv->id = NULL;
@@ -1537,6 +1543,24 @@ e_gw_item_set_container_id (EGwItem *ite
item->priv->container = g_strdup (new_id);
}
+const char*
+e_gw_item_get_box_type (EGwItem *item)
+{
+ g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
+
+ return (const char *) item->priv->source;
+}
+
+void
+e_gw_item_set_box_type (EGwItem *item, const char *box_type)
+{
+ g_return_if_fail (E_IS_GW_ITEM (item));
+
+ if (item->priv->source)
+ g_free (item->priv->source);
+ item->priv->source = g_strdup (box_type);
+}
+
const char *
e_gw_item_get_icalid (EGwItem *item)
{
@@ -1906,6 +1930,8 @@ e_gw_item_set_calendar_item_elements (EG
EGwItemPrivate *priv = item->priv;
char *dtstring;
+ if (priv->source)
+ e_gw_message_write_string_parameter (msg, "source", NULL, priv->source);
if (priv->id)
e_gw_message_write_string_parameter (msg, "id", NULL, priv->id);
if (priv->container)
Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-cal-backend-groupwise-utils.c
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 22 Sep 2004 16:41:07 -0000 1.35
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c 29 Sep 2004 15:51:48 -0000
@@ -718,7 +718,7 @@ e_gw_connection_send_appointment (ECalBa
if (!g_strncasecmp (email_id, "mailto:", 7))
email_id += 7;
-
+
if (!g_ascii_strcasecmp (email_id, e_gw_connection_get_user_email (cnc))) {
attendee = tmp;
break;
@@ -788,13 +788,38 @@ e_gw_connection_create_appointment (EGwC
{
EGwItem *item;
EGwConnectionStatus status;
+ icalproperty *icalprop;
+ gboolean move_cal = FALSE;
+ icalcomponent *icalcomp;
+ char *id;
g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION);
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), E_GW_CONNECTION_STATUS_INVALID_OBJECT);
+ icalcomp = e_cal_component_get_icalcomponent (comp);
+
+ icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
+ while (icalprop) {
+ const char *x_name;
+
+ x_name = icalproperty_get_x_name (icalprop);
+ if (!strcmp (x_name, "X-EVOLUTION-MOVE-CALENDAR")) {
+ move_cal = TRUE;
+ break;
+ }
+
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
+ }
+
item = e_gw_item_new_from_cal_component (container, cbgw, comp);
e_gw_item_set_container_id (item, container);
- status = e_gw_connection_send_item (cnc, item, id_list);
+ if (!move_cal)
+ status = e_gw_connection_send_item (cnc, item, id_list);
+ else {
+ e_gw_item_set_box_type (item, "personal");
+ status = e_gw_connection_create_item (cnc, item, &id);
+ *id_list = g_list_append (*id_list, id);
+ }
g_object_unref (item);
return status;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]