diff options
author | Maximiliano Sandoval R <msandova@gnome.org> | 2021-10-11 00:48:52 +0200 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2022-03-28 17:11:49 +0100 |
commit | 9d2a5f2e13eb1e6fa198d672468c2846edc1d305 (patch) | |
tree | 6402901088700d78cfd41987517e1ff00968d014 | |
parent | 897f236e537034fa8fc7339e064cdd6f623efadd (diff) | |
download | gnome-logs-9d2a5f2e13eb1e6fa198d672468c2846edc1d305.tar.gz |
Use GDate api from calendar
-rw-r--r-- | src/gl-searchpopover.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gl-searchpopover.c b/src/gl-searchpopover.c index 6ee3699..0c7a816 100644 --- a/src/gl-searchpopover.c +++ b/src/gl-searchpopover.c @@ -717,7 +717,6 @@ start_date_calendar_day_selected (GtkCalendar *calendar, { GDateTime *date; GDateTime *now; - guint year, month, day; gchar *date_label; GlSearchPopover *popover; GlSearchPopoverPrivate *priv; @@ -726,9 +725,7 @@ start_date_calendar_day_selected (GtkCalendar *calendar, priv = gl_search_popover_get_instance_private (popover); - gtk_calendar_get_date (calendar, &year, &month, &day); - - date = g_date_time_new_local (year, month + 1, day, 0, 0, 0); + date = gtk_calendar_get_date (calendar); /* Translators: date format for the start date entry * and start date button label in the custom range submenu, @@ -1088,7 +1085,6 @@ end_date_calendar_day_selected (GtkCalendar *calendar, { GDateTime *date; GDateTime *now; - guint year, month, day; gchar *date_label; GlSearchPopover *popover; GlSearchPopoverPrivate *priv; @@ -1097,9 +1093,7 @@ end_date_calendar_day_selected (GtkCalendar *calendar, priv = gl_search_popover_get_instance_private (popover); - gtk_calendar_get_date (calendar, &year, &month, &day); - - date = g_date_time_new_local (year, month + 1, day, 0, 0, 0); + date = gtk_calendar_get_date (calendar); /* Translators: date format for the end date entry * and end date button label in the custom range submenu, |