From: Corey Berla Date: Sat, 7 Jan 2023 04:12:10 +0000 (-0800) Subject: calendar: Only apply the marked_day to the current month X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~89^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e8a29f90d1911856ffd6fa8b2b85bb4bcc36217e;p=gtk4.git calendar: Only apply the marked_day to the current month The marked day gets applied to the current month, and either the previous or subsequent month if they are visible within the current month. This doesn't make any sense and likely was an accidental regression in a6f9052cf1c1c7b4224834ed18a63e70477d8729. Clarify the docs. --- diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 6f9e80653c..c671fb1185 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -1438,7 +1438,8 @@ gtk_calendar_select_day (GtkCalendar *calendar, else gtk_widget_remove_css_class (label, "other-month"); - if (calendar->marked_date[day-1]) + if (calendar->marked_date[day-1] && + calendar->day_month[y][x] == MONTH_CURRENT) gtk_widget_set_state_flags (label, GTK_STATE_FLAG_CHECKED, FALSE); else gtk_widget_unset_state_flags (label, GTK_STATE_FLAG_CHECKED); @@ -1538,7 +1539,7 @@ gtk_calendar_clear_marks (GtkCalendar *calendar) * @calendar: a `GtkCalendar` * @day: the day number to mark between 1 and 31. * - * Places a visual marker on a particular day. + * Places a visual marker on a particular day of the current month. */ void gtk_calendar_mark_day (GtkCalendar *calendar,