Date: Thu, 26 Dec 2019 19:41:27 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520946 - in head/misc/xfce4-weather-plugin: . files Message-ID: <201912261941.xBQJfRJH055367@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Thu Dec 26 19:41:27 2019 New Revision: 520946 URL: https://svnweb.freebsd.org/changeset/ports/520946 Log: Import changes from upstream bug reaport to make xfce4-weather-plugin use newer API, and avoid a warning about the old API being deprecated. PR: 242813 Submitted by: Olivier Duchateau <duchateau.olivier@gmail.com> Added: head/misc/xfce4-weather-plugin/files/ head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c (contents, props changed) head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h (contents, props changed) Modified: head/misc/xfce4-weather-plugin/Makefile Modified: head/misc/xfce4-weather-plugin/Makefile ============================================================================== --- head/misc/xfce4-weather-plugin/Makefile Thu Dec 26 19:34:35 2019 (r520945) +++ head/misc/xfce4-weather-plugin/Makefile Thu Dec 26 19:41:27 2019 (r520946) @@ -3,6 +3,7 @@ PORTNAME= xfce4-weather-plugin PORTVERSION= 0.10.0 +PORTREVISION= 1 CATEGORIES= misc xfce geography MASTER_SITES= XFCE/panel-plugins DIST_SUBDIR= xfce4 Added: head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c Thu Dec 26 19:41:27 2019 (r520946) @@ -0,0 +1,33 @@ +--- panel-plugin/weather.c.orig 2019-08-11 19:23:40 UTC ++++ panel-plugin/weather.c +@@ -588,6 +588,7 @@ cb_weather_update(SoupSession *session, + static gboolean + update_handler(plugin_data *data) + { ++ gchar *api_version = FORECAST_API; + gchar *url; + gboolean night_time; + time_t now_t; +@@ -653,9 +654,10 @@ update_handler(plugin_data *data) + data->weather_update->started = TRUE; + + /* build url */ +- url = g_strdup_printf("https://api.met.no/weatherapi" +- "/locationforecastlts/1.3/?lat=%s&lon=%s&" +- "msl=%d", ++ url = g_strdup_printf("https://api.met.no" ++ "/weatherapi/locationforecast/%s/" ++ "?lat=%s&lon=%s&msl=%d", ++ api_version, + data->lat, data->lon, data->msl); + + /* start receive thread */ +@@ -1928,7 +1930,7 @@ xfceweather_create_control(XfcePanelPlugin *plugin) + data->labels = g_array_new(FALSE, TRUE, sizeof(data_types)); + + /* create panel toggle button which will contain all other widgets */ +- data->button = xfce_create_panel_toggle_button(); ++ data->button = xfce_panel_create_toggle_button(); + gtk_container_add(GTK_CONTAINER(plugin), data->button); + xfce_panel_plugin_add_action_widget(plugin, data->button); + gtk_widget_show(data->button); Added: head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h Thu Dec 26 19:41:27 2019 (r520946) @@ -0,0 +1,10 @@ +--- panel-plugin/weather.h.orig 2019-08-11 19:23:40 UTC ++++ panel-plugin/weather.h +@@ -31,6 +31,7 @@ + #define MAX_FORECAST_DAYS 10 + #define DEFAULT_FORECAST_DAYS 5 + #define MAX_SCROLLBOX_LINES 10 ++#define FORECAST_API "1.9" + + G_BEGIN_DECLS +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912261941.xBQJfRJH055367>