Only try to store a full snapshot if we are in a global archive

2001-07-12  Bradford Hovinen  <hovinen@ximian.com>

	* archive.c (archive_get_current_location_id): Only try to store a
	full snapshot if we are in a global archive

	* bonobo-config-archiver.c (bonobo_config_archiver_new): Store
	real_name in archiver_db
	(bonobo_config_archiver_destroy): Use archiver_db->real_name with
	bonobo_url_register
This commit is contained in:
Bradford Hovinen 2001-07-12 19:15:36 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 24c947b83c
commit 10e8b799a7
4 changed files with 21 additions and 5 deletions

View file

@ -1,3 +1,13 @@
2001-07-12 Bradford Hovinen <hovinen@ximian.com>
* archive.c (archive_get_current_location_id): Only try to store a
full snapshot if we are in a global archive
* bonobo-config-archiver.c (bonobo_config_archiver_new): Store
real_name in archiver_db
(bonobo_config_archiver_destroy): Use archiver_db->real_name with
bonobo_url_register
2001-07-10 Bradford Hovinen <hovinen@ximian.com>
* default-user.xml: Add sound-properties

View file

@ -522,7 +522,9 @@ archive_get_current_location_id (Archive *archive)
(location_new (archive,
archive->current_location_id,
NULL));
if (location_store_full_snapshot (loc) < 0) {
if (!archive->is_global ||
location_store_full_snapshot (loc) < 0)
{
location_delete (loc);
return NULL;
}

View file

@ -482,12 +482,15 @@ static void
bonobo_config_archiver_destroy (GtkObject *object)
{
BonoboConfigArchiver *archiver_db = BONOBO_CONFIG_ARCHIVER (object);
CORBA_Environment ev;
CORBA_Environment ev;
CORBA_exception_init (&ev);
bonobo_url_unregister ("BONOBO_CONF:ARCHIVER", archiver_db->filename, &ev);
if (archiver_db->real_name != NULL) {
bonobo_url_unregister ("BONOBO_CONF:ARCHIVER", archiver_db->real_name, &ev);
g_free (archiver_db->real_name);
}
CORBA_exception_free (&ev);
if (archiver_db->doc)
@ -655,6 +658,7 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
archiver_db->backend_id = g_strdup (backend_id);
archiver_db->archive = archive;
archiver_db->real_name = real_name;
archiver_db->doc = location_load_rollback_data
(archiver_db->location, NULL, 0, archiver_db->backend_id, TRUE);
@ -693,7 +697,6 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
db = CORBA_Object_duplicate (BONOBO_OBJREF (archiver_db), NULL);
bonobo_url_register ("BONOBO_CONF:ARCHIVER", real_name, NULL, db, &ev);
g_free (real_name);
return db;
}

View file

@ -59,6 +59,7 @@ struct _BonoboConfigArchiver {
Archive *archive;
Location *location;
gchar *backend_id;
gchar *real_name;
BonoboEventSource *es;
};