Index: ChangeLog
===================================================================
--- ChangeLog	(revision 3412)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-01-04  Rob Bradford  <rob@o-hand.com>
+
+	* libanjuta/anjuta-preferences.c:
+	(anjuta_preferences_register_property_custom):
+	Unregister preferences for custom preferences when the widget is
+	destroyed.
+
 2008-01-03  Johannes Schmid <jhs@gnome.org>
 
 	* plugins/file-manager/file-model.c: (file_model_row_expanded),
Index: libanjuta/anjuta-preferences.c
===================================================================
--- libanjuta/anjuta-preferences.c	(revision 3412)
+++ libanjuta/anjuta-preferences.c	(working copy)
@@ -1273,6 +1273,13 @@
 	p->get_property = get_property;
 
 	g_hash_table_insert (pr->priv->properties, g_strdup (key), p);
+
+	/* Connect to widget destroy signal so we can automatically unregister
+	 * keys so there aren't any potential conflicts or references to 
+	 * nonexistent widgets on subsequent uses of the prefs dialog. */
+	g_signal_connect (G_OBJECT (p->object), "destroy",
+					  G_CALLBACK (unregister_preferences_key),
+					  p);
 	return TRUE;
 }
 
