views/week-grid: Port to GListModel

And, while at it, rewrite the layout algorithm to operate on blocks of
overlapping events, and segmented columns. Like the month view row,
layouts blocks are invalidated at any point in time, but recalculated
immediately before a relayout happens.

The reason for doing such a massive rewrite while in the middle of the
port to GListModel is because it's easier to handle GListModel data
with this approach, than with the previous approach of storing it all
in a GcalRangeTree.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1153
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742>
This commit is contained in:
Georges Basile Stavracas Neto
2026-05-03 16:57:53 +00:00
committed by Marge Bot
parent 5fe24582d4
commit fa03c6f9af
3 changed files with 416 additions and 218 deletions
+2 -5
View File
@@ -33,11 +33,8 @@ G_DECLARE_FINAL_TYPE (GcalWeekGrid, gcal_week_grid, GCAL, WEEK_GRID, GtkWidget)
void gcal_week_grid_set_first_weekday (GcalWeekGrid *week_grid,
gint nr_day);
void gcal_week_grid_add_event (GcalWeekGrid *self,
GcalEvent *event);
void gcal_week_grid_remove_event (GcalWeekGrid *self,
const gchar *uid);
void gcal_week_grid_set_model (GcalWeekGrid *self,
GListModel *model);
GList* gcal_week_grid_get_children_by_uuid (GcalWeekGrid *self,
GcalRecurrenceModType mod,