diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/calendar-model.c | 12 | ||||
-rw-r--r-- | calendar/gui/calendar-model.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 135f770863..8a6eae5445 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -39,7 +39,7 @@ /* Private part of the ECalendarModel structure */ -typedef struct { +struct _CalendarModelPrivate { /* Calendar client we are using */ CalClient *client; @@ -54,7 +54,7 @@ typedef struct { /* HACK: so that ETable can do its stupid append_row() thing */ guint appending_row : 1; -} CalendarModelPrivate; +}; @@ -1443,7 +1443,10 @@ cal_loaded_cb (CalClient *client, g_return_if_fail (IS_CALENDAR_MODEL (model)); e_table_model_pre_change (E_TABLE_MODEL (model)); - load_objects (model); + + if (status == CAL_CLIENT_LOAD_SUCCESS) + load_objects (model); + e_table_model_changed (E_TABLE_MODEL (model)); } @@ -1620,6 +1623,9 @@ load_objects (CalendarModel *model) priv = model->priv; + if (!cal_client_is_loaded (priv->client)) + return; + uids = cal_client_get_uids (priv->client, priv->type); for (l = uids; l; l = l->next) { diff --git a/calendar/gui/calendar-model.h b/calendar/gui/calendar-model.h index d1481a4ece..aeb50b45e6 100644 --- a/calendar/gui/calendar-model.h +++ b/calendar/gui/calendar-model.h @@ -40,11 +40,13 @@ BEGIN_GNOME_DECLS typedef struct _CalendarModel CalendarModel; typedef struct _CalendarModelClass CalendarModelClass; +typedef struct _CalendarModelPrivate CalendarModelPrivate; + struct _CalendarModel { ETableModel model; /* Private data */ - gpointer priv; + CalendarModelPrivate *priv; }; struct _CalendarModelClass { |