[libgweather/drop-old-api: 1/4] Remove GWeather.Info.get_radar()




commit f10d7ef6f21d65c111629fd08af8be20aaa23375
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Oct 15 16:52:13 2021 +0100

    Remove GWeather.Info.get_radar()
    
    The wx radar image provider was removed by commit e69f07f5, and the
    get_radar() method has been returning NULL long before that.

 doc/migrating-3to4.md          |  5 +++++
 libgweather/gweather-private.h |  4 ----
 libgweather/gweather-weather.c | 23 -----------------------
 libgweather/gweather-weather.h |  2 --
 4 files changed, 5 insertions(+), 29 deletions(-)
---
diff --git a/doc/migrating-3to4.md b/doc/migrating-3to4.md
index d2c67ca9..1a7a70de 100644
--- a/doc/migrating-3to4.md
+++ b/doc/migrating-3to4.md
@@ -36,3 +36,8 @@ while ((iter = gweather_location_next_child (location, iter)) != NULL) {
 method will consume the reference of the iterated child; if you are keeping
 a reference to each child `GWeatherLocation` you should acquire a strong
 reference to it, using [method GWeather Location ref].
+
+### Stop using `gweather_info_get_radar()`
+
+The radar image provider stopped working a while ago, and the `get_radar()`
+method has been returning `NULL` since then.
diff --git a/libgweather/gweather-private.h b/libgweather/gweather-private.h
index f022feb8..8682de34 100644
--- a/libgweather/gweather-private.h
+++ b/libgweather/gweather-private.h
@@ -155,10 +155,6 @@ struct _GWeatherInfo {
     GWeatherMoonLatitude moonlatitude;
     GSList *forecast_list; /* list of GWeatherInfo* for the forecast, NULL if not available */
     char *forecast_attribution;
-    char *radar_buffer;
-    char *radar_url;
-    GdkPixbufLoader *radar_loader;
-    GdkPixbufAnimation *radar;
     SoupSession *session;
     GSList *requests_pending;
 };
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 98b3998a..624bf1ad 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -43,7 +43,6 @@
 #define DISTANCE_UNIT    "distance-unit"
 #define SPEED_UNIT       "speed-unit"
 #define PRESSURE_UNIT    "pressure-unit"
-#define RADAR_KEY        "radar"
 #define DEFAULT_LOCATION "default-location"
 
 enum {
@@ -518,8 +517,6 @@ gweather_info_reset (GWeatherInfo *info)
 
     free_forecast_list (info);
 
-    g_clear_object (&info->radar);
-
     info->update = 0;
     info->current_time = time(NULL);
     info->sky = -1;
@@ -568,11 +565,6 @@ gweather_info_init (GWeatherInfo *info)
     g_signal_connect_object (info->settings, "changed",
                             G_CALLBACK (settings_changed_cb), info, 0);
 
-    info->radar_url = g_settings_get_string (info->settings, RADAR_KEY);
-    if (g_strcmp0 (info->radar_url, "") == 0) {
-        g_clear_pointer (&info->radar_url, g_free);
-    }
-
     gweather_info_reset (info);
 }
 
@@ -750,7 +742,6 @@ gweather_info_dispose (GObject *object)
     g_clear_object (&info->session);
 
     free_forecast_list (info);
-    g_clear_object (&info->radar);
 
     info->valid = FALSE;
 
@@ -768,7 +759,6 @@ gweather_info_finalize (GObject *object)
     if (info->glocation)
        gweather_location_unref (info->glocation);
 
-    g_clear_pointer (&info->radar_url, g_free);
     g_clear_pointer (&info->application_id, g_free);
     g_clear_pointer (&info->contact_info, g_free);
 
@@ -1327,19 +1317,6 @@ gweather_info_get_forecast_list (GWeatherInfo *info)
     return info->forecast_list;
 }
 
-/**
- * gweather_info_get_radar:
- * @info: a #GWeatherInfo
- *
- * Returns: (transfer none): what?
- */
-GdkPixbufAnimation *
-gweather_info_get_radar (GWeatherInfo *info)
-{
-    g_return_val_if_fail (GWEATHER_IS_INFO (info), NULL);
-    return info->radar;
-}
-
 /**
  * gweather_info_get_attribution:
  * @info: a #GWeatherInfo
diff --git a/libgweather/gweather-weather.h b/libgweather/gweather-weather.h
index 290858e9..f239f81a 100644
--- a/libgweather/gweather-weather.h
+++ b/libgweather/gweather-weather.h
@@ -114,8 +114,6 @@ char *                          gweather_info_get_sunset                (GWeathe
 GWEATHER_AVAILABLE_IN_ALL
 GSList *                        gweather_info_get_forecast_list         (GWeatherInfo *info);
 GWEATHER_AVAILABLE_IN_ALL
-GdkPixbufAnimation *            gweather_info_get_radar                 (GWeatherInfo *info);
-GWEATHER_AVAILABLE_IN_ALL
 const char *                    gweather_info_get_attribution           (GWeatherInfo *info);
 
 GWEATHER_AVAILABLE_IN_ALL


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