summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-01-12 17:53:19 +0100
committerBastien Nocera <hadess@hadess.net>2021-01-12 17:53:19 +0100
commitf1548a7ec9db193dea66b9c25fd5c0cb2b03a510 (patch)
treeab8f7d84f8c203f4212bc4ad69c1e9272afaf394
parentadb13b7e1871d67dfdc49c6c00befcb055485eeb (diff)
downloadlibgweather-wip/hadess/weather-fixes.tar.gz
gweather: Fix _gweather_info_new_clone() throwing warningswip/hadess/weather-fixes
Order the properties to be copied onto the new object in an order that wouldn't throw warnings, eg. the "enabled-providers" property doesn't like to be set if the "application-id" and "contact-info" properties aren't set.
-rw-r--r--libgweather/gweather-weather.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 897b684..d8301de 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -2437,9 +2437,10 @@ GWeatherInfo *
_gweather_info_new_clone (GWeatherInfo *original)
{
return g_object_new (GWEATHER_TYPE_INFO,
- "location", original->glocation,
- "enabled-providers", original->providers,
"application-id", original->application_id,
+ "contact-info", original->contact_info,
+ "enabled-providers", original->providers,
+ "location", original->glocation,
NULL);
}