diff options
author | JP Rosevear <jpr@helixcode.com> | 2000-10-12 06:02:37 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2000-10-12 06:02:37 +0800 |
commit | c04a8d1e3868146d5920b1f1e280942359ddeda2 (patch) | |
tree | b43ccfc84ab802efeb30ff0c30b6936018bc1f0e /calendar/pcs | |
parent | d55e310762a3ba82f1cadf118bf2994541199520 (diff) | |
download | gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar.gz gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar.bz2 gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar.lz gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar.xz gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.tar.zst gsoc2013-evolution-c04a8d1e3868146d5920b1f1e280942359ddeda2.zip |
Take CalObjType as a param because its impossible to determine after a
2000-10-11 JP Rosevear <jpr@helixcode.com>
* pcs/cal-backend.c (cal_backend_log_entry): Take CalObjType
as a param because its impossible to determine after a delete.
(cal_backend_remove_object): Calculate CalObjType and pass
it to cal_backend_log_entry
(cal_backend_update_object): ditto
* conduits/todo/todo-conduit.c (local_record_from_comp): Kill
unused variables.
(add_archive_record): Don't kill the sync if this happens
(update_record): Kill old function
(replace_record): New function to handle replace_record signal
(conduit_get_gpilot_conduit): Listen for replace record signal
(add_record): Always add a new record, never replace
(replace_record): Always replace an existing record
* conduits/calendar/calendar-conduit.c: Same as above
2000-10-11 JP Rosevear <jpr@helixcode.com>
* configure.in: Fix bonobo error message
svn path=/trunk/; revision=5866
Diffstat (limited to 'calendar/pcs')
-rw-r--r-- | calendar/pcs/cal-backend.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index f07b975413..89049d5f8c 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -466,14 +466,14 @@ cal_backend_set_node_timet (xmlNodePtr node, const char *name, time_t t) } static void -cal_backend_log_entry (CalBackend *backend, const char *uid, +cal_backend_log_entry (CalBackend *backend, + const char *uid, + CalObjType cot, CalBackendLogEntryType type) { CalBackendLogEntry *entry = g_new0 (CalBackendLogEntry, 1); - CalObjType cot; g_assert (CLASS (backend)->get_type_by_uid != NULL); - cot = (* CLASS (backend)->get_type_by_uid) (backend, uid); /* Only log todos and events */ if (cot != CALOBJ_TYPE_EVENT && cot != CALOBJ_TYPE_TODO) @@ -691,6 +691,7 @@ cal_backend_get_log_entries (CalBackend *backend, CalObjType type, time_t since) gboolean cal_backend_update_object (CalBackend *backend, const char *uid, const char *calobj) { + CalObjType cot; gboolean result; g_return_val_if_fail (backend != NULL, FALSE); @@ -699,10 +700,11 @@ cal_backend_update_object (CalBackend *backend, const char *uid, const char *cal g_return_val_if_fail (calobj != NULL, FALSE); g_assert (CLASS (backend)->update_object != NULL); + cot = (* CLASS (backend)->get_type_by_uid) (backend, uid); result = (* CLASS (backend)->update_object) (backend, uid, calobj); if (result) - cal_backend_log_entry (backend, uid, CAL_BACKEND_UPDATED); + cal_backend_log_entry (backend, uid, cot, CAL_BACKEND_UPDATED); return result; } @@ -721,6 +723,7 @@ cal_backend_update_object (CalBackend *backend, const char *uid, const char *cal gboolean cal_backend_remove_object (CalBackend *backend, const char *uid) { + CalObjType cot; gboolean result; g_return_val_if_fail (backend != NULL, FALSE); @@ -728,10 +731,11 @@ cal_backend_remove_object (CalBackend *backend, const char *uid) g_return_val_if_fail (uid != NULL, FALSE); g_assert (CLASS (backend)->remove_object != NULL); + cot = (* CLASS (backend)->get_type_by_uid) (backend, uid); result = (* CLASS (backend)->remove_object) (backend, uid); if (result) - cal_backend_log_entry (backend, uid, CAL_BACKEND_REMOVED); + cal_backend_log_entry (backend, uid, cot, CAL_BACKEND_REMOVED); return result; } |