summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-01-11 17:42:18 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-12 10:48:02 +0100
commite546754bd7d5f5c99006eb1d0151d75e3436a23a (patch)
tree7ecccdefa2b31bce6667b22ecdfcf4dd3125fd6f
parent18733aafa0020292aa723ab3b775c91bd9024e46 (diff)
downloadlibgweather-e546754bd7d5f5c99006eb1d0151d75e3436a23a.tar.gz
gweather: Fix _gweather_info_new_clone() not copying all properties
Make sure to also copy the "enabled-providers" property when cloning the info object.
-rw-r--r--libgweather/gweather-weather.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 651aedc..918bc8a 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -2266,6 +2266,9 @@ gweather_info_new (GWeatherLocation *location)
GWeatherInfo *
_gweather_info_new_clone (GWeatherInfo *other)
{
- return g_object_new (GWEATHER_TYPE_INFO, "location", other->glocation, NULL);
+ return g_object_new (GWEATHER_TYPE_INFO,
+ "location", other->glocation,
+ "enabled-providers", other->providers,
+ NULL);
}