diff options
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 5 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 13 |
3 files changed, 25 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 87ee706d4d..dcbefdaed3 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2005-04-05 Chenthill Palanisamy <pchenthill@novell.com> + + * gui/e-cal-model.c: (cal_opened_cb): If the status + is busy call open method again, do not remove the + client. + * gui/gnome-cal.c: (client_cal_opened_cb), + (default_client_cal_opened_cb): IF the status is busy + and the load_state is not loaded call open method. + 2005-04-04 Rodrigo Moya <rodrigo@novell.com> Fixes #68423 diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index f9e7de2003..ca0f16a4ba 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1495,6 +1495,11 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data) ECalModel *model = (ECalModel *) user_data; ECalModelClient *client_data; + if (status == E_CALENDAR_STATUS_BUSY) { + e_cal_open_async (client, FALSE); + return; + } + if (status != E_CALENDAR_STATUS_OK) { e_cal_model_remove_client (model, client); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index c36b740d81..cf129a5bf4 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -2177,6 +2177,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) GnomeCalendarPrivate *priv; ECalSourceType source_type; ESource *source; + ECalLoadState state; char *msg; int i; @@ -2184,6 +2185,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) source_type = e_cal_get_source_type (ecal); source = e_cal_get_source (ecal); + state = e_cal_get_load_state (ecal); switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: @@ -2197,9 +2199,12 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) } switch (status) { case E_CALENDAR_STATUS_OK: + g_message ("********* the state in ok is %d \n", state); break; case E_CALENDAR_STATUS_BUSY: - e_cal_open_async (ecal, FALSE); + g_message ("********* the state is %d \n", state); + if (state == E_CAL_LOAD_NOT_LOADED) + e_cal_open_async (ecal, FALSE); return; case E_CALENDAR_STATUS_INVALID_SERVER_VERSION: e_error_run (NULL, "calendar:server-version", NULL); @@ -2268,12 +2273,14 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar GnomeCalendarPrivate *priv; ECalSourceType source_type; ESource *source; + ECalLoadState state; int i; priv = gcal->priv; source_type = e_cal_get_source_type (ecal); source = e_cal_get_source (ecal); + state = e_cal_get_load_state (ecal); switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: @@ -2290,7 +2297,9 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar case E_CALENDAR_STATUS_OK: break; case E_CALENDAR_STATUS_BUSY: - e_cal_open_async (ecal, FALSE); + g_message ("********* the state is %d \n", state); + if (state == E_CAL_LOAD_NOT_LOADED) + e_cal_open_async (ecal, FALSE); return; case E_CALENDAR_STATUS_INVALID_SERVER_VERSION : e_error_run (NULL, "calendar:server-version", NULL); |