aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2005-02-28 23:14:42 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-02-28 23:14:42 +0800
commite3cb534c019c245838d85d7f9421c5dc0010c21e (patch)
treec516e1c89d389399fdb5a5e00bcf0272c09d6c2b /calendar
parent520065ae72f20ab5d4c8203bf52673ff18d53c4b (diff)
downloadgsoc2013-evolution-e3cb534c019c245838d85d7f9421c5dc0010c21e.tar.gz
gsoc2013-evolution-e3cb534c019c245838d85d7f9421c5dc0010c21e.tar.zst
gsoc2013-evolution-e3cb534c019c245838d85d7f9421c5dc0010c21e.zip
Fixes #72958 If the backend returns success, if the delay delivery is set,
2005-02-28 Chenthill Palanisamy <pchenthill@novell.com> Fixes #72958 * gui/dialogs/comp-editor.c: (save_comp): If the backend returns success, if the delay delivery is set, do not show them in the view, since it will not be created in the server. svn path=/trunk/; revision=28914
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/dialogs/comp-editor.c29
2 files changed, 34 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 8fa8d07f2d..5b270d4f84 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-28 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #72958
+ * gui/dialogs/comp-editor.c: (save_comp): If the backend
+ returns success, if the delay delivery is set, do not
+ show them in the view, since it will not be created in the
+ server.
+
2005-02-25 Sivaiah Nallagatla <snallagatla@novell.com>
* gui/calendar-component.c (ensure_sources) :
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 6a933686f9..cb17c26300 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -592,6 +592,7 @@ save_comp (CompEditor *editor)
GError *error = NULL;
GHashTable *timezones;
const char *orig_uid;
+ icalcomponent *icalcomp;
priv = editor->priv;
@@ -644,14 +645,36 @@ save_comp (CompEditor *editor)
e_cal_component_set_attachment_list (priv->comp,
cal_attachment_bar_get_attachment_list ((CalAttachmentBar *) priv->attachment_bar));
-
+ icalcomp = e_cal_component_get_icalcomponent (priv->comp);
/* send the component to the server */
if (!cal_comp_is_on_server (priv->comp, priv->client)) {
- result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error);
+ result = e_cal_create_object (priv->client, icalcomp, NULL, &error);
} else {
- result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error);
+ result = e_cal_modify_object (priv->client, icalcomp, priv->mod, &error);
}
+ /* If the delay delivery is set, the items will not be created in the server immediately,
+ so we need not show them in the view. They will appear as soon as the server creates
+ it after the delay period */
+ if (result && e_cal_component_has_attendees (priv->comp)) {
+ gboolean delay_set = FALSE;
+ icalproperty *icalprop;
+ 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-OPTIONS-DELAY")) {
+ delay_set = TRUE;
+ break;
+ }
+
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
+ }
+ if (delay_set)
+ return TRUE;
+ }
+
if (!result) {
GtkWidget *dlg;
char *msg;