aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/comp-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r--calendar/gui/dialogs/comp-editor.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 62612975d2..1b3afd118b 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1450,9 +1450,21 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
if (!strcmp (uid, edit_uid) && !priv->updating) {
if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
- status = cal_client_get_object (priv->client, uid, &comp);
+ icalcomponent *icalcomp;
+
+ status = cal_client_get_object (priv->client, uid, &icalcomp);
if (status == CAL_CLIENT_GET_SUCCESS) {
- comp_editor_edit_comp (editor, comp);
+ comp = cal_component_new ();
+ if (cal_component_set_icalcomponent (comp, icalcomp))
+ comp_editor_edit_comp (editor, comp);
+ else {
+ GtkWidget *dlg;
+
+ dlg = gnome_error_dialog (_("Unable to obtain current version!"));
+ gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
+ icalcomponent_free (icalcomp);
+ }
+
g_object_unref((comp));
} else {
GtkWidget *dlg;