Eliminate unref mechanism; it is not needed

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

	* bonobo-config-archiver.c (bonobo_config_archiver_new):
	Eliminate unref mechanism; it is not needed
This commit is contained in:
Bradford Hovinen 2001-07-31 16:49:26 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 0f5d8ca6dd
commit 478de4ee41
2 changed files with 2 additions and 25 deletions

View file

@ -3,6 +3,8 @@
* bonobo-config-archiver.c (pb_get_fn): Use
location_get_config_log rather than config_log_open; don't destroy
the log
(bonobo_config_archiver_new): Eliminate unref mechanism; it is not
needed
2001-07-30 Bradford Hovinen <hovinen@ximian.com>

View file

@ -631,15 +631,6 @@ fill_cache (BonoboConfigArchiver *archiver_db)
}
}
/* TEMPORARY */
static void
unref_cb (GtkObject *db, GtkObject *ref_obj)
{
DEBUG_MSG ("Enter");
gtk_object_unref (ref_obj);
}
Bonobo_ConfigDatabase
bonobo_config_archiver_new (const char *backend_id, const char *location_id)
{
@ -649,7 +640,6 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
gchar *real_name;
static Archive *archive = NULL;
static GtkObject *ref_obj = NULL;
g_return_val_if_fail (backend_id != NULL, NULL);
@ -748,20 +738,5 @@ bonobo_config_archiver_new (const char *backend_id, const char *location_id)
bonobo_url_register ("BONOBO_CONF:ARCHIVER", real_name, NULL, db, &ev);
if (ref_obj == NULL) {
ref_obj = gtk_object_new (gtk_object_get_type (), NULL);
gtk_signal_connect (ref_obj, "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
gtk_signal_connect_object (ref_obj, "destroy",
GTK_SIGNAL_FUNC (gtk_object_destroy),
GTK_OBJECT (archive));
} else {
gtk_object_ref (ref_obj);
}
DEBUG_MSG ("_ref complete");
gtk_signal_connect (GTK_OBJECT (archiver_db), "destroy",
GTK_SIGNAL_FUNC (unref_cb), ref_obj);
return db;
}