[gnome-panel/wip/muktupavels/gweather-4] clock: bump libgweather required version to 40.beta
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/muktupavels/gweather-4] clock: bump libgweather required version to 40.beta
- Date: Sun, 27 Feb 2022 16:45:12 +0000 (UTC)
commit 9d5b4a04fe4d444186d111384875ce268b7c1575
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Feb 25 21:17:06 2022 +0200
clock: bump libgweather required version to 40.beta
configure.ac | 6 +-----
modules/clock/clock-applet.c | 16 ----------------
modules/clock/clock-location.c | 11 -----------
3 files changed, 1 insertion(+), 32 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e69aeb8c9..3987adfd6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,7 @@ LIBECAL_REQUIRED=3.33.2
LIBEDATASERVER_REQUIRED=3.5.3
LIBSYSTEMD_REQUIRED=230
CAIRO_REQUIRED=1.0.0
-GWEATHER_REQUIRED=3.28.0
+GWEATHER_REQUIRED=40.beta
DCONF_REQUIRED=0.13.4
XRANDR_REQUIRED=1.3.0
@@ -222,10 +222,6 @@ PKG_CHECK_MODULES([CLOCK], [
polkit-gobject-1
])
-PKG_CHECK_EXISTS([gweather-3.0 >= 40.beta],
- AC_DEFINE([HAVE_GWEATHER_40], [1],
- [Define if gweather is 40 or newer]))
-
# Check whether to enable e-d-s support for clock applet
AC_MSG_CHECKING([whether to enable evolution-data-server support])
AC_ARG_ENABLE([eds],
diff --git a/modules/clock/clock-applet.c b/modules/clock/clock-applet.c
index bfa8d596c..81ba8d8f7 100644
--- a/modules/clock/clock-applet.c
+++ b/modules/clock/clock-applet.c
@@ -1107,15 +1107,8 @@ get_weather_station_location (GWeatherLocation *location)
* is the nearest weather station.
*/
if (gweather_location_get_level (location) == GWEATHER_LOCATION_DETACHED) {
-#ifdef HAVE_GWEATHER_40
station_loc = gweather_location_get_parent (location);
g_assert (station_loc != NULL);
-#else
- station_loc = gweather_location_get_parent (location);
- g_assert (station_loc != NULL);
-
- station_loc = gweather_location_ref (station_loc);
-#endif
} else {
station_loc = gweather_location_ref (location);
}
@@ -1125,15 +1118,8 @@ get_weather_station_location (GWeatherLocation *location)
tmp = station_loc;
-#ifdef HAVE_GWEATHER_40
station_loc = gweather_location_next_child (station_loc, NULL);
g_assert (station_loc != NULL);
-#else
- station_loc = gweather_location_get_children (station_loc)[0];
- g_assert (station_loc != NULL);
-
- station_loc = gweather_location_ref (station_loc);
-#endif
gweather_location_unref (tmp);
}
@@ -1816,9 +1802,7 @@ clock_applet_dispose (GObject *object)
g_clear_object (&applet->datetime_appinfo);
-#ifdef HAVE_GWEATHER_40
g_clear_pointer (&applet->world, gweather_location_unref);
-#endif
free_locations (applet);
diff --git a/modules/clock/clock-location.c b/modules/clock/clock-location.c
index 7496f16a2..673348199 100644
--- a/modules/clock/clock-location.c
+++ b/modules/clock/clock-location.c
@@ -72,12 +72,7 @@ get_gweather_timezone (ClockLocation *loc)
while (gweather_location_get_level (gloc) >= GWEATHER_LOCATION_CITY) {
tmp = gloc;
-#ifdef HAVE_GWEATHER_40
gloc = gweather_location_get_parent (gloc);
-#else
- gloc = gweather_location_get_parent (gloc);
- gloc = gweather_location_ref (gloc);
-#endif
gweather_location_unref (tmp);
}
@@ -501,10 +496,8 @@ static void
setup_weather_updates (ClockLocation *loc)
{
ClockLocationPrivate *priv;
-#ifdef HAVE_GWEATHER_40
const char *contact_info;
GWeatherProvider providers;
-#endif
priv = loc->priv;
@@ -517,7 +510,6 @@ setup_weather_updates (ClockLocation *loc)
priv->weather_info = gweather_info_new (priv->loc);
-#ifdef HAVE_GWEATHER_40
gweather_info_set_application_id (priv->weather_info, "org.gnome.gnome-panel");
contact_info = "https://gitlab.gnome.org/GNOME/gnome-panel/-/raw/master/gnome-panel.doap";
@@ -525,14 +517,11 @@ setup_weather_updates (ClockLocation *loc)
providers = GWEATHER_PROVIDER_METAR | GWEATHER_PROVIDER_IWIN;
gweather_info_set_enabled_providers (priv->weather_info, providers);
-#endif
g_signal_connect (priv->weather_info, "updated",
G_CALLBACK (weather_info_updated), loc);
set_weather_update_timeout (loc);
-#ifdef HAVE_GWEATHER_40
gweather_info_update (priv->weather_info);
-#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]