[Xfce4-commits] <xfce4-weather-plugin:master> Cleanup: Remove xml_time from get_unit() parameters.
Harald Judt
noreply at xfce.org
Wed Jul 25 14:04:01 CEST 2012
Updating branch refs/heads/master
to dad97d875264a68ef313e73224d2963595c94374 (commit)
from 13adc71ad5bbc2f5636c4c11f7f89b8dc50f9d8e (commit)
commit dad97d875264a68ef313e73224d2963595c94374
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Jul 25 13:46:25 2012 +0200
Cleanup: Remove xml_time from get_unit() parameters.
It's not used here anymore.
panel-plugin/weather-data.c | 2 +-
panel-plugin/weather-data.h | 2 +-
panel-plugin/weather-summary.c | 8 ++++----
panel-plugin/weather-translate.c | 2 +-
panel-plugin/weather.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index cff2b20..b8ad206 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -117,7 +117,7 @@ get_data (xml_time *timeslice, unit_systems unit_system, datas type)
}
const gchar *
-get_unit (xml_time *timeslice, unit_systems unit_system, datas type)
+get_unit (unit_systems unit_system, datas type)
{
switch(type) {
case ALTITUDE:
diff --git a/panel-plugin/weather-data.h b/panel-plugin/weather-data.h
index a7b6911..1b3cec7 100644
--- a/panel-plugin/weather-data.h
+++ b/panel-plugin/weather-data.h
@@ -55,7 +55,7 @@ typedef enum {
gchar *
get_data (xml_time *timeslice, unit_systems unit_system, datas type);
const gchar *
-get_unit (xml_time *timeslice, unit_systems unit_system, datas type);
+get_unit (unit_systems unit_system, datas type);
gboolean
is_night_time();
time_t
diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 3b529b6..240718d 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -42,7 +42,7 @@ static gboolean lnk_clicked (GtkTextTag *tag, GObject *obj,
&iter, text, -1);\
g_free (value);
#define APPEND_TEXT_ITEM(text, item) rawvalue = get_data(conditions, data->unit_system, item); \
- unit = get_unit(conditions, data->unit_system, item); \
+ unit = get_unit(data->unit_system, item); \
value = g_strdup_printf("\t%s%s%s%s%s\n", \
text, text ? ": " : "", \
rawvalue, \
@@ -313,7 +313,7 @@ create_summary_tab (xfceweather_data *data)
rawvalue = get_data (conditions, data->unit_system, WIND_DIRECTION_DEG);
value = g_strdup_printf ("\t%s: %s (%s%s)\n", _("Direction"),
wind, rawvalue,
- get_unit (conditions, data->unit_system, WIND_DIRECTION_DEG));
+ get_unit (data->unit_system, WIND_DIRECTION_DEG));
g_free (rawvalue);
g_free (wind);
APPEND_TEXT_ITEM_REAL (value);
@@ -508,7 +508,7 @@ make_forecast (xfceweather_data *data)
rawvalue = get_data(fcdata, data->unit_system, TEMPERATURE);
value = g_strdup_printf("%s %s",
rawvalue,
- get_unit(fcdata, data->unit_system, TEMPERATURE));
+ get_unit(data->unit_system, TEMPERATURE));
g_free(rawvalue);
label = gtk_label_new(value);
gtk_box_pack_start(GTK_BOX(forecast_box), GTK_WIDGET(label),
@@ -521,7 +521,7 @@ make_forecast (xfceweather_data *data)
value = g_strdup_printf("%s %s %s",
wind_direction,
wind_speed,
- get_unit(fcdata, data->unit_system, WIND_SPEED));
+ get_unit(data->unit_system, WIND_SPEED));
g_free(wind_speed);
g_free(wind_direction);
g_free(rawvalue);
diff --git a/panel-plugin/weather-translate.c b/panel-plugin/weather-translate.c
index e78e222..7024afd 100644
--- a/panel-plugin/weather-translate.c
+++ b/panel-plugin/weather-translate.c
@@ -217,7 +217,7 @@ translate_wind_speed (xml_time *timeslice,
wspeed_loc = g_strdup (_("N/A"));
else {
wspeed_loc =
- g_strdup_printf ("%s %s", wspeed, get_unit (timeslice, unit_system, WIND_SPEED));
+ g_strdup_printf ("%s %s", wspeed, get_unit (unit_system, WIND_SPEED));
}
return wspeed_loc;
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index e8f3de5..c8296ab 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -193,7 +193,7 @@ make_label (xfceweather_data *data,
}
else
{
- unit = get_unit (conditions, data->unit_system, opt);
+ unit = get_unit (data->unit_system, opt);
str = g_strdup_printf ("<span size=\"%s\">%s: %s%s%s</span>",
txtsize, lbl, rawvalue,
strcmp(unit, "°") ? " " : "", unit);
@@ -207,7 +207,7 @@ make_label (xfceweather_data *data,
}
else
{
- unit = get_unit (conditions, data->unit_system, opt);
+ unit = get_unit (data->unit_system, opt);
str = g_strdup_printf ("<span size=\"%s\">%s%s%s</span>",
txtsize, rawvalue,
strcmp(unit, "°") ? " " : "", unit);
More information about the Xfce4-commits
mailing list