diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-10-19 04:17:52 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-10-19 04:17:52 +0800 |
commit | f19b05e4561a256176bb09367ccbc49add7030d9 (patch) | |
tree | f922f5f18a5aa91379178613c416dd10b3c3c6d9 /my-evolution | |
parent | 3755be0a4ca10fdcd53fb50eaa34422ee8dcf1d6 (diff) | |
download | gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar.gz gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar.bz2 gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar.lz gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar.xz gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.tar.zst gsoc2013-evolution-f19b05e4561a256176bb09367ccbc49add7030d9.zip |
Stuff to try to find the memory corruption
svn path=/trunk/; revision=13769
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 9 | ||||
-rw-r--r-- | my-evolution/e-summary-rdf.c | 17 | ||||
-rw-r--r-- | my-evolution/e-summary-rdf.h | 1 | ||||
-rw-r--r-- | my-evolution/e-summary-weather.c | 15 | ||||
-rw-r--r-- | my-evolution/e-summary-weather.h | 1 | ||||
-rw-r--r-- | my-evolution/e-summary.c | 8 |
6 files changed, 48 insertions, 3 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index f1fb366845..51940df90d 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,12 @@ +2001-10-18 Iain Holmes <iain@ximian.com> + + * e-summary.c (e_summary_reload): Only reload the views, don't do an + entire reconfigure. + + * e-summary-rdf.c (e_summary_rdf_update): Free stuff and update. + + * e-summary-weather.c (e_summary_weather_update): Ditto + 2001-10-16 Iain Holmes <iain@ximian.com> * e-summary.c (e_summary_new): Don't call a draw. diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index 1b54cb2288..97e95a873a 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -428,7 +428,7 @@ open_callback (GnomeVFSAsyncHandle *handle, (GnomeVFSAsyncReadCallback) read_callback, r); } -static gboolean +gboolean e_summary_rdf_update (ESummary *summary) { GList *r; @@ -441,6 +441,21 @@ e_summary_rdf_update (ESummary *summary) for (r = summary->rdf->rdfs; r; r = r->next) { RDF *rdf = r->data; + if (rdf->handle) { + gnome_vfs_async_cancel (rdf->handle); + rdf->handle = NULL; + } + + if (rdf->buffer) { + g_free (rdf->buffer); + rdf->buffer = NULL; + } + + if (rdf->string) { + g_string_free (rdf->string, TRUE); + rdf->string = NULL; + } + gnome_vfs_async_open (&rdf->handle, rdf->uri, GNOME_VFS_OPEN_READ, (GnomeVFSAsyncOpenCallback) open_callback, rdf); diff --git a/my-evolution/e-summary-rdf.h b/my-evolution/e-summary-rdf.h index 1f6f617dcd..ad120040ed 100644 --- a/my-evolution/e-summary-rdf.h +++ b/my-evolution/e-summary-rdf.h @@ -32,5 +32,6 @@ char *e_summary_rdf_get_html (ESummary *summary); void e_summary_rdf_init (ESummary *summary); void e_summary_rdf_reconfigure (ESummary *summary); void e_summary_rdf_free (ESummary *summary); +gboolean e_summary_rdf_update (ESummary *summary); #endif diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index 070e5ed618..0b86471077 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -364,7 +364,7 @@ open_callback (GnomeVFSAsyncHandle *handle, (GnomeVFSAsyncReadCallback) read_callback, w); } -static gboolean +gboolean e_summary_weather_update (ESummary *summary) { GList *w; @@ -379,6 +379,19 @@ e_summary_weather_update (ESummary *summary) char *uri; Weather *weather = w->data; + if (weather->handle != NULL) { + gnome_vfs_async_cancel (weather->handle); + weather->handle = NULL; + } + if (weather->string) { + g_string_free (weather->string, TRUE); + weather->string = NULL; + } + if (weather->buffer) { + g_free (weather->buffer); + weather->buffer = NULL; + } + uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location); gnome_vfs_async_open (&weather->handle, uri, GNOME_VFS_OPEN_READ, diff --git a/my-evolution/e-summary-weather.h b/my-evolution/e-summary-weather.h index 47d19ca625..51b9bc8c88 100644 --- a/my-evolution/e-summary-weather.h +++ b/my-evolution/e-summary-weather.h @@ -148,5 +148,6 @@ void e_summary_weather_reconfigure (ESummary *summary); void e_summary_weather_ctree_fill (GtkCTree *tree); const char *e_summary_weather_code_to_name (const char *code); void e_summary_weather_free (ESummary *summary); +gboolean e_summary_weather_update (ESummary *summary); #endif diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index f7da1d9a62..952976cd45 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -751,7 +751,13 @@ e_summary_reload (BonoboUIComponent *component, { ESummary *summary = userdata; - e_summary_reconfigure (summary); + if (summary->rdf != NULL) { + e_summary_rdf_update (summary); + } + + if (summary->weather != NULL) { + e_summary_weather_update (summary); + } } int |