[libgweather/wip/hadess/weather-fixes: 6/6] gweather: Fix _gweather_info_new_clone() throwing warnings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/hadess/weather-fixes: 6/6] gweather: Fix _gweather_info_new_clone() throwing warnings
- Date: Wed, 13 Jan 2021 00:37:36 +0000 (UTC)
commit 1ebc7399c3d77265ea0cfc88e23b8e9a26b5b0f8
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 12 17:53:19 2021 +0100
gweather: Fix _gweather_info_new_clone() throwing warnings
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.
libgweather/gweather-weather.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 897b6844..d8301de3 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]