From 77d15722d272941f67af74f5abb1eef1a21a4644 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 15 Apr 1998 22:51:48 +0000 Subject: The general_owner may be null. Do the proper thing when creating the 1998-04-15 Federico Mena Quintero * eventedit.c (ee_init_general_page): The general_owner may be null. Do the proper thing when creating the label. (ee_ok): Update the gnome calendar appropriately. * timeutil.h: * gncal-year-view.h: Add some missing prototypes. * gncal-full-day.c (child_popup_menu): Set the sensitivity of menu items according to whether the ical object is being edited or not. * eventedit.c (event_editor_new): Set the "being edited" flag on the ical object (stored as the ical object's user data). (event_editor_destroy): Release the flag. * calobj.h: The iCalObject structure now has a generic user_data pointer. * calobj.c (ical_object_set_user_data ical_object_get_user_data): Functions to set this data. svn path=/trunk/; revision=140 --- calendar/pcs/calobj.c | 12 ++++++++++++ calendar/pcs/calobj.h | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'calendar/pcs') diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c index 7e5f535189..a744836c89 100644 --- a/calendar/pcs/calobj.c +++ b/calendar/pcs/calobj.c @@ -686,3 +686,15 @@ ical_foreach (GList *events, iCalObjectFn fn, void *closure) (*fn) (ical, ical->dtstart, ical->dtend, closure); } } + +void +ical_object_set_user_data (iCalObject *ical, void *user_data) +{ + ical->user_data = user_data; +} + +void * +ical_object_get_user_data (iCalObject *ical) +{ + return ical->user_data; +} diff --git a/calendar/pcs/calobj.h b/calendar/pcs/calobj.h index 8f7abf8871..684605b271 100644 --- a/calendar/pcs/calobj.h +++ b/calendar/pcs/calobj.h @@ -100,7 +100,8 @@ typedef struct { typedef enum { CHANGE_NEW = 1 << 0, /* new object */ CHANGE_SUMMARY = 1 << 1, /* summary */ - CHANGE_DATES = 1 << 2 /* dtstart / dtend */ + CHANGE_DATES = 1 << 2, /* dtstart / dtend */ + CHANGE_ALL = CHANGE_SUMMARY | CHANGE_DATES } CalObjectChange; /* @@ -151,6 +152,7 @@ typedef struct { Recurrence *recur; int new; + void *user_data; /* Generic data pointer */ } iCalObject; /* The callback for the recurrence generator */ @@ -162,6 +164,8 @@ void ical_object_destroy (iCalObject *ico); iCalObject *ical_object_create_from_vobject (VObject *obj, const char *object_name); VObject *ical_object_to_vobject (iCalObject *ical); void ical_foreach (GList *events, iCalObjectFn fn, void *closure); +void ical_object_set_user_data (iCalObject *ical, void *user_data); +void *ical_object_get_user_data (iCalObject *ical); END_GNOME_DECLS -- cgit v1.2.3