views: Redraw the agenda view when week-start-day changes
Updates the visible rows after the selected date shifts within the week. The agenda view displays all events starting from the selected day and up until the last day of the same week. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/822>
This commit is contained in:
@@ -299,6 +299,15 @@ gcal_agenda_view_get_previous_date (GcalView *view)
|
||||
return g_date_time_add_weeks (self->date, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
gcal_agenda_view_first_weekday_changed (GcalView *view)
|
||||
{
|
||||
GcalAgendaView *self = GCAL_AGENDA_VIEW (view);
|
||||
|
||||
gtk_list_view_scroll_to (self->list_view, 0, GTK_LIST_SCROLL_FOCUS, NULL);
|
||||
gcal_timeline_subscriber_range_changed (GCAL_TIMELINE_SUBSCRIBER (view));
|
||||
}
|
||||
|
||||
static void
|
||||
gcal_view_interface_init (GcalViewInterface *iface)
|
||||
{
|
||||
@@ -308,6 +317,7 @@ gcal_view_interface_init (GcalViewInterface *iface)
|
||||
iface->clear_marks = gcal_agenda_view_clear_marks;
|
||||
iface->get_next_date = gcal_agenda_view_get_next_date;
|
||||
iface->get_previous_date = gcal_agenda_view_get_previous_date;
|
||||
iface->first_weekday_changed = gcal_agenda_view_first_weekday_changed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user