aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-02 21:23:52 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:42 +0800
commitcbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c (patch)
treef0c3d5d4443eceff47a6f43c0daafdaac840143f /calendar/gui/gnome-cal.c
parent86f37c46dd2f61e86a82938c956490c37ed6f2ce (diff)
downloadgsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar.gz
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar.bz2
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar.lz
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar.xz
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.tar.zst
gsoc2013-evolution-cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c.zip
Bug #655190 - Sluggish performance interacting with calendar/tasks
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 4bb430c018..03b5b6bfa6 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -131,6 +131,8 @@ struct _GnomeCalendarPrivate {
/* Used in update_todo_view, to prevent interleaving when
* called in separate thread. */
GMutex *todo_update_lock;
+
+ GCancellable *cancellable;
};
enum {
@@ -775,7 +777,7 @@ dn_client_view_objects_added_cb (ECalClientView *view, const GSList *objects, gp
tag_calendar_by_comp (
priv->date_navigator, comp,
e_cal_client_view_get_client (view),
- NULL, FALSE, TRUE, TRUE);
+ NULL, FALSE, TRUE, TRUE, priv->cancellable);
g_object_unref (comp);
}
}
@@ -1438,6 +1440,8 @@ gnome_calendar_init (GnomeCalendar *gcal)
priv->visible_start = -1;
priv->visible_end = -1;
priv->updating = FALSE;
+
+ priv->cancellable = g_cancellable_new ();
}
static void
@@ -1492,6 +1496,12 @@ gnome_calendar_do_dispose (GObject *object)
priv->update_marcus_bains_line_timeout = 0;
}
+ if (priv->cancellable) {
+ g_cancellable_cancel (priv->cancellable);
+ g_object_unref (priv->cancellable);
+ priv->cancellable = NULL;
+ }
+
G_OBJECT_CLASS (gnome_calendar_parent_class)->dispose (object);
}
@@ -2238,7 +2248,7 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
pd.remove = TRUE;
pd.older_than = older_than;
- e_cal_client_generate_instances_for_object (client, m->data,
+ e_cal_client_generate_instances_for_object_sync (client, m->data,
older_than, G_MAXINT32,
check_instance_cb,
&pd);