diff options
author | Iain Holmes <iain@ximian.com> | 2001-10-27 07:15:19 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-10-27 07:15:19 +0800 |
commit | 0b5c3e9f8b92121454a5573f7c3d3467554e6916 (patch) | |
tree | 85f8d9b3d79f60708a012d06f5c02d1c06dbaa4a /my-evolution | |
parent | c944779866017804bbeb94f9c81af4ffa0eef3ba (diff) | |
download | gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar.gz gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar.bz2 gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar.lz gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar.xz gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.tar.zst gsoc2013-evolution-0b5c3e9f8b92121454a5573f7c3d3467554e6916.zip |
NULL the handle after a failed open so the offline handler won't think
2001-10-26 Iain Holmes <iain@ximian.com>
* 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
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 15 | ||||
-rw-r--r-- | my-evolution/e-summary-mail.c | 4 | ||||
-rw-r--r-- | my-evolution/e-summary-offline-handler.c | 15 | ||||
-rw-r--r-- | my-evolution/e-summary-rdf.c | 13 | ||||
-rw-r--r-- | my-evolution/e-summary-weather.c | 12 | ||||
-rw-r--r-- | my-evolution/e-summary.c | 6 |
6 files changed, 58 insertions, 7 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 9204d054cd..98334158a9 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,18 @@ +2001-10-26 Iain Holmes <iain@ximian.com> + + * 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. + 2001-10-25 Jon Trowbridge <trow@ximian.com> * e-summary-tasks.c (sort_uids): It is possible for diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c index 149678b51d..27668ac198 100644 --- a/my-evolution/e-summary-mail.c +++ b/my-evolution/e-summary-mail.c @@ -564,6 +564,10 @@ e_summary_mail_free (ESummary *summary) mail = summary->mail; bonobo_object_release_unref (mail->folder_info, NULL); + mail->folder_info = CORBA_OBJECT_NIL; + + gtk_signal_disconnect_by_func (GTK_OBJECT (mail->listener), + GTK_SIGNAL_FUNC (mail_change_notify), summary); bonobo_object_unref (BONOBO_OBJECT (mail->listener)); g_hash_table_foreach (mail->folders, free_folder, NULL); diff --git a/my-evolution/e-summary-offline-handler.c b/my-evolution/e-summary-offline-handler.c index b0b1bc5efc..f338aad93c 100644 --- a/my-evolution/e-summary-offline-handler.c +++ b/my-evolution/e-summary-offline-handler.c @@ -51,9 +51,10 @@ e_summary_offline_handler_create_connection_list (ESummary *summary) list = GNOME_Evolution_ConnectionList__alloc (); list->_length = 0; - list->_maximum = e_summary_count_connections (summary); + list->_maximum = e_summary_count_connections (summary) + 1; list->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (list->_maximum); + g_print ("_length: %d\n_maximum: %d\n", list->_length, list->_maximum); connections = e_summary_add_connections (summary); for (p = connections; p; p = p->next) { ESummaryConnectionData *data; @@ -116,13 +117,13 @@ went_offline (ESummary *summary, CORBA_exception_init (&ev); g_warning ("Went offline"); - GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Error updating offline progress: %s", - CORBA_exception_id (&ev)); - } + GNOME_Evolution_OfflineProgressListener_updateProgress (priv->listener_interface, connection_list, &ev); + if (BONOBO_EX (&ev)) { + g_warning ("Error updating offline progress: %s", + CORBA_exception_id (&ev)); + } - CORBA_exception_free (&ev); + CORBA_exception_free (&ev); } static void diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index 97e95a873a..498717e3c1 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -411,6 +411,7 @@ open_callback (GnomeVFSAsyncHandle *handle, if (result != GNOME_VFS_OK) { char *str; + r->handle = NULL; g_free (r->html); str = g_strdup_printf ("<b>%s:</b><br>%s", _("Error downloading RDF"), r->uri); @@ -456,6 +457,7 @@ e_summary_rdf_update (ESummary *summary) rdf->string = NULL; } + g_warning ("Opening %s", rdf->uri); gnome_vfs_async_open (&rdf->handle, rdf->uri, GNOME_VFS_OPEN_READ, (GnomeVFSAsyncOpenCallback) open_callback, rdf); @@ -581,6 +583,7 @@ e_summary_rdf_set_online (ESummary *summary, void *data) { ESummaryRDF *rdf; + GList *p; rdf = summary->rdf; if (rdf->online == online) { @@ -593,6 +596,16 @@ e_summary_rdf_set_online (ESummary *summary, (GtkFunction) e_summary_rdf_update, summary); } else { + for (p = rdf->rdfs; p; p = p->next) { + RDF *r; + + r = p->data; + if (r->handle) { + gnome_vfs_async_cancel (r->handle); + r->handle = NULL; + } + } + gtk_timeout_remove (rdf->timeout); rdf->timeout = 0; } 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 ("<dd> </dd>"); } + 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; } diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 952976cd45..d11c85a25d 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -777,6 +777,7 @@ e_summary_count_connections (ESummary *summary) count += c->count (summary, c->closure); } + g_print ("Count: %d", count); return count; } @@ -824,6 +825,11 @@ e_summary_set_online (ESummary *summary, c->callback_closure = closure; c->set_online (summary, progress, online, c->closure); + g_print ("Setting %s\n", online ? "online" : "offline"); + + if (callback != NULL) { + callback (summary, closure); + } } } |