[Xfce4-commits] <xfce4-weather-plugin:master> Add debug code to dump units configuration.

Harald Judt noreply at xfce.org
Tue Nov 27 16:46:10 CET 2012


Updating branch refs/heads/master
         to b0190ba92c70d3a45a82e96e535426214f2e1d57 (commit)
       from 83aa4604e881e9e1dd893d35b8588e14644ded98 (commit)

commit b0190ba92c70d3a45a82e96e535426214f2e1d57
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Nov 23 11:46:42 2012 +0100

    Add debug code to dump units configuration.

 panel-plugin/weather-debug.c |   27 ++++++++++++++++++++++++++-
 panel-plugin/weather-debug.h |    2 ++
 2 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-debug.c b/panel-plugin/weather-debug.c
index 41d19f7..d6a9e45 100644
--- a/panel-plugin/weather-debug.c
+++ b/panel-plugin/weather-debug.c
@@ -266,7 +266,7 @@ weather_dump_astrodata(const xml_astro *astro)
 }
 
 
-gchar *
+static gchar *
 weather_dump_location(const xml_location *loc,
                       const gboolean interval)
 {
@@ -315,6 +315,31 @@ weather_dump_location(const xml_location *loc,
 
 
 gchar *
+weather_dump_units_config(const units_config *units)
+{
+    gchar *out;
+
+    if (!units)
+        return g_strdup("No units configuration data.");
+
+    out = g_strdup_printf("Units configuration data:\n"
+                          "  --------------------------------------------\n"
+                          "  Temperature: %d\n"
+                          "  Atmospheric pressure: %d\n"
+                          "  Windspeed: %d\n"
+                          "  Precipitations: %d\n"
+                          "  Altitude: %d\n"
+                          "  --------------------------------------------",
+                          units->temperature,
+                          units->pressure,
+                          units->windspeed,
+                          units->precipitations,
+                          units->altitude);
+    return out;
+}
+
+
+gchar *
 weather_dump_weatherdata(const xml_weather *weatherdata)
 {
     GString *out;
diff --git a/panel-plugin/weather-debug.h b/panel-plugin/weather-debug.h
index 97b8e50..2e49ea4 100644
--- a/panel-plugin/weather-debug.h
+++ b/panel-plugin/weather-debug.h
@@ -70,6 +70,8 @@ gchar *weather_dump_icon_theme(const icon_theme *theme);
 
 gchar *weather_dump_astrodata(const xml_astro *astrodata);
 
+gchar *weather_dump_units_config(const units_config *units);
+
 gchar *weather_dump_weatherdata(const xml_weather *weatherdata);
 
 gchar *weather_dump_plugindata(const xfceweather_data *data);


More information about the Xfce4-commits mailing list