2001-09-07 Bradford Hovinen <hovinen@ximian.com>
* archiver-client.c (location_client_store_xml): Make backend_id
const
* util.c (parse_date): Set the time zone
(parse_date): Initialize tm_isdst
* archiver-client.c (location_client_store_xml): Call
ConfigArchiver_Location_storageComplete when done
(location_client_store_xml): Don't try to save the XML file if
there was an error getting the storage filename
* location.c (location_storage_complete): Implement
(impl_ConfigArchiver_Location_storageComplete): Implement
* config-log.c (config_log_get_backend_id_for_id): Make return
value const
2001-09-04 Bradford Hovinen <hovinen@ximian.com>
* location.c (location_get_storage_filename): Notify listeners
that new rollback data is available
* bonobo-config-archiver.c (new_rollback_cb): Implement
(bonobo_config_archiver_new): Connect above to event source
* location.c (location_store):
(location_init): Construct an event source and add its interface
* Makefile.am (INCLUDES): Remove -DDEFAULTS_DIR
2001-09-03 Bradford Hovinen <hovinen@ximian.com>
* bonobo-config-archiver.c (bonobo_config_archiver_new): Accept
complete moniker as an argument; do the parsing here
* archiver-client.c (location_client_load_rollback_data): Adjust
time from mktime according to time zone information
* bonobo-moniker-archiver.c (is_leap_year):
(mod_date_by_str): Implement
(parse_name): Use correct math for computing offsets
* bonobo-config-archiver.c (bonobo_config_archiver_new): Don't
print an error message if the parent moniker is bad
(bonobo_config_archiver_new): Remove debugging messages
* archiver-client.c (location_client_load_rollback_data): Make
date and backend_id const
* bonobo-moniker-archiver.c (archiverdb_resolve): Determine date
from moniker and pass to bonobo_config_archiver_new
* bonobo-config-archiver.c (bonobo_config_archiver_new): Accept
date structure as argument
2001-08-27 Bradford Hovinen <hovinen@ximian.com>
* archive.c (foreach_build_list_cb): Don't add the location to the
list if it is marked deleted
(impl_ConfigArchiver_Archive_createLocation): Do
CORBA_Object_duplicate rather than bonobo_object_dup_ref
* location.c (location_is_deleted): Implement
* background-properties-capplet.c (setup_dialog): Initialize/free
the CORBA environment structure
(real_realize_cb): Put into an idle handler, called by
realize_2_cb, the new timeout handler
* preferences.c (preferences_load_from_bonobo_pbag):
(preferences_load_from_bonobo_db): Extract from preferences_new_*
* background-properties-capplet.c (property_change_cb):
(realize_cb): Accept prefs structure in lieu of
Bonobo_PropertyBag; don't reload the preferences structure from
the property bag
(property_change_cb): Call preferences_apply_event to modify the
preferences structure appropriately
(property_change_cb):
(realize_cb): If the preferences structure is marked destroyed,
just return
(setup_dialog): Create a preferences structure from the property
bag given and use that as the extra data passed to callbacks
(realize_cb): Put into an idle handler real_realize_cb
* preferences.c (preferences_apply_event): Implement
* applier.c (output_compat_prefs): Make prefs const
* applier.[ch]: Have applier_apply_prefs take a const Preferences
structure
* preferences.[ch]: Make preferences_clone take a const
Preferences structure
2001-08-03 Bradford Hovinen <hovinen@ximian.com>
* config-log.c (load_log_entry): Return NULL if fgets returns NULL
(dump_log): If both first_old and log_data are NULL, go ahead and
dump the file, since nothing has been loaded yet
(config_log_garbage_collect): Don't bother dumping the log file or
reloading
2001-08-02 Bradford Hovinen <hovinen@ximian.com>
* config-log.c (config_log_garbage_collect): Implement
(dump_log): Don't dump the old file if first_old is NULL
* main.c (main): Support --garbage_collect
* location.c (location_garbage_collect):
(garbage_collect_cb): Implement
2001-06-22 Bradford Hovinen <hovinen@ximian.com>
* archive.c (archive_get_current_location): Return NULL if the
location id is NULL
(archive_get_current_location_id): Return NULL if storing the
snapshot results in an error
* location.c (location_store): Add return values for error
conditions; remove g_warning's and g_critical's
(location_store_full_snapshot): Folded in store_snapshot_cb; don't
call location_foreach_backend
(location_store_full_snapshot): Return error condition; 0 on
success, -1 if any backend failed
* location-manager-dialog.c (location_manager_dialog_set_arg): Add
a check to inform the user if the location manager was unable to
form an initial configuration snapshot
2001-06-21 Bradford Hovinen <hovinen@ximian.com>
* archive.c (archive_set_current_location): Use
location_get_changed_backends
* location.c (location_get_changed_backends):
(location_does_backend_change): Implement
(create_backends_list):
(merge_backend_lists): Moved from archive.c
* gui-backend-list.c (gui_backend_list_launch_current): Use
location_does_backend_change when deciding whether to pass
--location on the command line
2001-05-03 Bradford Hovinen <hovinen@ximian.com>
* location.c (location_store_xml): Support STORE_DEFAULT
(store_snapshot_cb): Use STORE_DEFAULT rather than STORE_MASK_PREVIOUS
* location.h (_StoreType): Add STORE_DEFAULT
* config-log.c (config_log_get_rollback_id_by_steps): Return the
current id if the node represents default data
* main.c (do_add_location): Cast correctly, fixing compiler
warning
2001-04-24 Bradford Hovinen <hovinen@ximian.com>
* location.c (location_store): Use read rather than fread
2001-04-23 Bradford Hovinen <hovinen@ximian.com>
* location.c (location_store): Block SIGPIPE
(location_store): Fix off-by-one bug
* archive.c (archive_get_current_location_id): Store a full
snapshot of the system after the default location is created
* location.c (run_backend_proc): Added parameter do_get to allow
control of whether pipe is opened to read or write
(store_snapshot_cb): Implement. Invokes the given backend with
--get and stores the XML data
(location_store_full_snapshot): Implement. Stores a complete
snapshot with all backend data
(subtract_xml_node): Assume all nodes are the same
(location_store): Add string termination character
(location_store): Only store data if any data were actually read
2001-04-22 Bradford Hovinen <hovinen@ximian.com>
* config-log.c (config_log_iterate): Use the correct data pointer
to pass to the callback
* location.c (location_new): Save the metadata for the newly
created location right away
* util.h: Defined DEBUG_MSG macro for debugging messages
* archive.c (archive_unregister_location): Don't remove the
location from the tree if the object is marked destroyed
2001-04-21 Bradford Hovinen <hovinen@ximian.com>
* archive.c (archive_destroy): Return if the archive was already
destroyed
* location.c (location_delete): Unregister the location before
destroying it
* config-log.c (config_log_delete): Set deleted flag
(config_log_destroy): Only dump the log if the log is not marked
deleted
* location.c (location_delete): Check return value of rmdir
* config-log.c (io_buffer_destroy): Call g_io_channel_close to
close the GIOChannel
(disconnect_socket): Force the removal of the source id from the
main loop
(config_log_destroy): Disconnect the socket after unloading, not
before
* location.c (location_delete): Remember to have a NULL at the end
of arguments to g_strconcat ()
2001-04-22 Bradford Hovinen <hovinen@ximian.com>
* location-list.[ch]: Change to inherit GtkObject
* location-manager-dialog.c (location_manager_dialog_destroy):
Implement. Close and destroy all aggregated objects.
(close_cb): Call gtk_object_destroy
2001-04-21 Bradford Hovinen <hovinen@ximian.com>
* location-manager-dialog.c (delete_location_cb): Don't let the
user delete the default location
(delete_ok_cb): Add some sanity checks to make sure the current
location is set to something new if we delete it
* location-list.c (location_list_select): Implement. Selectes the
given location in the location list
* location-manager-dialog.c (delete_ok_cb): Use correct semantics
for callback
2001-02-19 Bradford Hovinen <hovinen@ximian.com>
* Added test-1.sh and test-2.sh, the first two tests in the test suite
* location.c (location_foreach_backend): Update to use BackendNote
(do_rollback): Don't do rollback if the doc is NULL
(location_store_xml): Return if this location does not contain the
backend specified
(location_store_xml): Use fprintf rather than g_warning
(subtract_xml_node):
(merge_xml_nodes): Update child node while iterating
* config-log.c (config_log_get_rollback_ids_for_date): Remove
* location.c (location_set_arg): ref inherited object
* main.c (main): Don't check if the location is default; don't
create default location if non-existant
(main): Signal error if the user is adding a location and did not
specify a name
(main): Use fprintf to signal the error that a location could not
be opened
(main): Signal error and exit when archive cannot be opened,
rather than using g_error
(do_add_location): Check for NULL location_id
(do_add_location): Create default location if it does not exist
and it is specified as the parent
* archive.c (archive_get_current_location_id): Create the default
location if it does not exist
* backend-list.c (backend_list_contains): Use strcmp and iterate
through the list
* location.c (location_contains): Read whether the backend is in
the master list if this location is toplevel
2001-02-18 Bradford Hovinen <hovinen@ximian.com>
* main.c (do_add_backend): Support ContainmentType specification
(do_store): Support StoreType specification
(struct store_options): Add set of options to support
compare_parent, mask_previous, options
(struct add_remove_backend_options): Add option for partial
containment when adding backend
* location.c (subtract_xml_node):
(merge_xml_nodes):
(compare_xml_nodes):
(merge_xml_docs):
(subtract_xml_doc): Implement. XML node compare/merging operations
(location_store): Rewrite to call location_store_xml
(location_store_xml): Include support for diffing with
configuration data from parent config
(location_dump_rollback_data): Rewrite to use
location_load_rollback_data
(dump_xml_data): Remove
(do_rollback): Rewrite to use xmlDocDump; pass xmlDocPtr rather
than id number
(location_rollback_id): Add node merging support
(location_rollback_backend_by):
(location_rollback_backend_to): Rewrite to use
location_load_rollback_data
(location_rollback_backends_to): Rewrite to iterate through
backend list and call location_rollback_backend_to for each
element
(location_rollback_all_to): Ditto
2001-02-14 Bradford Hovinen <hovinen@ximian.com>
* location.h (_ContainmentType): Introduce. Specifies the type of
containment (full, partial, none), of a backend in a location
* location.c: Added struct BackendNote; have backend list include
type of containment as well as backend id
(location_contains): Use find_note
(find_note): Implement. Finds a note for the given backend id in
the backend list
(backend_note_new):
(backend_note_destroy): Implement. Convenience functions for
creating and destroying backend notes
(load_metadata_file):
(write_metadata_file): Read/write type of backend containment
(full or partial)
(location_add_backend): Pass parameter telling whether containment
is partial
2001-01-25 Bradford Hovinen <hovinen@ximian.com>
* config-log.c (get_current_date): Use local time rather than
Greenwich Mean Time
* location.c (location_store_xml): Implement; copy from
location_store
(location_store): Free filename after use
* archive.c (archive_load): Free prefix only if not global
* location.c (location_rollback_all_to): Increment array
* util.c (parse_date): Normalize values