aboutsummaryrefslogtreecommitdiff
path: root/misc/xfce4-weather-plugin
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2019-12-26 19:41:27 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2019-12-26 19:41:27 +0000
commit6827e3c06295eb2f2559bdbe0b2adcae04464e10 (patch)
treede33d5f92a342415535d7d92fe04bda0a6650aaa /misc/xfce4-weather-plugin
parent1dc6cb1c485bb53344066317e8ac080e09c1251e (diff)
downloadports-6827e3c06295eb2f2559bdbe0b2adcae04464e10.tar.gz
ports-6827e3c06295eb2f2559bdbe0b2adcae04464e10.zip
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>
Notes
Notes: svn path=/head/; revision=520946
Diffstat (limited to 'misc/xfce4-weather-plugin')
-rw-r--r--misc/xfce4-weather-plugin/Makefile1
-rw-r--r--misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c33
-rw-r--r--misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h10
3 files changed, 44 insertions, 0 deletions
diff --git a/misc/xfce4-weather-plugin/Makefile b/misc/xfce4-weather-plugin/Makefile
index f40c1098974f..6b700fd157cb 100644
--- a/misc/xfce4-weather-plugin/Makefile
+++ b/misc/xfce4-weather-plugin/Makefile
@@ -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
diff --git a/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c b/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c
new file mode 100644
index 000000000000..a2fa2abc3f7c
--- /dev/null
+++ b/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.c
@@ -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);
diff --git a/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h b/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h
new file mode 100644
index 000000000000..923c83960650
--- /dev/null
+++ b/misc/xfce4-weather-plugin/files/patch-panel-plugin_weather.h
@@ -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
+