[gnome-calendar/868-month-view-clicking-date-outside-of-month-in-agenda-list-makes-months-out-of-sync: 3/4] gcal-date-chooser: Update also `combined_choice` in set_date()




commit 15ce841a6c11a5c1ef466ac08f2641a770efea53
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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-date-chooser.c b/src/gui/event-editor/gcal-date-chooser.c
index bb169eb0..af12b6bd 100644
--- a/src/gui/event-editor/gcal-date-chooser.c
+++ b/src/gui/event-editor/gcal-date-chooser.c
@@ -466,8 +466,7 @@ 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)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]