From 4f34f7b8720a8ae0686ebac8ef7faa8b543f26e6 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 3 May 2021 13:58:25 +0200 Subject: src/idolocationmenuitem.c: Fix deprecated g_time_zone_new warning. Fixes AyatanaIndicators/ayatana-ido#30 --- src/idolocationmenuitem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/idolocationmenuitem.c b/src/idolocationmenuitem.c index 8b16807..6999cc1 100644 --- a/src/idolocationmenuitem.c +++ b/src/idolocationmenuitem.c @@ -53,7 +53,12 @@ update_timestamp (IdoLocationMenuItem * self) IdoLocationMenuItemPrivate * priv = ido_location_menu_item_get_instance_private(self); - tz = g_time_zone_new (priv->timezone); + #if GLIB_CHECK_VERSION(2, 68, 0) + tz = g_time_zone_new_identifier (priv->timezone); + #else + tz = g_time_zone_new (priv->timezone); + #endif + if (tz == NULL) tz = g_time_zone_new_local (); date_time = g_date_time_new_now (tz); -- cgit v1.2.3