link_info_done (NautilusDirectory *directory,
		NautilusFile *file,
		const char *uri,
		const char *name, 
		const char *icon,
		gboolean is_launcher,
		gboolean is_foreign)
{
	gboolean is_trusted;
	
	file->details->link_info_is_up_to_date = TRUE;

	is_trusted = is_link_trusted (file, is_launcher);

	if (is_trusted) {
		nautilus_file_set_display_name (file, name, name, TRUE);
	} else {
		nautilus_file_set_display_name (file, NULL, NULL, TRUE);
	}
	
	file->details->got_link_info = TRUE;
	g_free (file->details->custom_icon);
	file->details->custom_icon = NULL;
	if (uri) {
		if (file->details->activation_location) {
			g_object_unref (file->details->activation_location);
			file->details->activation_location = NULL;
		}
		file->details->got_custom_activation_location = TRUE;
		file->details->activation_location = g_file_new_for_uri (uri);
	}
	if (is_trusted) {
		file->details->custom_icon = g_strdup (icon);
	}
	file->details->is_launcher = is_launcher;
	file->details->is_foreign_link = is_foreign;
	file->details->is_trusted_link = is_trusted;
	
	nautilus_directory_async_state_changed (directory);
}
link_info_done (NautilusDirectory *directory,
		NautilusFile *file,
		const char *uri,
		const char *name, 
		const char *icon,
		gboolean is_launcher,
		gboolean is_foreign)
{
	gboolean is_trusted;
	
	file->details->link_info_is_up_to_date = TRUE;

	is_trusted = is_link_trusted (file, is_launcher);

	if (is_trusted) {
		nautilus_file_set_display_name (file, name, name, TRUE);
	} else {
		nautilus_file_set_display_name (file, NULL, NULL, TRUE);
	}
	
	file->details->got_link_info = TRUE;
	g_free (file->details->custom_icon);
	file->details->custom_icon = NULL;
	if (uri) {
		if (file->details->activation_location) {
			g_object_unref (file->details->activation_location);
			file->details->activation_location = NULL;
		}
		file->details->got_custom_activation_location = TRUE;
		file->details->activation_location = g_file_new_for_uri (uri);
	}
	if (is_trusted) {
		file->details->custom_icon = g_strdup (icon);
	}
	file->details->is_launcher = is_launcher;
	file->details->is_foreign_link = is_foreign;
	file->details->is_trusted_link = is_trusted;
	
	nautilus_directory_async_state_changed (directory);
}