Re: [evolution-patches] fix for the bug #73262 [calendar]
- From: chenthill <pchenthill novell com>
- To: Rodrigo Moya <rodrigo novell com>
- Cc: patches <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] fix for the bug #73262 [calendar]
- Date: Wed, 06 Apr 2005 18:08:00 +0530
Have attached the modified patch. Replaced the redundant check with
checking for the presence of timeout id so that we load the calendar
while moving from offline to online.
thanks, chenthill.
On Tue, 2005-04-05 at 00:43 +0200, Rodrigo Moya wrote:
> On Mon, 2005-04-04 at 15:14 +0530, chenthill wrote:
> > Hi,
> > Have attached the fix for the bug.
> >
> looks good, except for this:
>
> > @@ -498,8 +510,10 @@ e_cal_backend_http_open (ECalBackendSync
> > if (priv->mode == CAL_MODE_LOCAL)
> > return GNOME_Evolution_Calendar_Success;
> >
> > - g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
> > }
> > +
> > + if (priv->mode == CAL_MODE_REMOTE)
> > + g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
> >
> you are already returning _Success if it's local in the first lines
> above, so the check for == CAL_MODE_REMOTE seems to be redundant, and,
> when the priv->cache object is not NULL, it will re-install the
> begin_retrieval_cb idle function.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.443
diff -u -p -r1.443 ChangeLog
--- ChangeLog 24 Mar 2005 08:40:24 -0000 1.443
+++ ChangeLog 4 Apr 2005 09:42:32 -0000
@@ -1,3 +1,10 @@
+2005-04-04 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #73262
+ * backends/http/e-cal-backend-http.c: (retrieval_done),
+ (e_cal_backend_http_open): Check for the offline_sync key
+ to decide to show the contents of the calendar in offline.
+
2005-03-24 Chenthill Palanisamy <pchenthill novell com>
Fixes #73336
Index: backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.34
diff -u -p -r1.34 e-cal-backend-http.c
--- backends/http/e-cal-backend-http.c 6 Mar 2005 02:47:03 -0000 1.34
+++ backends/http/e-cal-backend-http.c 4 Apr 2005 09:42:32 -0000
@@ -488,6 +488,18 @@ e_cal_backend_http_open (ECalBackendSync
cbhttp = E_CAL_BACKEND_HTTP (backend);
priv = cbhttp->priv;
+ if (priv->mode == CAL_MODE_LOCAL) {
+ ESource *source;
+ const char *display_contents = NULL;
+
+ source = e_cal_backend_get_source (E_CAL_BACKEND (cbhttp));
+ display_contents = e_source_get_property (source, "offline_sync");
+
+ if (!display_contents || !g_str_equal (display_contents, "1")) {
+ return GNOME_Evolution_Calendar_RepositoryOffline;
+ }
+ }
+
if (!priv->cache) {
priv->cache = e_cal_backend_cache_new (e_cal_backend_get_uri (E_CAL_BACKEND (backend)));
@@ -498,8 +510,10 @@ e_cal_backend_http_open (ECalBackendSync
if (priv->mode == CAL_MODE_LOCAL)
return GNOME_Evolution_Calendar_Success;
- g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
}
+
+ if (!priv->reload_timeout_id)
+ g_idle_add ((GSourceFunc) begin_retrieval_cb, cbhttp);
return GNOME_Evolution_Calendar_Success;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]