[evolution-data-server/wip/mcrha/soup3] Remove GWEATHER_CHECK_VERSION() macro usage



commit 5f89d86542944ceea61035f92357b98e80b1ec02
Author: Milan Crha <mcrha redhat com>
Date:   Thu Nov 11 13:01:54 2021 +0100

    Remove GWEATHER_CHECK_VERSION() macro usage

 src/calendar/backends/weather/e-weather-source.c | 23 -----------------------
 1 file changed, 23 deletions(-)
---
diff --git a/src/calendar/backends/weather/e-weather-source.c 
b/src/calendar/backends/weather/e-weather-source.c
index e7548cd03..6cb645408 100644
--- a/src/calendar/backends/weather/e-weather-source.c
+++ b/src/calendar/backends/weather/e-weather-source.c
@@ -68,12 +68,7 @@ weather_source_find_location_by_coords (GWeatherLocation *start,
                                         gdouble longitude)
 {
        GWeatherLocation *location;
-       #if GWEATHER_CHECK_VERSION(3, 39, 0)
        GWeatherLocation *child = NULL;
-       #else
-       GWeatherLocation **children;
-       gint ii;
-       #endif
 
        if (!start)
                return NULL;
@@ -90,7 +85,6 @@ weather_source_find_location_by_coords (GWeatherLocation *start,
                }
        }
 
-       #if GWEATHER_CHECK_VERSION(3, 39, 0)
        while (child = gweather_location_next_child (location, child), child) {
                GWeatherLocation *result;
 
@@ -100,16 +94,6 @@ weather_source_find_location_by_coords (GWeatherLocation *start,
                        return result;
                }
        }
-       #else
-       children = gweather_location_get_children (location);
-       for (ii = 0; children[ii]; ii++) {
-               location = weather_source_find_location_by_coords (children[ii], latitude, longitude);
-               if (location) {
-                       gweather_location_ref (location);
-                       return location;
-               }
-       }
-       #endif
 
        return NULL;
 }
@@ -143,11 +127,6 @@ e_weather_source_new (const gchar *location)
 
        glocation = gweather_location_find_by_station_code (world, tokens[0]);
 
-#if !GWEATHER_CHECK_VERSION(3, 39, 0)
-       if (glocation)
-               gweather_location_ref (glocation);
-#endif
-
        if (!glocation) {
                gdouble latitude, longitude;
                gchar *endptr = NULL;
@@ -159,9 +138,7 @@ e_weather_source_new (const gchar *location)
                }
        }
 
-#if GWEATHER_CHECK_VERSION(3, 39, 0)
        gweather_location_unref (world);
-#endif
        g_strfreev (tokens);
 
        if (glocation == NULL)


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