[gnome-calendar/868-month-view-clicking-date-outside-of-month-in-agenda-list-makes-months-out-of-sync] gcal-date-chooser: Update also `combined_choice` in set_date()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/868-month-view-clicking-date-outside-of-month-in-agenda-list-makes-months-out-of-sync] gcal-date-chooser: Update also `combined_choice` in set_date()
- Date: Wed, 5 Oct 2022 15:05:40 +0000 (UTC)
commit 74bfba59014040e1215d2dfc11a727b34a6cb531
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 5 17:02:28 2022 +0200
gcal-date-chooser: Update also `combined_choice` in set_date()
Thus it's in sync with the rest of the date chooser.
Also use a common function to replace `self->date` value.
Related to https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/868
src/gui/event-editor/gcal-date-chooser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-date-chooser.c b/src/gui/event-editor/gcal-date-chooser.c
index 2c0cd39f..af12b6bd 100644
--- a/src/gui/event-editor/gcal-date-chooser.c
+++ b/src/gui/event-editor/gcal-date-chooser.c
@@ -466,13 +466,13 @@ gcal_date_chooser_set_date (GcalView *view,
g_date_time_get_ymd (self->date, &y1, &m1, &d1);
g_date_time_get_ymd (date, &y2, &m2, &d2);
- g_date_time_unref (self->date);
- self->date = g_date_time_ref (date);
+ gcal_set_date_time (&self->date, date);
if (y1 != y2 || m1 != m2)
{
gcal_multi_choice_set_value (GCAL_MULTI_CHOICE (self->year_choice), y2);
gcal_multi_choice_set_value (GCAL_MULTI_CHOICE (self->month_choice), m2 - 1);
+ gcal_multi_choice_set_value (GCAL_MULTI_CHOICE (self->combined_choice), y2 * 12 + m2 - 1);
calendar_compute_days (self);
gcal_timeline_subscriber_range_changed (GCAL_TIMELINE_SUBSCRIBER (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]