aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.h
Commit message (Collapse)AuthorAgeFilesLines
* The Wombat now keeps track of which categories are present in the objectsFederico Mena Quintero2001-08-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-31 Federico Mena Quintero <federico@ximian.com> The Wombat now keeps track of which categories are present in the objects of a calendar. It will notify the clients of changes in this set. This is to make the category drop-down menus in the calendar/tasks views be always up to date. * idl/evolution-calendar.idl (Listener): Added a notifyCategoriesChanged() method. The Wombat now keeps track of the categories within a calendar. * cal-client/cal-listener.[ch]: Switched it to use BonoboXObject. Also added the notifyCategoriesChanged implementation. * cal-client/cal-client.[ch]: Added a "categories_changed" signal. * pcs/cal-backend-file.c: Maintain a list of the live categories. (update_categories_from_comp): New function to maintain the set of live categories. (add_component): Update the set of categories. (remove_component): Likewise. (open_cal): Notify about changes in the set of categories. (create_cal): Likewise. (cal_backend_file_update_objects): Likewise. (cal_backend_file_remove_object): Likewise. (notify_categories_changed): New function to notify the clients about the current set of categories. * pcs/cal.c (cal_notify_categories_changed): New function. svn path=/trunk/; revision=11536
* more timezone updates. I'm pretty much done with the calendar code now,Damon Chaplin2001-07-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-10 Damon Chaplin <damon@ximian.com> * gui/calendar-model.c: * gui/e-calendar-table.c: * gui/e-day-view-main-item.c: * gui/e-day-view-top-item.c: * gui/e-day-view.[hc]: * gui/e-week-view.c: * gui/gnome-cal.c: * gui/print.c: * gui/dialogs/cal-prefs-dialog.c: * gui/dialogs/comp-editor-util.c: * gui/dialogs/event-page.c: * pcs/cal-backend-file.c: * pcs/query.c: * cal-util/cal-component.[hc]: * cal-util/cal-recur.c: * cal-util/timeutil.[hc]: * cal-client/cal-client.[hc]: more timezone updates. I'm pretty much done with the calendar code now, except for alarms and conduits, which Federico and JP know more about. And there are a couple of other minor things to fix. But it is still pretty buggy. svn path=/trunk/; revision=10984
* Use e_utf8_from_gtk_event_key() so that we can input utf8 text properly.Federico Mena Quintero2001-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2001-07-09 Federico Mena Quintero <federico@ximian.com> * gui/e-day-view.c (e_day_view_key_press): Use e_utf8_from_gtk_event_key() so that we can input utf8 text properly. (e_day_view_cut_clipboard): Constify. (e_day_view_on_cut): Constify. (e_day_view_reshape_long_event): Remove unused variable. * gui/e-week-view.c (e_week_view_key_press): Use e_utf8_from_gtk_event_key() so that we can input utf8 text properly. (e_week_view_cut_clipboard): Constify. (e_week_view_on_cut): Constify. * cal-client/cal-client.c (cal_client_resolve_tzid_cb): Fix the prototype so that this matches CalRecurResolveTimezoneFn. Also renamed it so that it is clear that it is supposed to be a callback. svn path=/trunk/; revision=10942
* cal-client/cal-client.[hc] cal-util/cal-component.cDamon Chaplin2001-07-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-03 Damon Chaplin <damon@ximian.com> * cal-client/cal-client.[hc] * cal-util/cal-component.c * cal-util/cal-recur.[hc] * cal-util/test-recur.c * cal-util/timeutil.c * gui/calendar-config.c * gui/calendar-model.[hc] * gui/comp-util.[hc] * gui/e-calendar-table.c * gui/e-day-view-main-item.c * gui/e-day-view-top-item.c * gui/e-day-view.[hc] * gui/e-itip-control.c * gui/e-timezone-entry.[hc] * gui/e-week-view.[hc] * gui/gnome-cal.[hc] * gui/goto.c * gui/tag-calendar.[hc] * gui/dialogs/cal-prefs-dialog.c * gui/dialogs/comp-editor-page.[hc] * gui/dialogs/comp-editor-util.[hc] * gui/dialogs/comp-editor.c * gui/dialogs/e-timezone-dialog.[hc] * gui/dialogs/event-page.c * gui/dialogs/meeting-page.c * gui/dialogs/recurrence-page.c * gui/dialogs/task-details-page.c * gui/dialogs/task-details-page.glade * gui/dialogs/task-page.c * idl/evolution-calendar.idl * pcs/cal-backend-file.c * pcs/cal-backend.c * pcs/cal-backend.h * pcs/cal.c * pcs/query.c: timezone changes everywhere. There's still quite a few things to update, and its not working well at present. svn path=/trunk/; revision=10729
* changed getFreeBusy method to return a CalObj instead of a sequenceRodrigo Moya2001-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-22 Rodrigo Moya <rodrigo@ximian.com> * idl/evolution-calendar.idl: changed getFreeBusy method to return a CalObj instead of a sequence * cal-client/cal-client.[ch] (cal_client_get_free_busy): changed it to work like the cal_client_get_object function, that is, it does not return anymore a list of UIDs, but a CalClientGetStatus code, and added a new parameter for the caller to get the component back when this function returns (cal_client_open): aggregate WombatClient interface to the CalListener being used * pcs/cal-backend-db.c, pcs/cal-backend-file.c (..get_free_busy): set return value to "char *" as it will be returning a FreeBusy object, and not a list of UIDs * pcs/cal-backend.[ch] (cal_backend_get_free_busy): ditto * pcs/cal.c (cal_construct): queryInterface on the listener to obtain the WombatClient interface svn path=/trunk/; revision=10393
* create a WombatClient when creating a CalClient object, so that we canRodrigo Moya2001-06-221-0/+11
| | | | | | | | | | | | | | | | | | | | | 2001-06-21 Rodrigo Moya <rodrigo@ximian.com> * cal-client/cal-client.[ch]: (cal_client_init): create a WombatClient when creating a CalClient object, so that we can receive authentication notifications from the wombat (cal_client_destroy): destroy the WombatClient object when dying (cal_client_set_auth_func): new function to set the authentication function to be called when a password is required by the calendar server (through the WombatClient object) (cal_client_get_free_busy): new function for calling the new IDL method Cal::getFreeBusy * gui/alarm-notify/Makefile.am: add libwombat to LDADD * gui/Makefile.am: add libwombat to LDADD svn path=/trunk/; revision=10366
* removed stuff to get builtin timezone info from the server.Damon Chaplin2001-06-201-10/+0
| | | | | | | | | | | 2001-06-19 Damon Chaplin <damon@ximian.com> * pcs/cal.c: * idl/evolution-calendar.idl: * cal-client/cal-client.[hc]: removed stuff to get builtin timezone info from the server. svn path=/trunk/; revision=10322
* new dialog for setting the time zone.Damon Chaplin2001-06-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-14 Damon Chaplin <damon@ximian.com> * gui/dialogs/e-timezone-dialog.[hc]: * gui/dialogs/e-timezone-dialog.glade: new dialog for setting the time zone. * gui/dialogs/Makefile.am: added timezone dialog files. * idl/evolution-calendar.idl: added CalTimezoneInfo struct and seq, and getBuiltinTimezoneInfo method. * pcs/cal.c (impl_Cal_get_builtin_timezone_info): implemented method. (cal_class_init): added method to epv. * cal-client/cal-client.c (struct CalClientPrivate): added timezone_info array to contain cached info on builtin timezone city names and coordinates. (cal_client_get_builtin_timezone_info): new function to get the info about builtin timezones. * cal-client/cal-client.h: added CalTimezoneInfo struct, to contain the city names and coords of the builtin timezones. svn path=/trunk/; revision=10223
* Plug leak.Federico Mena Quintero2001-04-031-2/+4
| | | | | | | | | | | | | | | | | 2001-04-02 Federico Mena Quintero <federico@ximian.com> * gui/e-tasks.c (e_tasks_setup_menus): Plug leak. * gui/event-editor.c (obj_updated_cb): Do nothing for now until we think of something sensible to do. (obj_removed_cb): Likewise. * gui/dialogs/task-editor.c (obj_updated_cb): Likewise. (obj_removed_cb): Likewise. * gui/event-editor.c (dialog_to_comp_object): Plug leak. svn path=/trunk/; revision=9124
* Ximianified email addresses and copyrights.Federico Mena Quintero2001-01-171-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-17 Federico Mena Quintero <federico@ximian.com> * */*: Ximianified email addresses and copyrights. * idl/evolution-calendar.idl (CalFactory::open): Renamed from ::load(), and added an only_if_exists argument. (CalFactory::create): Removed method. (Listener::OpenStatus): Removed the IN_USE error and replaced it with a NOT_FOUND one; renamed the enum from LoadStatus. (Listener::notifyCalOpened): Renamed from notifyCalLoaded(). * pcs/cal-backend.h (CalBackend): Removed the uri field. (CalBackendOpenStatus): Renamed from CalBackendLoadStatus and added a NOT_FOUND value. (CalBackendClass::open): Put in a slot for the open method. * pcs/cal-backend.c (cal_backend_create): Removed function. * pcs/cal-backend-file.c (cal_backend_file_open): Return the appropriate value when only_if_exists is TRUE. (create_cal): We are Ximian now, so set the PRODID property to the appropriate foo. * pcs/cal-factory.c (CalFactory_open): implemented, replacing CalFactory_load() and CalFactory_create(). (CalFactory_open): Moved the queue_load_create_job() stuff to here, since we now only need to contemplate the open case instead of load/create ones. (open_backend): Do everything here; replaces load_backend() and create_backend(). * cal-client/cal-listener.h (CalListenerClass::cal_opened): Renamed from cal_loaded. (CalListenerClass): Replaced the silly signals, which are gratuitous abstraction, by a set of function pointers in the instance structure. * cal-client/cal-listener.c (cal_listener_get_calendar): Removed unused function. (cal_listener_construct): Added the listener notification functions. (cal_listener_new): Ditto. (Listener_notifyCalOpened): Renamed to our new naming convention for servant implementations. (Listener_notifyObjUpdated): Ditto. (Listener_notifyObjRemoved): Ditto. * cal-client/cal-client.h (CalClientOpenStatus): Renamed from CalClientLoadStatus. (CalClientClass::cal_opened): Renamed from ::cal_loaded(). (CalClientLoadState): New enum; basically make LoadState public so that users of this code do not have to maintain their own states. * cal-client/cal-client.c (cal_client_create_calendar): Removed function. (cal_client_open_calendar): Moved the functionality over from load_or_create(); now we do everything here. (*): Use the CalClientLoadState enum values instead of the old LoadState values. (cal_client_get_load_state): Renamed from cal_client_is_loaded(), and return the appropriate value. (CalClientPrivate): Added an uri field. (cal_client_init): Initialize priv->uri. (cal_client_destroy): Free the priv->uri. (cal_opened_cb): Maintain the priv->uri. (cal_client_open_calendar): Fill in the priv->uri. (cal_client_get_uri): New function. * gui/calendar-model.c (calendar_model_set_new_comp_vtype): New function to configure the type of calendar components to create when doing click-to-add. This makes the model usable for something other than task lists. (calendar_model_get_new_comp_vtype): New function. * gui/e-calendar-table.c (e_calendar_table_get_model): New function. (e_calendar_table_destroy): Unref the subset_model. * gui/gnome-cal.h (GnomeCalendarOpenMode): Removed enum. * gui/gnome-cal.c (LoadState): Removed enum; we now use the CalClientLoadState from the client objects. (GnomeCalendarPrivate): Removed the loading_uri and task_pad_loading_uri fields as well as the load_state and task_pad_load_state fields, as we can now query them directly from the CalClient. (open_error): Renamed from load_error(). (create_error): Removed function. (gnome_calendar_open): Do not take in the mode parameter. (cal_opened_cb): Get rid of our beautifully-crafted state machine and replace it with simple code; all the loading smarts are in the Wombat now. (setup_widgets): Set the new component vtype of the table model to CAL_COMPONENT_TODO. * gui/Makefile.am (evolution_calendar_SOURCES): Removed gnome-month-item.[ch] from the list of sources. * gui/calendar-summary.c (CalSummary): Removed unused cal_loaded field. (create_summary_view): Do not check if the file exists; this is the job of the Wombat. (generate_html_summary): Fixed prototype. (alarm_fn): Fixed prototype. (property_dialog): Fixed prototype. Wonder if/how this ever worked. (create_summary_view): Cast the component and view as appropriate. Removed unused html variable. [Iain dude, are you compiling with -Wall?] * gui/e-itip-control.c (cal_opened_cb): Sigh, this function signature was *very* wrong. It was using CalClientGetStatus instead of CalClientOpenStatus. * gui/e-tasks.h (ETasksOpenMode): Removed enum. * gui/e-tasks.c (setup_widgets): Set the new component vtype of the table model to CAL_COMPONENT_TODO. (LoadState): Removed the state machine foo. (e_tasks_open): Removed the mode parameter. (initial_load): Removed function. (create_error): Removed function. (ETasksPrivate): Removed folder_uri field. (cal_opened_cb): Remove the state machine. * gui/component-factory.c: #include "tasks-control.h" * conduits/calendar/calendar-conduit.h (ECalConduitContext): Removed calendar_load_tried field. * conduits/calendar/calendar-conduit.c (start_calendar_server_cb): Sigh, fixed function prototype. * conduits/todo/todo-conduit.h (EToDoConduitContext): Removed calendar_load_tried field. * conduits/todo/todo-conduit.c (start_calendar_server_cb): Fixed function prototype. svn path=/trunk/; revision=7571
* Fix confusion in the way the range is expanded.Federico Mena Quintero2000-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-19 Federico Mena Quintero <federico@helixcode.com> * pcs/cal-backend-file.c (compute_alarm_range): Fix confusion in the way the range is expanded. * cal-util/cal-component.c (cal_component_alarms_free): Doh, alarms->alarms is a list, not a generic pointer. Free it properly. (cal_component_free_pilot_id): Removed unused function. (cal_component_free_pilot_status): Likewise. * gui/main.c (init_bonobo): Use VERSION instead of a hardcoded string. Pass argc by value, not by reference. Test the return value of gnome_init_with_popt_table(). * cal-client/cal-client.c (cal_client_free_alarms): Oops, missed implementing this function. * cal-util/timeutil.c (print_time_t): Better printing format. (isodiff_to_secs): Removed unused function. (isodiff_from_secs): Removed unused function. (time_day_end): Removed crufty part. (time_day_begin): Removed crufty part. (time_day_hour): Removed unused function. (format_simple_hour): Removed unused function. (get_time_t_hour): Removed unused function. (time_from_start_duration): Removed unused function. * cal-util/timeutil.h (parse_date): Removed unimplemented, unused function prototype. svn path=/trunk/; revision=7083
* Alarm instance generation support for the Wombat.Federico Mena Quintero2000-12-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-18 Federico Mena Quintero <federico@helixcode.com> Alarm instance generation support for the Wombat. * idl/evolution-calendar.idl (Cal::CalAlarmInstance): Changed to have an alarm UID, the trigger time, and the actual occurrence time. (Cal::CalComponentAlarms): New structure to hold a pair of a component and its alarms that trigger in a particular range of time. (Cal::getAlarmsInRange): Changed to return a CalComponentAlarmsSeq. * cal-util/cal-component.h (CalAlarmInstance): New C-side structure to match the one on the IDL. (CalComponentAlarms): Ditto. (CalAlarmAction): Renamed from CalComponentAlarmAction. (CalAlarmTriggerType): Renamed from CalComponentAlarmTriggerType. Encoded the START and END parameters for the RELATED parameter in this enum, too. Added a NONE value for invalid or missing trigger specifications. (CalComponentAlarmTriggerRelated): Removed. (CalAlarmTrigger): Renamed from CalComponentAlarmTrigger. Renamed the duration/time fields to rel_duration/abs_time, respectively. * cal-util/cal-component.c (cal_component_alarm_get_trigger): Changed to use the new trigger structure. (cal_component_alarm_set_trigger): Likewise. (cal_component_alarm_free_trigger): Removed function. (cal_component_has_alarms): Count the elements in the alarm_uid_hash instead of trying to fetch the first alarm subcomponent. (cal_component_alarms_free): New function to free a CalComponentAlarms structure. (CalComponentAlarmPrivate): Added an uid property pointer. (scan_alarm_property): Scan for the our extension UID property. (cal_component_alarm_get_uid): New function. * pcs/cal-backend.h (CalBackendClass): Changed the signatures of the ::get_alarms_in_range() and ::get_alarms_for_object() methods. * pcs/cal-backend.c (cal_backend_get_alarms_in_range): Changed signature; use the new method. (cal_backend_get_alarms_for_object): Likewise. * pcs/cal-backend-file.c (compute_alarm_range): New spiffy function to compute a range of time for alarm occurrences. (add_alarm_occurrences_cb): New function to add alarms for a particular occurrence of the component. (generate_absolute_triggers): New function to add the absolute alarm triggers. (generate_alarms_for_comp): New function to generate all the alarm instances for a component. (cal_backend_file_get_alarms_in_range): Implemented. * pcs/cal.c (Cal_get_alarms_in_range): Use the new CalBackend API. (Cal_get_alarms_for_object): Likewise. (build_alarm_instance_seq): Removed old function. * cal-util/cal-util.c (cal_alarm_instance_list_free): Removed function. * cal-client/cal-client.c (build_component_alarms_list): New function to demarshal the component alarms sequence. (build_alarm_instance_list): New function to demarshal the alarm instances sequence. (cal_client_get_alarms_in_range): Updated for the new API. (cal_client_get_alarms_for_object): Updated for the new API. * gui/gnome-cal.c: Temporary #ifdef-ing out of alarm-related stuff to make it build. svn path=/trunk/; revision=7076
* Update so as not to conflict with calendar (next_changed_item): update toJP Rosevear2000-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-06 JP Rosevear <jpr@helixcode.com> * conduits/calendar/calendar-conduit.c (map_name): Update so as not to conflict with calendar (next_changed_item): update to use CalClientChange instead of CalObjChange (compute_status): ditto (pre_sync): ditto (for_each_modified): since we now have the cal component we can call local_record_from_comp directly * conduits/todo/todo-conduit.c: same as above * pcs/cal-backend.c: Remove much logging cruft (cal_backend_compute_changes): Calculate the changes based on the hashed database (cal_backend_get_changes): call cal_backend_compute_changes (cal_backend_compute_changes_foreach_key): hash callback for calculating deletions * pcs/cal-backend.h: update protype, remove logging cruft from object * pcs/cal.c (build_change_seq): dup the calobj rather than the uid now (Cal_get_changes): rename from Cal_get_changed_uids (cal_get_epv): reflect name change in epv * cal-util/cal-util.c (cal_obj_change_list_free): update assertion * cal-util/cal-util.h: CalObjChange now returns the entire ical component, update the change types. This should all go away shortly * idl/evolution-calendar.idl: getChangedUIds -> getChanges. CalObjChange now contains the calobj rather than the uid, update the change types * cal-client/cal-client.c (cal_client_get_changes): rename from cal_client_get_changed_uids to make idl and addressbook * cal-client/cal-client.h: Update prototype * cal-client/cal-client.c (build_change_list): Build a list of CalClientChange instead of CalObjChange * cal-client/cal-client-types.c (cal_client_change_list_free): Free a glist of CalClientChanges * cal-client/cal-client-types.h: New file. Declarations for CalClientChange. * cal-client/Makefile.am: Build new files svn path=/trunk/; revision=6822
* Remove pilot cruft. All pilot stuff is in the conduits now and uses theJP Rosevear2000-10-161-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-16 JP Rosevear <jpr@helixcode.com> * cal-client/cal-client.h: Remove pilot cruft. All pilot stuff is in the conduits now and uses the logging facility. * pcs/cal-backend-file.c: ditto * pcs/cal-backend.h: ditto * pcs/cal-backend.c: ditto * pcs/cal.c: ditto * pcs/cal.h: ditto * idl/evolution-calendar.idl: ditto * cal-util/cal-component.h: ditto * cal-util/cal-component.c: ditto * cal-client/cal-client.c: ditto * conduits/calendar/calendar-conduit.c (local_record_from_comp): Take a stab at storing recurrence stuff on the pilot properly * pcs/cal-backend.c (cal_backend_update_object): Don't log the event until after the update in case its a new item svn path=/trunk/; revision=5940
* Add some other cases where a slow sync is in order (pre_sync): Pre loadJP Rosevear2000-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-19 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit.c (check_for_slow_setting): Add some other cases where a slow sync is in order (pre_sync): Pre load the uids, the map and the add/mod/del lists (match_record): Use the map hash to match records (iterate): Iterate using the pre-loaded uid list (iterate_specific): Iterate using the add/mod/del lists (purge): Delete all entries in the del list (set_status): Set status by adding to an appropriate list (set_pilot_id): Set pilot_id by updating map hash * conduits/todo/todo-conduit.h: Add lists for added, modified and deleted objects * conduits/todo/todo-conduit.c (map_name): Get the pilot_id->uid map file name (map_sax_start_element): SAX handler to extract a pilot_id->uid mapping (map_sax_parse): Parse the given file and build a pilot_id->uid hash (map_write_foreach): Write out individual mapping elements (map_write): Write out the pilot_id->uid mapping (start_calendar_server_cb): Rename from gnome_calendar_load_cb * conduits/todo/todo-conduit-config.h: Rename pilotID to pilot_id * conduits/todo/e-todo.conduit.in: A little renaming * conduits/todo/Makefile.am: Fix build slightly * pcs/cal.c (build_change_seq): Build a corba sequence out of a list of CalObjChanges (Cal_get_objects_in_range): Implement new corba function * pcs/cal-backend.c (cal_backend_init): Intiliaze to NULL (cal_backend_load): Track the uri so we can write the log file to the same place (cal_backend_log_name): Figure out the log filename/path based on the calendar uri (cal_backend_set_node_timet): Set an xml node property value from a time_t (cal_backend_log_entry): Adds a log entry to list waiting to be written out (cal_backend_log_sync): Syncs the log entries to disk (cal_backend_log_sax_start_element): SAX callback for reading in log entries (cal_backend_log_sax_end_element): ditto (cal_backend_log_sax_parse): Main SAX parser call to parse the log file looking for particular log entries and creating a CalObjChange hash with the last change for each object (cal_backend_get_log_entries): Returns a hash of objects of a given type changed since the given time (cal_backend_update_object): Add appropriate log entries (cal_backend_remove_object): ditto (cal_backend_get_changed_uids): Implement new idl interface call (cal_backend_foreach_changed): Convert CalObjChange hash into a list * pcs/cal-backend-imc.[hc]: Remove crufty files * pcs/cal-backend-file.c (cal_backend_file_get_type_by_uid): New function that returns the CalObjType for a uid. * cal-client/cal-client.h: Update prototypes. * cal-client/cal-client.c (build_change_list): Build a list of CalObjChange items from a corba sequence. (cal_client_get_changed_uids): New accessor method for the similarly named addition to the idl file. * cal-util/cal-util.h: Update prototypes and add CalObjChangeType enum. * cal-util/cal-util.c (cal_obj_change_list_free): New utility method to free a list of CalObjChange objects. * idl/evolution-calendar.idl: Add get_changed_uids method and associated types. svn path=/trunk/; revision=5512
* No need to spit a warning if removal fails. (event_editor_destroy): FreeFederico Mena Quintero2000-09-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | 2000-08-31 Federico Mena Quintero <federico@helixcode.com> * gui/event-editor.c (file_delete_cb): No need to spit a warning if removal fails. (event_editor_destroy): Free the exception clist data. Unref the calendar client here. (close_dialog): Just call gtk_object_destroy() on the event editor; the destroy handler will free everything else. * cal-client/cal-client.c (cal_client_object_exists): Removed function; this is not useful because we operate asynchronously. * gui/e-day-view.c (e_day_view_on_delete_appointment): No need to spit a warning if removal fails. * gui/e-week-view.c (e_week_view_on_delete_appointment): Likewise. * gui/calendar-model.c (calendar_model_delete_task): Likewise. svn path=/trunk/; revision=5155
* Implement delete option (recurrence_toggled): Make an ugly hack to get theJP Rosevear2000-09-011-0/+1
| | | | | | | | | | | | | | | | 2000-08-31 JP Rosevear <jpr@helixcode.com> * gui/event-editor.c (file_delete_cb): Implement delete option (recurrence_toggled): Make an ugly hack to get the recurrence pages showing properly since we don't yet implement all of the recurrence rule stuff. * cal-client/cal-client.c (cal_client_object_exists): New function to see if an object exists and is obtainable from the backend * cal-client/cal-client.h: Add prototype svn path=/trunk/; revision=5143
* New function. We need this from code that dynamically updates from aFederico Mena Quintero2000-08-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-28 Federico Mena Quintero <federico@helixcode.com> * cal-client/cal-client.c (cal_client_is_loaded): New function. We need this from code that dynamically updates from a client and could not have connected to the "cal_loaded" signal right after the client was created. * gui/calendar-model.c (load_objects): Do not try to load the objects if the client has not been loaded yet. (cal_loaded_cb): Check the status value. * gui/calendar-model.h (CalendarModel): Declare the private structure here so that gdb will give me love. * pcs/cal-factory.h (CalFactory): Likewise. * pcs/cal.h (Cal): Likewise. * cal-client/cal-listener.h (CalListener): Likewise. * cal-client/cal-client.h (CalClient): Likewise. * pcs/cal-backend.h (CalBackend): This no longer has a private structure, so remove it. * cal-util/Makefile.am (libcal_util_la_SOURCES): Removed the vCalendar and old iCalendar cruft. (libcal_utilinclude_HEADERS): Likewise. Removed the obsolete iCalendar test program. svn path=/trunk/; revision=5091
* There. A pretty function to generate recurrence instances atomically soFederico Mena Quintero2000-08-111-1/+5
| | | | | | | | | | | 2000-08-10 Federico Mena Quintero <federico@helixcode.com> * cal-client/cal-client.c (cal_client_generate_instances): There. A pretty function to generate recurrence instances atomically so that clients don't have to jump through hoops. Now we can get rid of the ugly calendar_iterate() function. svn path=/trunk/; revision=4701
* Added a get_objects_in_range() method. Takes in a time range and the typeFederico Mena Quintero2000-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-08 Federico Mena Quintero <federico@helixcode.com> * idl/evolution-calendar.idl (Cal): Added a get_objects_in_range() method. Takes in a time range and the type of component we are interested in; returns a list of UIDs. The idea is that ocurrences get computed in the client; we can have multiple recurrences in iCalendar and we cannot identify them trivially across the wire. (Cal): Removed the get_events_in_range() method. * pcs/cal-backend.c (cal_backend_free_uid_list): New function. (cal_backend_get_objects_in_range): New function. (cal_backend_get_events_in_range): Removed. * pcs/cal-backend-file.c (cal_backend_file_get_objects_in_range): Implemented new method. (cal_backend_file_get_events_in_range): Removed. * pcs/cal.c (Cal_get_events_in_range): Removed. (uncorba_obj_type): New function. (Cal_get_uids): Use uncorba_obj_type(). (Cal_get_n_objects): Likewise. (Cal_get_objects_in_range): Implemented new method. * cal-client/cal-client.c (cal_client_get_events_in_range): Removed. (cal_client_get_objects_in_range): Implemented. (corba_obj_type): New function. (cal_client_get_n_objects): Use corba_obj_type(). (cal_client_get_uids): Likewise. svn path=/trunk/; revision=4613
* Big sync. Disable calendar compilation for a few hours - FedericoFederico Mena Quintero2000-08-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-07 Federico Mena Quintero <federico@helixcode.com> * cal-util/cal-component.c (cal_component_get_as_string): Doh, libical owns the string's memory, so do not free it. * cal-client/client-test.c (create_client): Connect to the destroy signal of the client here. * cal-client/test.ics: New test file, modified from Eric Busboom's test file from RFC 2445. 2000-08-05 Federico Mena Quintero <federico@helixcode.com> * cal-client/client-test.c (dump_component): This was gone for some reason. (main): Load a new test file. 2000-08-04 Federico Mena Quintero <federico@helixcode.com> * cal-util/cal-component.c (cal_component_commit_sequence): New function to commit changes to the SEQUENCE property. (cal_component_get_as_string): Ensure that the sequence has been committed. * cal-client/cal-client.c (cal_client_get_object): Use CalComponent instead of the old iCalObject. (cal_client_update_object): Use iCalObject. Commit the SEQUENCE property before stringifying the object and piping it over to the Wombat. svn path=/trunk/; revision=4585
* server code to service these:Seth Alves2000-06-291-0/+8
| | | | | | | | | | | | | | | | | | | | * pcs/cal.c (Cal_get_uid_by_pilot_id): (Cal_update_pilot_id): * pcs/cal-backend-imc.c (cal_backend_imc_update_pilot_id): (cal_backend_imc_get_uid_by_pilot_id): * pcs/cal-backend.c (cal_backend_get_uid_by_pilot_id): (cal_backend_update_pilot_id): server code to service these: * gui/calendar-pilot-sync.c: updated to make use of cal-client. also uses dirty bits on both sides to aid in syncing. * cal-client/cal-client.c (cal_client_get_uid_by_pilot_id): new function -- ask the cal server to return uid given an object's pilot id. (cal_client_update_pilot_id): new function -- inform the cal server of an objects pilot id and pilot dirty-flag. svn path=/trunk/; revision=3789
* Sync - FedericoFederico Mena Quintero2000-06-231-1/+1
| | | | svn path=/trunk/; revision=3693
* Added a get_n_objects() method.Federico Mena Quintero2000-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | 2000-06-09 Federico Mena Quintero <federico@helixcode.com> * idl/evolution-calendar.idl (Cal): Added a get_n_objects() method. * pcs/cal-backend.c (cal_backend_get_n_objects): New function. * pcs/cal-backend-imc.c (cal_backend_imc_get_n_objects): Implemented. * pcs/cal.c (Cal_get_n_objects): Implemented. * cal-client/cal-client.c (cal_client_get_uids): Free the ev. (cal_client_get_n_objects): Implemented. * cal-util/calobj.h (iCalObjectField): New enumeration to identify the fields in an iCalObject. svn path=/trunk/; revision=3486
* instead of returning a text representation, decode the text and return anSeth Alves2000-06-081-1/+10
| | | | | | | | | | | | | | | | | | | | | | * cal-client/cal-client.c (cal_client_get_object): instead of returning a text representation, decode the text and return an iCalObject. Also added CalClientGetStatus which indicates success or type of failure. * cal-util/calobj.c (ical_object_find_in_string): #ifed out ical_object_find_in_string since it is unused now. * cal-client/client-test.c (list_uids): track get_object change * gui/calendar-commands.c (calendar_iterate): same * gui/e-day-view.c (e_day_view_update_event): same * gui/e-week-view.c (e_week_view_update_event): same * gui/print.c (print_day_details): same (print_day_summary): same (print_todo_details): same * gui/gnome-cal.c (trigger_alarm_cb): same * gui/gncal-todo.c (gncal_todo_update): same svn path=/trunk/; revision=3463
* New function to add today's alarms for a single object.Federico Mena Quintero2000-05-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2000-05-11 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (add_alarms_for_object): New function to add today's alarms for a single object. (gnome_calendar_object_updated_cb): Update the object's alarms. * idl/evolution-calendar.idl (Cal): Added a get_alarms_for_object() method. * pcs/cal.c (Cal_get_alarms_for_object): Implemented method. * pcs/cal-backend.c (cal_backend_get_alarms_for_object): New function. * pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_for_object): Implemented. * cal-client/cal-client.c (cal_client_get_alarms_for_object): New function. svn path=/trunk/; revision=3003
* Removed unused arguments. Load the initial alarms here. (load_alarms): NewFederico Mena Quintero2000-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-11 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (gnome_calendar_update_all): Removed unused arguments. Load the initial alarms here. (load_alarms): New function to load a day's worth of alarms. (gnome_calendar_class_init): Eeeek! This was taking in an incorrect argument type. (gnome_calendar_init): Now the calendar keeps a hash table of UIDs->queued alarms. Create the hash table here. (gnome_calendar_destroy): Destroy the alarms hash table. (gnome_calendar_object_updated_cb): Remove the alarms for the object and regenerate them. (gnome_calendar_object_removed_cb): Remove the alarms for the object. * gui/alarm.c (alarm_add): Do not take in a CalendarAlarm, just the trigger time, the callback and the closure data. Return an opaque identifier for the alarm so that it can be removed by the client code if needed. Use the queue_alarm() helper function. (queue_alarm): Helper function to actually queue the alarm and set up the itimer. Deal with a nonzero return value from setitimer(). (alarm_remove): New function to remove an alarm based on its ID. (pop_alarm): New helper function; pops the first alarm of the queue and resets the timer as appropriate. (alarm_ready): Simplified a lot by using pop_alarm(). * idl/evolution-calendar.idl (Cal): Added get_alarms_in_range(). * pcs/cal.c (build_instance_seq): New function to build a CORBA sequence from the internal list of instances. (Cal_get_events_in_range): Use build_instance_seq(). (Cal_get_alarms_in_range): Implemented new method. * pcs/cal-backend.c (cal_backend_get_alarms_in_range): New function with the get_alarms_in_range() engine. * pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_in_range): Implemented the get_alarms_in_range() method. * cal-client/cal-client.c (cal_client_get_alarms_in_range): New client-side function for getting the alarms. (build_instance_list): New helper function to build the CalObjInstance list from the CORBA sequence. (cal_client_get_events_in_range): Use build_instance_list(). * gui/calendar-commands.h: #include <cal-util/calobj.h>. #include "gnome-cal.h". * gui/e-week-view.c: #include "calendar-commands.h" instead of main.h; the latter is an obsolete file and will be killed. * gui/evolution-calendar-control.c (main): Call init_bonobo() before anything else. We need the GTK+ object system initialized. * gui/Makefile.am (evolution_calendar_SOURCES): Do not use main.h. * cal-util/cal-util.c (cal_alarm_instance_list_free): New function. svn path=/trunk/; revision=2987
* CalBackendClass now is just an interface for calendar backends; this is anFederico Mena Quintero2000-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-08 Federico Mena Quintero <federico@helixcode.com> * pcs/cal-backend.h (CalBackendClass): CalBackendClass now is just an interface for calendar backends; this is an abstract class. Put in the vtable for the backend methods. * pcs/cal-backend.c (cal_backend_new): Removed function, since CalBackend is not just an abstract class. Removed implementation-specific functions and made public functions call the virtual methods instead. * pcs/cal-backend-imc.[ch]: New files with the CalBackendIMC implementation; this implements a backend for iCalendar and vCalendar files. Moved the implementation-specific stuff from cal-backend.[ch] to here. * pcs/cal-backend-imc.c (CalendarFormat): Moved enumeration to here. Added a CAL_UNKNOWN value for when the backend is not loaded yet. (cal_backend_imc_init): Initialize priv->format as CAL_UNKNOWN. (save_to_vcal): Use the same VCProdIdProp value as in cal-util/calobj.c. Use "1.0" as the VCVersionProp as per the vCalendar spec. (ensure_uid): Return nothing, since the result value need not be used anymore. (add_object): Since we mark the calendar as dirty anyways, we do not need to check the result value of ensure_uid() anymore. (remove_object): Asssert that we know how to handle the object's type. We do this in add_object() anyways. * pcs/Makefile.am (libpcs_a_SOURCES): Added cal-backend-imc.[ch]. * gui/gnome-cal.c: Replaced debugging printf()s with g_message() so that we can see the line number where they occur. * gui/gnome-cal.c (gnome_calendar_load_cb): Sort of handle the LOAD_METHOD_NOT_SUPPORTED result code, and added a default for the switch. * cal-client/cal-listener.h (CalListenerLoadStatus): Removed enumeration; it is stupid to translate all values for the CalClient when it is going to translate them again. (CalListenerClass::cal_loaded): This signal now passes the LoadStatus directly from the CORBA side. * cal-client/cal-listener.c (Listener_cal_loaded): Do not translate the status value. * cal-client/cal-client.h (CalClientLoadStatus): Added the CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED error code. * cal-client/cal-client.c (cal_loaded_cb): Translate the CORBA version of the LoadStatus result code. * pcs/cal-factory.c (CalFactoryPrivate): New methods field for the hash table from method strings to the GtkTypes for backend class types. (cal_factory_init): Create the priv->methods hash table. (cal_factory_destroy): Free the priv->methods hash table. (cal_factory_register_method): New function to register a backend class for a particular URI method. (launch_backend_for_uri): New function to launch a backend for a particular URI's method. (load_backend): Use launch_backend_for_uri(). Move the error notification code from load_fn() to here. (create_backend): Use launch_backend_for_uri(). Move the error notification code form create_fn() to here; it is #ifdefed out since currently cal_backend_create() does not have any error reporting capabilities. * idl/evolution-calendar.idl (Listener::LoadStatus): Added a PROTOCOL_NOT_SUPPORTED error code. * pcs/cal-factory.c (cal_factory_load cal_factory_create): Removed functions, since they were supposed to be internal only. (CalFactory_load): Call queue_load_create_job() directly. (CalFactory_create): Likewise. svn path=/trunk/; revision=2921
* Removed function now that it is no CORBA server in the GUI.Federico Mena Quintero2000-03-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-03-12 Federico Mena Quintero <federico@helixcode.com> * gui/main.c (gnome_calendar_locate): Removed function now that it is no CORBA server in the GUI. (save_default_calendar): Removed function. Now the personal calendar server will take care of saving modified calendars when appropriate. (close_cmd): Do not call unregister_calendar_services(). * gui/eventedit.c (ee_ok): Do not save the calendar. * gui/gncal-day-panel.c (day_view_range_activated): Likewise. * gui/gncal-todo.c (ok_button): Likewise. (delete_todo): Likewise. * gui/gncal-full-day.c (delete_occurance): Likewise. (delete_appointment): Likewise. (unrecur_appointment): Likewise. (child_focus_out): Likewise. (update_from_drag_info): Likewise. * gui/gnome-cal.c (gnome_calendar_new): Removed obsolete call to create the CORBA server. * gui/gnome-cal.h (GnomeCalendar): Renamed `calc' field to `client'. * cal-client/cal-client.h (CalClient): Removed filename and corba_server fields. svn path=/trunk/; revision=2102
* replaced "Calendar *cal" with "CalClient *calc" in the GnomeCalendarSeth Alves2000-03-091-1/+4
| | | | | | | | | | | | | | | * gui/gnome-cal.h: replaced "Calendar *cal" with "CalClient *calc" in the GnomeCalendar struct. * gui/*.c: tracked change from Calendar * to CalClient * gui/main.c: moved alarm_defaults from here to cal-util/calobj.c (calendar_get_events_in_range): pulled this out of calendar.c and fixed it up to use cal-client stuff. i'm not sure where to put it yet. * gui/main.c (calendar_iterate): pulled this one out of calendar.c also svn path=/trunk/; revision=2090
* Implemented.Federico Mena Quintero2000-02-171-0/+2
| | | | | | | | | | | | | | | | 2000-02-17 Federico Mena Quintero <federico@helixcode.com> * cal-client.c (cal_client_remove_object): Implemented. * cal.c (cal_notify_remove): Implemented. (Cal_remove_object): Implemented. (cal_get_epv): Fill in the remove_object field in the epv. * cal-backend.c (cal_backend_remove_object): Implemented. (notify_remove): New function to notify clients that an object was removed. svn path=/trunk/; revision=1821
* Implemented.Federico Mena Quintero2000-02-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-11 Federico Mena Quintero <federico@helixcode.com> * cal-client.c (cal_client_update_object): Implemented. * cal.c (cal_notify_update): New function to notify the listener about an updated object. (Cal_update_object): Implemented. (Cal_get_uids): set_release() the sequence to TRUE. (Cal_get_events_in_range): Likewise. * cal-backend.c (remove_object): New function to remove objects from a calendar backend. (cal_backend_update_object): New public function to update an object and notify clients about it. * evolution-calendar.idl (Cal): Added update_object() and delete_object() methods. (Listener): Removed the obj_changed method and renamed obj_added to obj_updated. We now only have updated and removed notifiers. * cal-listener.[ch]: Removed the "changed" notification code. Changed the "added" notification code to the "updated" notification. * cal-client.c: Likewise. * tlacuache.c (create_cal_factory): Connect to "destroy" on the factory and exit the main loop when the factory is destroyed. * cal-factory.c (backend_destroy_cb): New callback used when a backend is destroyed. Removes the backend from the factory's hash table and unrefs the factory if all backends go away. (add_calendar_client): Free the environment. * cal.c (cal_new): Use bonobo_object_unref() if we fail to initialize. * cal-listener.c (cal_listener_new): Likewise. * layout.c (layout_events): Plug li.partition memory leak. svn path=/trunk/; revision=1742
* Connect to the Cal's destroy signal. (cal_backend_remove_cal): KilledFederico Mena Quintero2000-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-10 Federico Mena Quintero <federico@helixcode.com> * cal-backend.c (cal_backend_add_cal): Connect to the Cal's destroy signal. (cal_backend_remove_cal): Killed function now that removal of Cal objects is done in their destroy callback. (cal_destroy_cb): New callback to remove a Cal from the backend's list of clients. Also, the backend destroys itself when there are no more clients connected to it. (save): New placeholder function to save a backend. (destroy): New function to destroy a backend's data. (cal_backend_destroy): Save the calendar and destroy it. * cal.c (cal_destroy): Reset the priv->backend to NULL. * cal-factory.c (add_calendar_client): There is no need to call cal_backend_remove_cal(); we can now just destroy the Cal object. (create_fn): Make sure we always unref the URI. (load_fn): Move the URI unref to the end of the function for safety. * cal-factory.c (add_calendar_client): Unref the Cal only if notification of the listener was unsuccessful. Otherwise, the calendar user agent (Listener side) keeps the reference. * tl-test.c (list_uids): Free the calobj. * cal-client.c (cal_loaded_cb): Use bonobo_object_unref() to get rid of the listener. (load_or_create): Likewise. (destroy_factory): New function to get rid of the factory. (destroy_listener): New function to get rid of the listener. (destroy_cal): New function to get rid of the calendar client interface object. (cal_client_destroy): Free all resources. (cal_client_get_object): CORBA_free() the calobj string. Boy, I love memprof. * cal-listener.c (cal_listener_destroy): Reset the priv->cal to CORBA_OBJECT_NIL. * cal-backend.c (cal_backend_remove_cal): Do not unref the Cal, since the calendar user agent owns it. (cal_backend_add_cal): Do not ref the Cal, since the calendar user agent owns it. * cal-factory.c (add_calendar_client): Use bonobo_object_unref() to get rid of the calendar client interface object. * calobj.c (ical_object_create_from_vobject): Duplicate the default "PUBLIC" string. 2000-02-09 Federico Mena Quintero <federico@helixcode.com> * cal-factory.c (cal_factory_load): Added documentation comment. (load_fn): Do not print a message if the backend could not be loaded due to a non-fatal error. (queue_load_create_job): Moved the stuff from cal_factory_load() to here. Now this function serves to queue load or create requests. (cal_factory_load): Use queue_load_create_job(). (cal_factory_create): Implemented; use queue_load_create_job(). (create_fn): New job handler for creating new calendars. (create_backend): New function to create a new backend with a new calendar. (add_backend): New helper function to add backends to the factory's hash table. (load_backend): Use add_backend() instead of adding the backend by ourselves. * cal-client.c (load_or_create): Moved the functionality from cal_client_load_calendar() to here, and added an option to create a new calendar instead of loading an existing one. (cal_client_load_calendar): Use load_or_create(). (cal_client_create_calendar): Implemented. * cal-backend.c (cal_backend_create): Implemented. * evolution-calendar.idl (LoadStatus): Added an IN_USE error for create requests. * cal-listener.h (CalListenerLoadStatus): Added CAL_LISTENER_LOAD_IN_USE. * cal-listener.c (Listener_cal_loaded): Convert the IN_USE error. * cal-client.h (CalClientLoadStatus): Added CAL_CLIENT_LOAD_IN_USE. * cal-client.c (cal_loaded_cb): Handle CAL_LISTENER_LOAD_IN_USE. * tl-test.c: New test program for the calendar client side; it also exercises the server side by sending commands to it. * Makefile.am: Added the tl-test program. * tlacuache.gnorba: Updated. * tlacuache.c (create_cal_factory): Use the right GOAD id. * cal-client.c (cal_client_construct): Use the right GOAD id. svn path=/trunk/; revision=1732
* Added get_uids() method to get a list of UIDs based on object types.Federico Mena Quintero2000-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-08 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl (Cal): Added get_uids() method to get a list of UIDs based on object types. * cal-backend.c (cal_backend_get_uids): Implemented get_uids() in the backend. * cal.c (Cal_get_uids): Implemented get_uids() method. * cal-client.c (cal_client_get_uids): Implemented client-side function. * cal-util.c (cal_obj_instance_list_free): Doh. Free the list, not the last link. (cal_obj_uid_list_free): New function to free a list of UIDs. * GnomeCal.idl (Repository): Removed unused method get_object_by_id_list(). This is just for cleanup purposes and to remind me exactly of what needs to be moved over to evolution-calendar.idl. (Repository): Removed unused get_objects() method. * corba-cal.c (init_calendar_repo_class): Removed the unused get_objects method. * calobj.h (CalObjFindStatus): New status value enumeration for the find function. * calobj.c (ical_object_find_in_string): New function to parse a complete calendar and find a calendar object in it. This should be used instead ical_object_new_from_string() in the future. * evolution-calendar.idl (CalObjInstance): Added an uid field. Now the idea is that whenever calendar object strings are passed around, their UIDs are passed along with them so that the actual object can be pulled from the whole VCAL object using its UID to identify it. * cal-util.h (CalObjInstance): Added uid field. * cal-util.c (cal_obj_instance_list_free): Free the UIDs. * cal-backend.c (build_event_list): Store the object's UID in the instance structure. * cal.c (Cal_get_events_in_range): Copy the UID field to the CORBA structure. * cal-client.c (cal_client_get_events_in_range): Copy the UID field from the CORBA structure. * main.c (gnome_cal_file_menu): Removed unfinished html-month stuff. * Makefile.am (gnomecal_SOURCES): Removed html-month.c. * gnome-cal.c: #include "alarm.h" (mail_notify): Made static. * alarm.h: #include "calobj.h" * corba-cal-factory.h (init_corba_server): Fixed prototype. * quick-view.c (create_items_for_event): Made static. * gncal-todo.c (column_resized): Made static. * layout.c (find_index): Made static. svn path=/trunk/; revision=1699
* New struct to wrap instances of calendar objects for recurrencies andFederico Mena Quintero2000-02-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-08 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl (CalObjInstance): New struct to wrap instances of calendar objects for recurrencies and alarms. (Cal::get_events_in_range): New method to get ocurring and recurring events by time range. * cal-backend.c (cal_backend_get_events_in_range): New function to get a list of event instances in a time range. (string_from_ical_object): New internal function. (cal_backend_get_object): Use string_from_ical_object() instead of doing everything ourselves. (cal_backend_get_events_in_range): New function to get a list of the events that occur or recur in a specified time range. * cal-client.c (cal_client_get_events_in_range): Implemented client-side function. * cal-util.h: * cal-util.c: New files with utilities and types common to the client and server parts. (CalObjInstance): New structure to hold an instance of an actual occurrence, recurrence, or alarm trigger of a calendar object. (cal_obj_instance_list_free): New function to free a list of calendar object instances. * cal.c (Cal_get_events_in_range): Implemented new method. * corba-cal.c (cal_repo_get_updated_objects): Free `str' with free(), not g_free(), since calendar_get_as_vcal_string() uses writeMemVObject(), which uses realloc(). Fixed in gnome-pim as well. svn path=/trunk/; revision=1693
* New function to create the base VObject for a calendar.Federico Mena Quintero2000-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-02-04 Federico Mena Quintero <federico@helixcode.com> * cal-backend.c (get_calendar_base_vobject): New function to create the base VObject for a calendar. (cal_backend_get_object): Create the base calendar and add the sought object to it, then stringify it. * evolution-calendar.idl (Listener::obj_added Listener::obj_changed): Now these pass in just the UIDs, not the complete objects. * cal-listener.c (Listener_obj_added): Changed to pass in the uid, not the object. (Listener_obj_changed): Likewise. * cal-client.h (CalClientClass): Made the obj_added and obj_changed signals take in the UIDs, not the full objects. * cal-client.c (obj_added_cb): Likewise. (obj_changed_cb): Likewise. svn path=/trunk/; revision=1666
* Added the get_object() method.Federico Mena Quintero2000-02-021-0/+2
| | | | | | | | | | | | | | | | | 2000-02-03 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl (Cal): Added the get_object() method. * cal-client.c (cal_client_get_object): New function to get a calendar object by its UID. * cal.c (Cal_get_object): Implemented. * cal-backend.c (cal_backend_get_object): New unfinished backend function. We need some reorganizing of how the calendar objects are stored. svn path=/trunk/; revision=1663
* Handle the cal_loaded signal from the listener. Store the calendar clientFederico Mena Quintero2000-02-011-0/+6
| | | | | | | | | | | | | | | | 2000-02-01 Federico Mena Quintero <federico@helixcode.com> * cal-client.c (cal_loaded): Handle the cal_loaded signal from the listener. Store the calendar client interface object, and emit our own cal_loaded signal. (cal_client_load_calendar): Connect to the listener's signals. (cal_client_class_init): Added the "obj_added", "obj_removed", öbj_changed" signals. (obj_added_cb): Handle the signal from the listener. (obj_removed_cb): Likewise. (obj_changed_cb): Likewise. svn path=/trunk/; revision=1658
* Sync to desktop - FedericoArturo Espinosa2000-01-311-1/+1
| | | | svn path=/trunk/; revision=1657
* Changed the namespace from GNOME::Calendar to Evolution::Calendar.Federico Mena Quintero2000-01-291-1/+1
| | | | | | | | | | | | | | | | | 2000-01-30 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl: Changed the namespace from GNOME::Calendar to Evolution::Calendar. (Listener::LoadStatus): Fixed SUCESSS -> SUCCESS typo. And I never noticed it in the implementation. Ain't M-/ grand? * Makefile.am: Changed ocurrences of gnome-calendar.idl to evolution-calendar.idl. * *.[ch]: Changed GNOME_Calendar_foo identifiers to Evolution_Calendar_foo. svn path=/trunk/; revision=1652
* Calendar client side work - FedericoArturo Espinosa2000-01-251-0/+72
svn path=/trunk/; revision=1629