aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-09-29 05:22:43 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-09-29 05:22:43 +0800
commit564c06f69d3de76e62687137306316de4ee09a87 (patch)
tree57ff5a1d0e57cae24f2afa04a1d0431cfced7e5b /calendar/pcs
parent8f338e40f91fcdf430b29ea4b9ebcd3e384b0ff1 (diff)
downloadgsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar.gz
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar.bz2
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar.lz
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar.xz
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.tar.zst
gsoc2013-evolution-564c06f69d3de76e62687137306316de4ee09a87.zip
Handle the fields and category we don't sync by making sure we don't
2001-09-28 JP Rosevear <jpr@ximian.com> * conduits/calendar/calendar-conduit.c (local_record_from_comp): Handle the fields and category we don't sync by making sure we don't overwrite them (local_record_to_pilot_record): use local record category (pre_sync): track db info * conduits/calendar/calendar-conduit.h: db info field * conduits/todo/todo-conduit.[hc]: same as above svn path=/trunk/; revision=13235
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/cal-backend-file.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index c3fdea7234..0cc7c89f3e 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1368,6 +1368,7 @@ cal_backend_file_get_free_busy (CalBackend *backend, GList *users, time_t start,
typedef struct
{
CalBackend *backend;
+ CalObjType type;
GList *changes;
GList *change_ids;
} CalBackendFileComputeChangesData;
@@ -1383,14 +1384,17 @@ cal_backend_file_compute_changes_foreach_key (const char *key, gpointer data)
GNOME_Evolution_Calendar_CalObjChange *coc;
comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
+ if (be_data->type == GNOME_Evolution_Calendar_TYPE_TODO)
+ cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
+ else
+ cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
cal_component_set_uid (comp, key);
coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
coc->calobj = CORBA_string_dup (cal_component_get_as_string (comp));
coc->type = GNOME_Evolution_Calendar_DELETED;
be_data->changes = g_list_prepend (be_data->changes, coc);
- be_data->change_ids = g_list_prepend (be_data->change_ids, (gpointer) key);
+ be_data->change_ids = g_list_prepend (be_data->change_ids, g_strdup (key));
}
}
@@ -1446,6 +1450,7 @@ cal_backend_file_compute_changes (CalBackend *backend, CalObjType type, const ch
/* Calculate deletions */
be_data.backend = backend;
+ be_data.type = type;
be_data.changes = changes;
be_data.change_ids = change_ids;
e_dbhash_foreach_key (ehash, (EDbHashFunc)cal_backend_file_compute_changes_foreach_key, &be_data);
@@ -1477,10 +1482,11 @@ cal_backend_file_compute_changes (CalBackend *backend, CalObjType type, const ch
} else {
e_dbhash_remove (ehash, uid);
}
+ e_dbhash_write (ehash);
CORBA_free (coc);
+ g_free (uid);
}
- e_dbhash_write (ehash);
e_dbhash_destroy (ehash);
cal_obj_uid_list_free (uids);