diff options
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index ef907aa162..e29c6c1ce6 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -393,8 +393,10 @@ save_comp (CompEditor *editor) result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error); } else { result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error); - } - + } + + priv->updating = FALSE; + if (!result) { GtkWidget *dlg; char *msg; @@ -428,8 +430,6 @@ save_comp (CompEditor *editor) priv->changed = FALSE; } - priv->updating = FALSE; - return TRUE; } @@ -1525,10 +1525,27 @@ obj_modified_cb (ECal *client, GList *objects, gpointer data) { CompEditor *editor = COMP_EDITOR (data); CompEditorPrivate *priv; + GList *l; + gboolean found = FALSE; ECalComponent *comp = NULL; priv = editor->priv; + /* see if the component being edited is one that has changed */ + for (l = objects; l != NULL; l = l->next) { + const char *our_uid, *uid; + + e_cal_component_get_uid (priv->comp, &our_uid); + uid = icalcomponent_get_uid (l->data); + if (uid && our_uid && strcmp (uid, our_uid) == 0) { + found = TRUE; + break; + } + } + + if (!found) + return; + /* We queried based on a specific UID so we definitely changed */ if (priv->updating) return; |