From 8e0c48835a78f06aa33dff7b2d2c4c1792df1bbf Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 3 Mar 2004 16:40:43 +0000 Subject: prevent from adding the same client more than once. 2004-03-03 Rodrigo Moya * gui/e-cal-model.c (e_cal_model_add_client): prevent from adding the same client more than once. svn path=/trunk/; revision=24951 --- calendar/ChangeLog | 5 +++++ calendar/gui/e-cal-model.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b9ee22c500..42ccfadf4b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-03-03 Rodrigo Moya + + * gui/e-cal-model.c (e_cal_model_add_client): prevent from adding + the same client more than once. + 2004-03-02 Rodrigo Moya * gui/cal-search-bar.c: added support for searching the location diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 26283e3b32..750e435767 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1335,6 +1335,9 @@ e_cal_model_add_client (ECalModel *model, ECal *client) priv = model->priv; + if (e_cal_model_get_client_for_uri (model, e_cal_get_uri (client))) + return; + if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) add_new_client (model, client); else -- cgit v1.2.3