aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/gui/e-cal-model.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f7c57a5e0b..f13c775c14 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,9 @@
2004-12-26 Rodrigo Moya <rodrigo@novell.com>
+ * gui/e-cal-model.c (search_by_uid_and_client): removed superfluous if
+ check.
+ (e_cal_view_objects_modified_cb): add all objects at once.
+
* gui/e-day-view.c (e_day_view_remove_event_cb): set fields we
free to NULL.
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index edc0c046a3..9d1cf2d0ab 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1238,7 +1238,7 @@ search_by_uid_and_client (ECalModelPrivate *priv, ECal *client, const char *uid)
tmp_uid = icalcomponent_get_uid (comp_data->icalcomp);
if (tmp_uid && *tmp_uid) {
- if ((!client || comp_data->client == client) && !strcmp (uid, tmp_uid))
+ if (comp_data->client == client && !strcmp (uid, tmp_uid))
return comp_data;
}
}
@@ -1384,7 +1384,6 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d
for (l = objects; l; l = l->next) {
ECalModelComponent *comp_data;
- GList node;
/* remove all recurrences and re-add them after generating them */
while ((comp_data = search_by_uid_and_client (priv, e_cal_view_get_client (query),
@@ -1397,11 +1396,10 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d
g_ptr_array_remove (priv->objects, comp_data);
e_cal_model_free_component_data (comp_data);
}
-
- node.prev = node.next = NULL;
- node.data = l->data;
- e_cal_view_objects_added_cb (query, &node, model);
}
+
+ /* now re-add all objects */
+ e_cal_view_objects_added_cb (query, objects, model);
}
static void