diff options
author | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-08-08 00:38:20 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-08-08 00:38:20 +0800 |
commit | dc84df9871b3171a21d62feec988160f3c608103 (patch) | |
tree | 29f8dfbfa57dc43ae07fe645a1664fc5b1222086 /calendar/gui/calendar-model.c | |
parent | 64222beb23056f789551b79e78fa721d32408e9e (diff) | |
download | gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.gz gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.zst gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.zip |
Merge new-calendar-branch into HEAD
svn path=/trunk/; revision=22129
Diffstat (limited to 'calendar/gui/calendar-model.c')
-rw-r--r-- | calendar/gui/calendar-model.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 2724a0a19c..b5d0738729 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -1763,6 +1763,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid, CalendarModelPrivate *priv; int orig_idx; CalComponent *new_comp; + icalcomponent *icalcomp; const char *new_comp_uid; int *new_idx; CalClientGetStatus status; @@ -1775,10 +1776,22 @@ query_obj_updated_cb (CalQuery *query, const char *uid, orig_idx = remove_object (model, uid); - status = cal_client_get_object (priv->client, uid, &new_comp); + status = cal_client_get_object (priv->client, uid, &icalcomp); switch (status) { case CAL_CLIENT_GET_SUCCESS: + new_comp = cal_component_new (); + if (!cal_component_set_icalcomponent (new_comp, icalcomp)) { + g_object_unref (new_comp); + icalcomponent_free (icalcomp); + + if (orig_idx != -1) + e_table_model_row_deleted (E_TABLE_MODEL (model), orig_idx); + else + e_table_model_no_change (E_TABLE_MODEL (model)); + break; + } + /* Insert the object into the model */ cal_component_get_uid (new_comp, &new_comp_uid); |