From eee3d97477aa0974cf33eed51377e23ab907a7a3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 15 Jun 2005 03:54:10 +0000 Subject: [PATCH] Fix 307689 --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkcalendar.c | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5c58203225..40994db64d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-14 Matthias Clasen + + * gtk/gtkcalendar.c: Update num_marked_dates as we + used to do. (#307689, Thorsten Schoenfeld) + 2005-06-14 Federico Mena Quintero Merged from gtk-2-6: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5c58203225..40994db64d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-06-14 Matthias Clasen + + * gtk/gtkcalendar.c: Update num_marked_dates as we + used to do. (#307689, Thorsten Schoenfeld) + 2005-06-14 Federico Mena Quintero Merged from gtk-2-6: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5c58203225..40994db64d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-06-14 Matthias Clasen + + * gtk/gtkcalendar.c: Update num_marked_dates as we + used to do. (#307689, Thorsten Schoenfeld) + 2005-06-14 Federico Mena Quintero Merged from gtk-2-6: diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 00a1e6864f..be5ccff394 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -599,6 +599,7 @@ gtk_calendar_init (GtkCalendar *calendar) for (i=0;i<31;i++) calendar->marked_date[i] = FALSE; + calendar->num_marked_dates = 0; calendar->selected_day = tm->tm_mday; calendar->display_flags = ( GTK_CALENDAR_SHOW_HEADING | @@ -3316,6 +3317,8 @@ gtk_calendar_clear_marks (GtkCalendar *calendar) calendar->marked_date[day] = FALSE; } + calendar->num_marked_dates = 0; + gtk_widget_queue_draw (GTK_WIDGET (calendar)); } @@ -3337,6 +3340,7 @@ gtk_calendar_mark_day (GtkCalendar *calendar, if (day >= 1 && day <= 31 && calendar->marked_date[day-1] == FALSE) { calendar->marked_date[day - 1] = TRUE; + calendar->num_marked_dates++; calendar_invalidate_day_num (calendar, day); } @@ -3361,6 +3365,7 @@ gtk_calendar_unmark_day (GtkCalendar *calendar, if (day >= 1 && day <= 31 && calendar->marked_date[day-1] == TRUE) { calendar->marked_date[day - 1] = FALSE; + calendar->num_marked_dates--; calendar_invalidate_day_num (calendar, day); }