[evolution-data-server/meego-eds] Fix behavior of the view when caching is disabled
- From: Christophe Dumez <cdumez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/meego-eds] Fix behavior of the view when caching is disabled
- Date: Tue, 5 Jul 2011 18:34:27 +0000 (UTC)
commit 518ce7511d3e556e881b5311801e6eadbc0c9b36
Author: Christophe Dumez <christophe dumez intel com>
Date: Tue Jul 5 21:34:02 2011 +0300
Fix behavior of the view when caching is disabled
One item was still being cached.
calendar/libedata-cal/e-data-cal-view.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c
index 3985139..af00601 100644
--- a/calendar/libedata-cal/e-data-cal-view.c
+++ b/calendar/libedata-cal/e-data-cal-view.c
@@ -236,7 +236,7 @@ notify_add (EDataCalView *view, gchar *obj)
send_pending_changes (view);
send_pending_removes (view);
- if (!priv->caching || (priv->adds->len == THRESHOLD_ITEMS)) {
+ if (priv->adds->len == THRESHOLD_ITEMS) {
send_pending_adds (view);
}
g_array_append_val (priv->adds, obj);
@@ -247,7 +247,11 @@ notify_add (EDataCalView *view, gchar *obj)
GUINT_TO_POINTER (1));
g_object_unref (comp);
- ensure_pending_flush_timeout (view);
+ if (priv->caching) {
+ ensure_pending_flush_timeout (view);
+ } else {
+ send_pending_adds (view);
+ }
}
static void
@@ -258,13 +262,17 @@ notify_change (EDataCalView *view, gchar *obj)
send_pending_adds (view);
send_pending_removes (view);
- if (!priv->caching || (priv->changes->len == THRESHOLD_ITEMS)) {
+ if (priv->changes->len == THRESHOLD_ITEMS) {
send_pending_changes (view);
}
g_array_append_val (priv->changes, obj);
- ensure_pending_flush_timeout (view);
+ if (priv->caching) {
+ ensure_pending_flush_timeout (view);
+ } else {
+ send_pending_changes (view);
+ }
}
static void
@@ -277,7 +285,7 @@ notify_remove (EDataCalView *view, ECalComponentId *id)
send_pending_adds (view);
send_pending_changes (view);
- if (!priv->caching || (priv->removes->len == THRESHOLD_ITEMS)) {
+ if (priv->removes->len == THRESHOLD_ITEMS) {
send_pending_removes (view);
}
@@ -295,7 +303,11 @@ notify_remove (EDataCalView *view, ECalComponentId *id)
g_hash_table_remove (priv->ids, id);
- ensure_pending_flush_timeout (view);
+ if (priv->caching) {
+ ensure_pending_flush_timeout (view);
+ } else {
+ send_pending_removes (view);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]