aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-weather.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-17 02:06:35 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-17 02:06:35 +0800
commitaf019dc03bac8bafb77b5cb4a98bdc17fd733b49 (patch)
treee618de09361ad3391fdb02accfc173947a3021c4 /my-evolution/e-summary-weather.c
parente215bcef02af68a9520875cd7cfaa3a63ae4345c (diff)
downloadgsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar.gz
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar.bz2
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar.lz
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar.xz
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.tar.zst
gsoc2013-evolution-af019dc03bac8bafb77b5cb4a98bdc17fd733b49.zip
Nicer error reporting.
svn path=/trunk/; revision=11130
Diffstat (limited to 'my-evolution/e-summary-weather.c')
-rw-r--r--my-evolution/e-summary-weather.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index a2b3d5ffe3..597dee6325 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -34,6 +34,7 @@ struct _ESummaryWeather {
guint32 timeout;
gboolean online;
+ gboolean errorshown;
};
static GHashTable *locations_hash = NULL;
@@ -275,7 +276,12 @@ read_callback (GnomeVFSAsyncHandle *handle,
Weather *w)
{
if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
- w->html = g_strdup ("<b>Error downloading RDF</b>");
+ if (w->summary->weather->errorshown == FALSE) {
+ w->html = g_strdup ("<dd><b>An error occurred while downloading weather data</b></dd>");
+ w->summary->weather->errorshown = TRUE;
+ } else {
+ w->html = g_strdup ("<dd> </dd>");
+ }
e_summary_draw (w->summary);
w->handle = NULL;
@@ -301,7 +307,13 @@ open_callback (GnomeVFSAsyncHandle *handle,
Weather *w)
{
if (result != GNOME_VFS_OK) {
- w->html = e_utf8_from_locale_string (_("<b>Error downloading Metar</b>"));
+ if (w->summary->weather->errorshown == FALSE) {
+ w->html = e_utf8_from_locale_string (_("<dd><b>The weather server could not be contacted</b></dd>"));
+
+ w->summary->weather->errorshown = TRUE;
+ } else {
+ w->html = g_strdup ("<dd> </dd>");
+ }
e_summary_draw (w->summary);
return;
@@ -319,6 +331,7 @@ e_summary_weather_update (ESummary *summary)
{
GList *w;
+ summary->weather->errorshown = FALSE;
for (w = summary->weather->weathers; w; w = w->next) {
char *uri;
Weather *weather = w->data;