aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-12 10:38:25 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-12 10:38:25 +0800
commit421aa80ae6961cb4ddef8e79133ce89fcfbbf52d (patch)
treefd3811ceee6c56a89c0c930502c3d9ba279766c8 /calendar/pcs/cal-backend-file.c
parent0a9ff51460111657627b5e3a7eca6a45606b4fb2 (diff)
downloadgsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar.gz
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar.bz2
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar.lz
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar.xz
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.tar.zst
gsoc2013-evolution-421aa80ae6961cb4ddef8e79133ce89fcfbbf52d.zip
renamed updateObject to updateObjects and removed the UID argument, since
2001-07-11 Damon Chaplin <damon@ximian.com> * idl/evolution-calendar.idl: renamed updateObject to updateObjects and removed the UID argument, since it can add/update multiple objects at once. (It can't yet, but it will!) * pcs/cal.c: * pcs/cal-backend.[hc]: * pcs/cal-backend-file.c: renamed update_object to update_objects and got rid of the UID arg. * cal-client/cal-client.c (cal_client_update_objects): new function to add/update multiple objects in one go, i.e for iTIP and for importing calendars. * gui/print.c (print_date_label): fixed type bug. * gui/e-week-view.[hc]: * gui/e-week-view-event-item.c: draw the timezone icons if the event's DTSTART or DTEND is in a different timezone to the current one. Note that we may want to change this so it compares the UTC offsets rather than the TZIDs, since currently it will draw the icons for all events coming from iTIP requests from other clients. svn path=/trunk/; revision=11027
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 967b2d4520..c906b09ffd 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -89,8 +89,7 @@ static GNOME_Evolution_Calendar_CalComponentAlarms *cal_backend_file_get_alarms_
CalBackend *backend, const char *uid,
time_t start, time_t end, gboolean *object_found);
-static gboolean cal_backend_file_update_object (CalBackend *backend, const char *uid,
- const char *calobj);
+static gboolean cal_backend_file_update_objects (CalBackend *backend, const char *calobj);
static gboolean cal_backend_file_remove_object (CalBackend *backend, const char *uid);
static icaltimezone* cal_backend_file_get_timezone (CalBackend *backend, const char *tzid);
@@ -159,7 +158,7 @@ cal_backend_file_class_init (CalBackendFileClass *class)
backend_class->get_changes = cal_backend_file_get_changes;
backend_class->get_alarms_in_range = cal_backend_file_get_alarms_in_range;
backend_class->get_alarms_for_object = cal_backend_file_get_alarms_for_object;
- backend_class->update_object = cal_backend_file_update_object;
+ backend_class->update_objects = cal_backend_file_update_objects;
backend_class->remove_object = cal_backend_file_remove_object;
backend_class->get_timezone = cal_backend_file_get_timezone;
@@ -1635,9 +1634,9 @@ notify_remove (CalBackendFile *cbfile, const char *uid)
}
}
-/* Update_object handler for the file backend */
+/* Update_objects handler for the file backend. */
static gboolean
-cal_backend_file_update_object (CalBackend *backend, const char *uid, const char *calobj)
+cal_backend_file_update_objects (CalBackend *backend, const char *calobj)
{
CalBackendFile *cbfile;
CalBackendFilePrivate *priv;
@@ -1652,7 +1651,6 @@ cal_backend_file_update_object (CalBackend *backend, const char *uid, const char
g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
- g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (calobj != NULL, FALSE);
/* Pull the component from the string and ensure that it is sane */
@@ -1714,18 +1712,18 @@ cal_backend_file_update_object (CalBackend *backend, const char *uid, const char
return FALSE;
}
- /* Check the UID for sanity's sake */
+ /* Get the UID, and check it isn't empty. */
cal_component_get_uid (comp, &comp_uid);
- if (strcmp (uid, comp_uid) != 0) {
+ if (!comp_uid || !comp_uid[0]) {
gtk_object_unref (GTK_OBJECT (comp));
return FALSE;
}
/* Update the component */
- old_comp = lookup_component (cbfile, uid);
+ old_comp = lookup_component (cbfile, comp_uid);
if (old_comp)
remove_component (cbfile, old_comp);