aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog8
-rw-r--r--my-evolution/e-summary.c48
2 files changed, 50 insertions, 6 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 98334158a9..b9d710ac05 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-27 Jon Trowbridge <trow@ximian.com>
+
+ * e-summary.c (e_summary_reload): Slow down reload requests
+ to work around a bug in gnome-vfs. Ugly, but it works.
+ (Bug #12956)
+
2001-10-26 Iain Holmes <iain@ximian.com>
* e-summary-rdf.c (open_callback): NULL the handle after a failed
@@ -16,7 +22,7 @@
2001-10-25 Jon Trowbridge <trow@ximian.com>
* e-summary-tasks.c (sort_uids): It is possible for
- start_foo.value to be NULL after a cal to
+ start_foo.value to be NULL after a call to
cal_component_get_dtstart, so we need to check for this before
dereferencing it. (Bug #13259)
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 6c22e9cd64..51b6c41b48 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -95,6 +95,8 @@ struct _ESummaryPrivate {
GList *connections;
+ guint pending_reload_tag;
+
gpointer alarm;
gboolean frozen;
@@ -128,6 +130,11 @@ destroy (GtkObject *object)
return;
}
+ if (priv->pending_reload_tag) {
+ gtk_timeout_remove (priv->pending_reload_tag);
+ priv->pending_reload_tag = 0;
+ }
+
if (summary->mail) {
e_summary_mail_free (summary);
}
@@ -471,6 +478,7 @@ e_summary_init (ESummary *summary)
priv->frozen = FALSE;
priv->redraw_pending = FALSE;
+ priv->pending_reload_tag = 0;
priv->html_scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller),
@@ -743,12 +751,10 @@ e_summary_reconfigure (ESummary *summary)
}
}
-void
-e_summary_reload (BonoboUIComponent *component,
- gpointer userdata,
- const char *cname)
+static gint
+e_summary_reload_timeout (gpointer closure)
{
- ESummary *summary = userdata;
+ ESummary *summary = closure;
if (summary->rdf != NULL) {
e_summary_rdf_update (summary);
@@ -757,6 +763,38 @@ e_summary_reload (BonoboUIComponent *component,
if (summary->weather != NULL) {
e_summary_weather_update (summary);
}
+
+ summary->priv->pending_reload_tag = 0;
+
+ return FALSE;
+}
+
+void
+e_summary_reload (BonoboUIComponent *component,
+ gpointer userdata,
+ const char *cname)
+{
+ ESummary *summary = userdata;
+
+ /*
+ This is an evil hack to work around a bug in gnome-vfs:
+ gnome-vfs seems to not properly lock partially-constructed
+ objects, so if you gnome_vfs_async_open and then immediately
+ gnome_vfs_async_cancel, it is possible to start to destroy
+ an object before it is totally constructed. Hilarity ensures.
+
+ This is an evil and stupid hack, but it slows down our reload
+ requests enough the gnome-vfs should be able to keep up. And
+ given that these are not instantaneous operations to begin
+ with, the users should be none the wiser. -JT
+ */
+
+ if (summary->priv->pending_reload_tag) {
+ gtk_timeout_remove (summary->priv->pending_reload_tag);
+ }
+
+ summary->priv->pending_reload_tag =
+ gtk_timeout_add (80, e_summary_reload_timeout, summary);
}
int