[Xfce4-commits] <xfce4-weather-plugin:master> Dump data structures where it seems useful.

Harald Judt noreply at xfce.org
Sun Aug 19 10:08:04 CEST 2012


Updating branch refs/heads/master
         to de845e93489d3ad3e10f4ff6ff9f179f811a3e30 (commit)
       from e45b3d59897cc7c7a8d79bd171b5e4a7335eca8c (commit)

commit de845e93489d3ad3e10f4ff6ff9f179f811a3e30
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat Aug 18 22:47:08 2012 +0200

    Dump data structures where it seems useful.
    
    After data downloads and panel size or orientation changes, and
    on initializing the plugin dump data structures to provide useful
    debugging info.

 panel-plugin/weather-search.c |    4 +++-
 panel-plugin/weather.c        |   13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c
index c2a16ab..77d2f73 100644
--- a/panel-plugin/weather-search.c
+++ b/panel-plugin/weather-search.c
@@ -30,7 +30,7 @@
 
 #include "weather-search.h"
 #include "weather-http.h"
-
+#include "weather-debug.h"
 
 #define BORDER 8
 
@@ -114,6 +114,7 @@ cb_searchdone(const gboolean succeed,
         for (cur_node = cur_node->children; cur_node;
              cur_node = cur_node->next) {
             place = parse_place(cur_node);
+            weather_dump(weather_dump_place, place);
 
             if (place && place->lat && place->lon && place->display_name) {
                 append_result(dialog->result_mdl,
@@ -393,6 +394,7 @@ cb_geolocation(const gboolean succeed,
 
     geo = parse_geolocation(xmlDocGetRootElement(doc));
     xmlFreeDoc(doc);
+    weather_dump(weather_dump_geolocation, geo);
 
     if (geo == NULL) {
         data->cb(NULL, NULL, NULL, METRIC, data->user_data);
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 2df1bbb..5ad2d79 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -334,6 +334,8 @@ cb_astro_update(const gboolean succeed,
         data->astrodata = astro;
         data->last_astro_update = time(NULL);
     }
+
+    weather_dump(weather_dump_astrodata, data->astrodata);
 }
 
 
@@ -371,6 +373,8 @@ cb_update(const gboolean succeed,
         data->last_data_update = time(NULL);
     }
     update_current_conditions(data);
+
+    weather_dump(weather_dump_weatherdata, data->weatherdata);
 }
 
 
@@ -781,6 +785,7 @@ xfceweather_dialog_response(GtkWidget *dlg,
                       PLUGIN_WEBSITE);
     } else {
         apply_options(dialog);
+        weather_dump(weather_dump_plugindata, data);
 
         gtk_widget_destroy(dlg);
         gtk_list_store_clear(dialog->mdl_xmloption);
@@ -1134,6 +1139,8 @@ xfceweather_set_size(XfcePanelPlugin *panel,
     update_icon(data);
     update_scrollbox(data);
 
+    weather_dump(weather_dump_plugindata, data);
+
     /* we handled the size */
     return TRUE;
 }
@@ -1173,6 +1180,8 @@ xfceweather_set_mode(XfcePanelPlugin *panel,
     update_icon(data);
     update_scrollbox(data);
 
+    weather_dump(weather_dump_plugindata, data);
+
     /* we handled the orientation */
     return TRUE;
 }
@@ -1208,6 +1217,8 @@ xfceweather_set_orientation(XfcePanelPlugin *panel,
     update_icon(data);
     update_scrollbox(data);
 
+    weather_dump(weather_dump_plugindata, data);
+
     /* we handled the orientation */
     return TRUE;
 }
@@ -1258,6 +1269,8 @@ weather_construct(XfcePanelPlugin *plugin)
     g_signal_connect(G_OBJECT(plugin), "configure-plugin",
                      G_CALLBACK(xfceweather_create_options), data);
 
+    weather_dump(weather_dump_plugindata, data);
+
     update_weatherdata(data);
 }
 


More information about the Xfce4-commits mailing list