Updating branch refs/heads/master
to 95641588512b8a9ffcc971d2d67893bdcd283312 (commit)
from 1534943e33bdb685f48eb79364e17e4c10762693 (commit)
commit 95641588512b8a9ffcc971d2d67893bdcd283312
Author: Harald Judt <[email protected]>
Date: Tue Jun 26 01:15:30 2012 +0200
Add code for finding out whether a timeslice exists.
panel-plugin/weather-data.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 00ed50f..426f331 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -27,6 +27,17 @@
#define CHK_NULL(s) ((s) ? (s):"")
+gboolean has_timeslice(xml_weather *data, time_t start, time_t end)
+{
+ int i = 0;
+ for (i = 0; i < data->num_timeslices; i++) {
+ if (data->timeslice[i]->start == start
+ && data->timeslice[i]->end == end)
+ return TRUE;
+ }
+ return FALSE;
+}
+
const gchar *
get_data (xml_time *timeslice, datas type)
{
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits