Updating branch refs/heads/master to 359bb2cde74fd0579924379efcb5c1ee09fb838e (commit) from 2b202977830b2c61e5cfa34768ae88fb9c02fb6b (commit)
commit 359bb2cde74fd0579924379efcb5c1ee09fb838e Author: Harald Judt <h.j...@gmx.at> Date: Wed Jul 18 10:49:41 2012 +0200 Clean up the clouds/cloudiness confusion. Do not mix up the terms low/medium/high clouds with "cloudiness", even if they are given in percent ;-) panel-plugin/weather-config.c | 8 ++++---- panel-plugin/weather-data.c | 28 ++++++++++++++-------------- panel-plugin/weather-data.h | 8 ++++---- panel-plugin/weather-parsers.c | 22 +++++++++++----------- panel-plugin/weather-parsers.h | 12 ++++++------ panel-plugin/weather-summary.c | 8 ++++---- panel-plugin/weather.c | 8 ++++---- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c index e5a94ce..e0974a9 100644 --- a/panel-plugin/weather-config.c +++ b/panel-plugin/weather-config.c @@ -42,10 +42,10 @@ static const labeloption labeloptions[OPTIONS_N] = { {N_("Wind direction (WD)"), WIND_DIRECTION}, {N_("Wind direction in degrees (WD)"), WIND_DIRECTION_DEG}, {N_("Humidity (H)"), HUMIDITY}, - {N_("Low cloudiness (CL)"), CLOUDINESS_LOW}, - {N_("Medium cloudiness (CM)"), CLOUDINESS_MED}, - {N_("High cloudiness (CH)"), CLOUDINESS_HIGH}, - {N_("Overall cloudiness (C)"), CLOUDINESS_OVERALL}, + {N_("Low clouds (CL)"), CLOUDS_LOW}, + {N_("Medium clouds (CM)"), CLOUDS_MED}, + {N_("High clouds (CH)"), CLOUDS_HIGH}, + {N_("Cloudiness (C)"), CLOUDINESS}, {N_("Fog (F)"), FOG}, {N_("Precipitations (R)"), PRECIPITATIONS}, }; diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index f26d56a..c029ea7 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -93,14 +93,14 @@ get_data (xml_time *timeslice, unit_systems unit_system, datas type) return LOCALE_DOUBLE(loc->wind_dir_deg, "%.1f"); case HUMIDITY: return LOCALE_DOUBLE(loc->humidity_value, "%.1f"); - case CLOUDINESS_LOW: - return LOCALE_DOUBLE(loc->cloudiness_percent[CLOUD_LOW], "%.1f"); - case CLOUDINESS_MED: - return LOCALE_DOUBLE(loc->cloudiness_percent[CLOUD_MED], "%.1f"); - case CLOUDINESS_HIGH: - return LOCALE_DOUBLE(loc->cloudiness_percent[CLOUD_HIGH], "%.1f"); - case CLOUDINESS_OVERALL: - return LOCALE_DOUBLE(loc->cloudiness_percent[CLOUD_OVERALL], "%.1f"); + case CLOUDS_LOW: + return LOCALE_DOUBLE(loc->clouds_percent[CLOUDS_PERC_LOW], "%.1f"); + case CLOUDS_MED: + return LOCALE_DOUBLE(loc->clouds_percent[CLOUDS_PERC_MED], "%.1f"); + case CLOUDS_HIGH: + return LOCALE_DOUBLE(loc->clouds_percent[CLOUDS_PERC_HIGH], "%.1f"); + case CLOUDINESS: + return LOCALE_DOUBLE(loc->clouds_percent[CLOUDS_PERC_CLOUDINESS], "%.1f"); case FOG: return LOCALE_DOUBLE(loc->fog_percent, "%.1f"); case PRECIPITATIONS: @@ -140,10 +140,10 @@ get_unit (xml_time *timeslice, unit_systems unit_system, datas type) case LONGITUDE: return "°"; case HUMIDITY: - case CLOUDINESS_LOW: - case CLOUDINESS_MED: - case CLOUDINESS_HIGH: - case CLOUDINESS_OVERALL: + case CLOUDS_LOW: + case CLOUDS_MED: + case CLOUDS_HIGH: + case CLOUDINESS: case FOG: return "%"; case PRECIPITATIONS: @@ -375,8 +375,8 @@ make_combined_timeslice(xml_time *point, xml_time *interval) loc->pressure_value = g_strdup(point->location->pressure_value); loc->pressure_unit = g_strdup(point->location->pressure_unit); - for (i = 0; i < NUM_CLOUDINESS; i++) - loc->cloudiness_percent[i] = g_strdup(point->location->cloudiness_percent[i]); + for (i = 0; i < CLOUDS_PERC_NUM; i++) + loc->clouds_percent[i] = g_strdup(point->location->clouds_percent[i]); loc->fog_percent = g_strdup(point->location->fog_percent); diff --git a/panel-plugin/weather-data.h b/panel-plugin/weather-data.h index d443458..a7b6911 100644 --- a/panel-plugin/weather-data.h +++ b/panel-plugin/weather-data.h @@ -31,10 +31,10 @@ typedef enum { WIND_DIRECTION, WIND_DIRECTION_DEG, HUMIDITY, - CLOUDINESS_LOW, - CLOUDINESS_MED, - CLOUDINESS_HIGH, - CLOUDINESS_OVERALL, + CLOUDS_LOW, + CLOUDS_MED, + CLOUDS_HIGH, + CLOUDINESS, FOG, PRECIPITATIONS, SYMBOL diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c index a3c9911..472f3b6 100644 --- a/panel-plugin/weather-parsers.c +++ b/panel-plugin/weather-parsers.c @@ -208,24 +208,24 @@ void parse_location (xmlNode * cur_node, xml_location *loc) loc->pressure_value = PROP(child_node, "value"); } if (NODE_IS_TYPE (child_node, "cloudiness")) { - g_free(loc->cloudiness_percent[CLOUD_OVERALL]); - loc->cloudiness_percent[CLOUD_OVERALL] = PROP(child_node, "percent"); + g_free(loc->clouds_percent[CLOUDS_PERC_CLOUDINESS]); + loc->clouds_percent[CLOUDS_PERC_CLOUDINESS] = PROP(child_node, "percent"); } if (NODE_IS_TYPE (child_node, "fog")) { g_free(loc->fog_percent); loc->fog_percent = PROP(child_node, "percent"); } if (NODE_IS_TYPE (child_node, "lowClouds")) { - g_free(loc->cloudiness_percent[CLOUD_LOW]); - loc->cloudiness_percent[CLOUD_LOW] = PROP(child_node, "percent"); + g_free(loc->clouds_percent[CLOUDS_PERC_LOW]); + loc->clouds_percent[CLOUDS_PERC_LOW] = PROP(child_node, "percent"); } if (NODE_IS_TYPE (child_node, "mediumClouds")) { - g_free(loc->cloudiness_percent[CLOUD_MED]); - loc->cloudiness_percent[CLOUD_MED] = PROP(child_node, "percent"); + g_free(loc->clouds_percent[CLOUDS_PERC_MED]); + loc->clouds_percent[CLOUDS_PERC_MED] = PROP(child_node, "percent"); } if (NODE_IS_TYPE (child_node, "highClouds")) { - g_free(loc->cloudiness_percent[CLOUD_HIGH]); - loc->cloudiness_percent[CLOUD_HIGH] = PROP(child_node, "percent"); + g_free(loc->clouds_percent[CLOUDS_PERC_HIGH]); + loc->clouds_percent[CLOUDS_PERC_HIGH] = PROP(child_node, "percent"); } if (NODE_IS_TYPE (child_node, "precipitation")) { g_free(loc->precipitation_unit); @@ -254,9 +254,9 @@ static void xml_location_free(xml_location *loc) g_free(loc->pressure_unit); g_free(loc->pressure_value); g_free(loc->fog_percent); - g_free(loc->cloudiness_percent[CLOUD_LOW]); - g_free(loc->cloudiness_percent[CLOUD_MED]); - g_free(loc->cloudiness_percent[CLOUD_HIGH]); + g_free(loc->clouds_percent[CLOUDS_PERC_LOW]); + g_free(loc->clouds_percent[CLOUDS_PERC_MED]); + g_free(loc->clouds_percent[CLOUDS_PERC_HIGH]); g_free(loc->precipitation_unit); g_free(loc->precipitation_value); g_free(loc->symbol); diff --git a/panel-plugin/weather-parsers.h b/panel-plugin/weather-parsers.h index e859531..336bbdc 100644 --- a/panel-plugin/weather-parsers.h +++ b/panel-plugin/weather-parsers.h @@ -30,11 +30,11 @@ G_BEGIN_DECLS enum { - CLOUD_LOW = 0, - CLOUD_MED, - CLOUD_HIGH, - CLOUD_OVERALL, - NUM_CLOUDINESS + CLOUDS_PERC_LOW = 0, + CLOUDS_PERC_MED, + CLOUDS_PERC_HIGH, + CLOUDS_PERC_CLOUDINESS, + CLOUDS_PERC_NUM }; typedef struct @@ -57,7 +57,7 @@ typedef struct gchar *pressure_value; gchar *pressure_unit; - gchar *cloudiness_percent[NUM_CLOUDINESS]; + gchar *clouds_percent[CLOUDS_PERC_NUM]; gchar *fog_percent; gchar *precipitation_value; diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c index 88e8999..573fad5 100644 --- a/panel-plugin/weather-summary.c +++ b/panel-plugin/weather-summary.c @@ -338,10 +338,10 @@ create_summary_tab (xfceweather_data *data) /* Clouds */ APPEND_BTEXT (_("\nClouds\n")); APPEND_TEXT_ITEM (_("Fog"), FOG); - APPEND_TEXT_ITEM (_("Low clouds"), CLOUDINESS_LOW); - APPEND_TEXT_ITEM (_("Medium clouds"), CLOUDINESS_MED); - APPEND_TEXT_ITEM (_("High clouds"), CLOUDINESS_HIGH); - APPEND_TEXT_ITEM (_("Cloudiness"), CLOUDINESS_OVERALL); + APPEND_TEXT_ITEM (_("Low clouds"), CLOUDS_LOW); + APPEND_TEXT_ITEM (_("Medium clouds"), CLOUDS_MED); + APPEND_TEXT_ITEM (_("High clouds"), CLOUDS_HIGH); + APPEND_TEXT_ITEM (_("Cloudiness"), CLOUDINESS); APPEND_BTEXT (_("\nData from The Norwegian Meteorological Institute\n")); APPEND_LINK_ITEM ("\t", _("Thanks to met.no"), "http://met.no/", ltag1); diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c index 4ab363b..3d0ec42 100644 --- a/panel-plugin/weather.c +++ b/panel-plugin/weather.c @@ -144,16 +144,16 @@ make_label (xfceweather_data *data, case HUMIDITY: lbl = _("H"); break; - case CLOUDINESS_LOW: + case CLOUDS_LOW: lbl = _("CL"); break; - case CLOUDINESS_MED: + case CLOUDS_MED: lbl = _("CM"); break; - case CLOUDINESS_HIGH: + case CLOUDS_HIGH: lbl = _("CH"); break; - case CLOUDINESS_OVERALL: + case CLOUDINESS: lbl = _("C"); break; case FOG: _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits