static void
nautilus_desktop_directory_file_init (NautilusDesktopDirectoryFile *desktop_file)
{
	NautilusDesktopDirectory *desktop_directory;
	NautilusDirectory *real_dir;
	NautilusFile *real_dir_file;

	desktop_file->details = G_TYPE_INSTANCE_GET_PRIVATE (desktop_file,
							     NAUTILUS_TYPE_DESKTOP_DIRECTORY_FILE,
							     NautilusDesktopDirectoryFileDetails);

	desktop_directory = NAUTILUS_DESKTOP_DIRECTORY (nautilus_directory_get_by_uri (EEL_DESKTOP_URI));
	desktop_file->details->desktop_directory = desktop_directory;

	desktop_file->details->callbacks = g_hash_table_new
		(desktop_callback_hash, desktop_callback_equal);
	desktop_file->details->monitors = g_hash_table_new_full (NULL, NULL,
								 NULL, monitor_destroy);

	real_dir = nautilus_desktop_directory_get_real_directory (desktop_directory);
	real_dir_file = nautilus_directory_get_corresponding_file (real_dir);
	nautilus_directory_unref (real_dir);
	
	desktop_file->details->real_dir_file = real_dir_file;

	nautilus_desktop_update_metadata_from_keyfile (NAUTILUS_FILE (desktop_file), "directory");

	g_signal_connect_object (real_dir_file, "changed",
				 G_CALLBACK (real_file_changed_callback), desktop_file, 0);
}
static void
desktop_callback_check_done (DesktopCallback *desktop_callback)
{
	/* Check if we are ready. */
	if (desktop_callback->initializing ||
	    desktop_callback->non_ready_files != NULL) {
		return;
	}

	/* Ensure our metadata is updated before calling back */
	nautilus_desktop_update_metadata_from_keyfile (NAUTILUS_FILE (desktop_callback->desktop_file), "directory");

	/* Remove from the hash table before sending it. */
	g_hash_table_remove (desktop_callback->desktop_file->details->callbacks,
			     desktop_callback);

	/* We are ready, so do the real callback. */
	(* desktop_callback->callback) (NAUTILUS_FILE (desktop_callback->desktop_file),
					desktop_callback->callback_data);

	/* And we are done. */
	desktop_callback_destroy (desktop_callback);
}