[Xfce4-commits] <xfce4-weather-plugin:master> Remove now unnecessary interval parameter from get_current_timeslice

Harald Judt noreply at xfce.org
Fri Jul 13 16:50:02 CEST 2012


Updating branch refs/heads/master
         to f43bb1782af08dc53f163a9806c79afeafca3f37 (commit)
       from 3e338a930c21ecd707b4d3da20a74d0fa52f7a18 (commit)

commit f43bb1782af08dc53f163a9806c79afeafca3f37
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Jul 10 14:00:33 2012 +0200

    Remove now unnecessary interval parameter from get_current_timeslice
    
    We're always providing combined point and interval data, so there's
    no need for the interval parameter.

 panel-plugin/weather-parsers.c |    2 +-
 panel-plugin/weather-parsers.h |    2 +-
 panel-plugin/weather-summary.c |    4 ++--
 panel-plugin/weather.c         |    7 +++----
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 415e83f..9384fae 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -158,7 +158,7 @@ xml_time *get_timeslice(xml_weather *data, time_t start, time_t end)
 	return data->timeslice[data->num_timeslices - 1];
 }
 
-xml_time *get_current_timeslice(xml_weather *data, gboolean need_interval)
+xml_time *get_current_timeslice(xml_weather *data)
 {
     xml_time *forecast, *point_data, *interval_data;
     struct tm tm_now, tm_start, tm_end;
diff --git a/panel-plugin/weather-parsers.h b/panel-plugin/weather-parsers.h
index ef97c6a..23f9584 100644
--- a/panel-plugin/weather-parsers.h
+++ b/panel-plugin/weather-parsers.h
@@ -90,7 +90,7 @@ void parse_time (xmlNode * cur_node, xml_weather * data);
 void parse_location (xmlNode * cur_node, xml_location *location);
 
 xml_time *get_timeslice(xml_weather *data, time_t start, time_t end);
-xml_time *get_current_timeslice(xml_weather *data, gboolean interval);
+xml_time *get_current_timeslice(xml_weather *data);
 
 void xml_time_free(xml_time *timeslice);
 void xml_weather_free (xml_weather * data);
diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 8d2e4b0..b273d4c 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -274,7 +274,7 @@ create_summary_tab (xfceweather_data *data)
   APPEND_BTEXT (value);
   g_free (value);
 
-  timeslice = get_current_timeslice(data->weatherdata, FALSE);
+  timeslice = get_current_timeslice(data->weatherdata);
   APPEND_BTEXT(_("Coordinates and Time\n"));
   APPEND_TEXT_ITEM (_("Altitude"), ALTITUDE);
   APPEND_TEXT_ITEM (_("Latitude"), LATITUDE);
@@ -562,7 +562,7 @@ create_summary_window (xfceweather_data *data)
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE,
                       0);
 
-  timeslice = get_current_timeslice(data->weatherdata, TRUE);
+  timeslice = get_current_timeslice(data->weatherdata);
 
   rawvalue = get_data (timeslice, data->unit, SYMBOL);
   icon = get_icon (rawvalue, 48, is_night_time());
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 1d2d3f6..4c9f9e8 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -157,8 +157,7 @@ make_label (xml_weather    *weatherdata,
     txtsize = "xx-small";
 
   /* get data from current timeslice */
-  timeslice = get_current_timeslice(weatherdata,
-                                    opt == PRECIPITATIONS || opt == SYMBOL);
+  timeslice = get_current_timeslice(weatherdata);
   rawvalue = get_data(timeslice, unit, opt);
 
   switch (opt)
@@ -314,7 +313,7 @@ set_icon_current (xfceweather_data *data)
     }
  
   /* get data from current timeslice */
-  timeslice = get_current_timeslice(data->weatherdata, TRUE);
+  timeslice = get_current_timeslice(data->weatherdata);
   nighttime = is_night_time();
 
   str = get_data (timeslice, data->unit, SYMBOL);
@@ -805,7 +804,7 @@ static gboolean weather_get_tooltip_cb (GtkWidget        *widget,
   xml_time *timeslice;
   gboolean nighttime;
 
-  timeslice = get_current_timeslice(data->weatherdata, TRUE);
+  timeslice = get_current_timeslice(data->weatherdata);
   nighttime = is_night_time();
   if (data->weatherdata == NULL) {
     gtk_tooltip_set_text (tooltip, _("Cannot update weather data"));


More information about the Xfce4-commits mailing list