From 0b5c3e9f8b92121454a5573f7c3d3467554e6916 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Fri, 26 Oct 2001 23:15:19 +0000 Subject: NULL the handle after a failed open so the offline handler won't think 2001-10-26 Iain Holmes * e-summary-rdf.c (open_callback): NULL the handle after a failed open so the offline handler won't think they're still open. (e_summary_rdf_set_online): Cancel all the open connections when the summary goes offline. * e-summary-weather.c (open_callback): NULL the handle after a failed open so the offline handler won't think they're still open. (e_summary_weather_set_online): Cancel all the open connections when the summary goes offline. * e-summary.c (e_summary_set_online): Call the callback if it's not NULL. svn path=/trunk/; revision=14183 --- my-evolution/e-summary-weather.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'my-evolution/e-summary-weather.c') diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index 0b86471077..4b8105b31d 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -353,6 +353,7 @@ open_callback (GnomeVFSAsyncHandle *handle, w->html = g_strdup ("
"); } + w->handle = NULL; e_summary_draw (w->summary); return; } @@ -590,6 +591,7 @@ e_summary_weather_set_online (ESummary *summary, void *data) { ESummaryWeather *weather; + GList *p; weather = summary->weather; if (weather->online == online) { @@ -602,6 +604,16 @@ e_summary_weather_set_online (ESummary *summary, (GtkFunction) e_summary_weather_update, summary); } else { + for (p = weather->weathers; p; p = p->next) { + Weather *w; + + w = p->data; + if (w->handle) { + gnome_vfs_async_cancel (w->handle); + w->handle = NULL; + } + } + gtk_timeout_remove (weather->timeout); weather->timeout = 0; } -- cgit v1.2.3