Bug#947000: Acknowledgement (xfce4-weather-plugin: moonset time not shown on no-moonrise days)
Here is the corresponding patch for sunrise and sunset, for the sake of
high-latitude users close to the middle of their time zone. Definitely
more of a corner case than the moonrise/moonset one.
The Sun may set today even though it last rose months ago.
For high-latitude locations, approximately once a year.
Index: xfce4-weather-plugin-0.8.11/panel-plugin/weather-summary.c
===================================================================
--- xfce4-weather-plugin-0.8.11.orig/panel-plugin/weather-summary.c 2019-12-19 09:26:57.061048252 +0100
+++ xfce4-weather-plugin-0.8.11/panel-plugin/weather-summary.c 2019-12-19 18:15:46.932435519 +0100
@@ -439,15 +439,16 @@
if (data->current_astro->sun_never_rises) {
value = g_strdup(_("\tSunrise:\t\tThe sun never rises today.\n"));
APPEND_TEXT_ITEM_REAL(value);
- } else if (data->current_astro->sun_never_sets) {
- value = g_strdup(_("\tSunset:\t\tThe sun never sets today.\n"));
- APPEND_TEXT_ITEM_REAL(value);
} else {
sunrise = format_date(data->current_astro->sunrise, NULL, FALSE);
value = g_strdup_printf(_("\tSunrise:\t\t%s\n"), sunrise);
g_free(sunrise);
APPEND_TEXT_ITEM_REAL(value);
-
+ }
+ if (data->current_astro->sun_never_sets) {
+ value = g_strdup(_("\tSunset:\t\tThe sun never sets today.\n"));
+ APPEND_TEXT_ITEM_REAL(value);
+ } else {
sunset = format_date(data->current_astro->sunset, NULL, FALSE);
value = g_strdup_printf(_("\tSunset:\t\t%s\n\n"), sunset);
g_free(sunset);
Reply to: