Stuff to try to find the memory corruption
svn path=/trunk/; revision=13769
This commit is contained in:
@ -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>
|
2001-10-16 Iain Holmes <iain@ximian.com>
|
||||||
|
|
||||||
* e-summary.c (e_summary_new): Don't call a draw.
|
* e-summary.c (e_summary_new): Don't call a draw.
|
||||||
|
@ -428,7 +428,7 @@ open_callback (GnomeVFSAsyncHandle *handle,
|
|||||||
(GnomeVFSAsyncReadCallback) read_callback, r);
|
(GnomeVFSAsyncReadCallback) read_callback, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
gboolean
|
||||||
e_summary_rdf_update (ESummary *summary)
|
e_summary_rdf_update (ESummary *summary)
|
||||||
{
|
{
|
||||||
GList *r;
|
GList *r;
|
||||||
@ -441,6 +441,21 @@ e_summary_rdf_update (ESummary *summary)
|
|||||||
for (r = summary->rdf->rdfs; r; r = r->next) {
|
for (r = summary->rdf->rdfs; r; r = r->next) {
|
||||||
RDF *rdf = r->data;
|
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_async_open (&rdf->handle, rdf->uri,
|
||||||
GNOME_VFS_OPEN_READ,
|
GNOME_VFS_OPEN_READ,
|
||||||
(GnomeVFSAsyncOpenCallback) open_callback, rdf);
|
(GnomeVFSAsyncOpenCallback) open_callback, rdf);
|
||||||
|
@ -32,5 +32,6 @@ char *e_summary_rdf_get_html (ESummary *summary);
|
|||||||
void e_summary_rdf_init (ESummary *summary);
|
void e_summary_rdf_init (ESummary *summary);
|
||||||
void e_summary_rdf_reconfigure (ESummary *summary);
|
void e_summary_rdf_reconfigure (ESummary *summary);
|
||||||
void e_summary_rdf_free (ESummary *summary);
|
void e_summary_rdf_free (ESummary *summary);
|
||||||
|
gboolean e_summary_rdf_update (ESummary *summary);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -364,7 +364,7 @@ open_callback (GnomeVFSAsyncHandle *handle,
|
|||||||
(GnomeVFSAsyncReadCallback) read_callback, w);
|
(GnomeVFSAsyncReadCallback) read_callback, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
gboolean
|
||||||
e_summary_weather_update (ESummary *summary)
|
e_summary_weather_update (ESummary *summary)
|
||||||
{
|
{
|
||||||
GList *w;
|
GList *w;
|
||||||
@ -379,6 +379,19 @@ e_summary_weather_update (ESummary *summary)
|
|||||||
char *uri;
|
char *uri;
|
||||||
Weather *weather = w->data;
|
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);
|
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,
|
gnome_vfs_async_open (&weather->handle, uri, GNOME_VFS_OPEN_READ,
|
||||||
|
@ -148,5 +148,6 @@ void e_summary_weather_reconfigure (ESummary *summary);
|
|||||||
void e_summary_weather_ctree_fill (GtkCTree *tree);
|
void e_summary_weather_ctree_fill (GtkCTree *tree);
|
||||||
const char *e_summary_weather_code_to_name (const char *code);
|
const char *e_summary_weather_code_to_name (const char *code);
|
||||||
void e_summary_weather_free (ESummary *summary);
|
void e_summary_weather_free (ESummary *summary);
|
||||||
|
gboolean e_summary_weather_update (ESummary *summary);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -751,7 +751,13 @@ e_summary_reload (BonoboUIComponent *component,
|
|||||||
{
|
{
|
||||||
ESummary *summary = userdata;
|
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
|
int
|
||||||
|
Reference in New Issue
Block a user