[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 03/05: Summary window: Show API deprecation warnings in Details tab.

noreply at xfce.org noreply at xfce.org
Fri Oct 24 14:24:43 CEST 2014


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository panel-plugins/xfce4-weather-plugin.

commit 376e36b77db3ab6a63f951b832a01fb4f11c2d4b
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Oct 24 14:15:58 2014 +0200

    Summary window: Show API deprecation warnings in Details tab.
    
    Show the API deprecation warnings at a more user-accessible place.
---
 panel-plugin/weather-summary.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index d1a827c..10aa72a 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -378,6 +378,16 @@ create_summary_tab(plugin_data *data)
     g_free(next_download);
     APPEND_TEXT_ITEM_REAL(value);
 
+    /* Check for deprecated API and issue a warning if necessary */
+    if (data->weather_update->http_status_code == 203)
+        APPEND_BTEXT
+            (_("\tMet.no LocationforecastLTS API states that this version\n"
+               "\tof the webservice is deprecated, and the plugin needs to be\n"
+               "\tadapted to use a newer version, or it will stop working within\n"
+               "\ta few months.\n"
+               "\tPlease file a bug on https://bugzilla.xfce.org if no one\n"
+               "\telse has done so yet.\n\n"));
+
     last_download = format_date(data->astro_update->last, NULL, TRUE);
     next_download = format_date(data->astro_update->next, NULL, TRUE);
     value = g_strdup_printf(_("\tAstronomical data:\n"
@@ -391,6 +401,15 @@ create_summary_tab(plugin_data *data)
     g_free(next_download);
     APPEND_TEXT_ITEM_REAL(value);
 
+    /* Check for deprecated sunrise API and issue a warning if necessary */
+    if (data->astro_update->http_status_code == 203)
+        APPEND_BTEXT
+            (_("\n\tMet.no sunrise API states that this version of the webservice\n"
+               "\tis deprecated, and the plugin needs to be adapted to use\n"
+               "\ta newer version, or it will stop working within a few months.\n"
+               "\tPlease file a bug on https://bugzilla.xfce.org if no one\n"
+               "\telse has done so yet.\n"));
+
     /* calculation times */
     APPEND_BTEXT(_("\nTimes Used for Calculations\n"));
     point = format_date(conditions->point, NULL, TRUE);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list