aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-09-23 06:12:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-23 06:12:16 +0800
commit785c9829b8312649e28ec412696a9e3a8732ef19 (patch)
tree73403b14202529d94ff9d41ca41680b5a28b4066 /calendar
parentcef69e787a7bb62e224531c0cf311201830d8c29 (diff)
downloadgsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar.gz
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar.bz2
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar.lz
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar.xz
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.tar.zst
gsoc2013-evolution-785c9829b8312649e28ec412696a9e3a8732ef19.zip
Bug 593747 - Calendar preview dates not indicating events
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/gnome-cal.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 6f4e3f379d..51ef08aa77 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1001,13 +1001,13 @@ update_query_async (struct _date_query_msg *msg)
GnomeCalendarPrivate *priv;
ECalView *old_query;
gchar *real_sexp;
- GList *l;
+ GList *list, *iter;
priv = gcal->priv;
/* free the previous queries */
- for (l = priv->dn_queries; l != NULL; l = l->next) {
- old_query = l->data;
+ for (iter = priv->dn_queries; iter != NULL; iter = iter->next) {
+ old_query = iter->data;
if (old_query) {
g_signal_handlers_disconnect_matched (old_query, G_SIGNAL_MATCH_DATA,
@@ -1028,18 +1028,22 @@ update_query_async (struct _date_query_msg *msg)
return; /* No time range is set, so don't start a query */
}
+ list = e_cal_model_get_client_list (priv->model);
+ g_list_foreach (list, (GFunc) g_object_ref, NULL);
+
/* create queries for each loaded client */
- for (l = priv->clients_list; l != NULL; l = l->next) {
+ for (iter = list; iter != NULL; iter = iter->next) {
+ ECal *client = E_CAL (iter->data);
GError *error = NULL;
gint tries = 0;
/* don't create queries for clients not loaded yet */
- if (e_cal_get_load_state ((ECal *) l->data) != E_CAL_LOAD_LOADED)
+ if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
continue;
try_again:
old_query = NULL;
- if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, &error)) {
+ if (!e_cal_get_query (client, real_sexp, &old_query, &error)) {
/* If calendar is busy try again for 3 times. */
if (error->code == E_CALENDAR_STATUS_BUSY && tries != 10) {
tries++;
@@ -1070,6 +1074,9 @@ try_again:
e_cal_view_start (old_query);
}
+ g_list_foreach (list, (GFunc) g_object_unref, NULL);
+ g_list_free (list);
+
/* free memory */
g_free (real_sexp);
update_todo_view (gcal);