nautilus_file_get_emblem_icons (NautilusFile *file,
				char **exclude)
{
	GList *keywords, *l;
	GList *icons;
	char *icon_names[2];
	char *keyword;
	int i;
	GIcon *icon;
	
	if (file == NULL) {
		return NULL;
	}
	
	g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);

	keywords = nautilus_file_get_keywords (file);
	keywords = prepend_automatic_keywords (file, keywords);

	icons = NULL;
	for (l = keywords; l != NULL; l = l->next) {
		keyword = l->data;
		
#ifdef TRASH_IS_FAST_ENOUGH
		if (strcmp (keyword, NAUTILUS_FILE_EMBLEM_NAME_TRASH) == 0) {
			char *uri;
			gboolean file_is_trash;
			/* Leave out the trash emblem for the trash itself, since
			 * putting a trash emblem on a trash icon is gilding the
			 * lily.
			 */
			uri = nautilus_file_get_uri (file);
			file_is_trash = strcmp (uri, EEL_TRASH_URI) == 0;
			g_free (uri);
			if (file_is_trash) {
				continue;
			}
		}
#endif
		if (exclude) {
			for (i = 0; exclude[i] != NULL; i++) {
				if (strcmp (exclude[i], keyword) == 0) {
					continue;
				}
			}
		}
		

		icon_names[0] = g_strconcat ("emblem-", keyword, NULL);
		icon_names[1] = keyword;
		icon = g_themed_icon_new_from_names (icon_names, 2);
		g_free (icon_names[0]);

		icons = g_list_prepend (icons, icon);
	}
	
	eel_g_list_free_deep (keywords);
	
	return icons;
}
nautilus_file_get_emblem_icons (NautilusFile *file,
				char **exclude)
{
	GList *keywords, *l;
	GList *icons;
	char *icon_names[2];
	char *keyword;
	int i;
	GIcon *icon;
	
	if (file == NULL) {
		return NULL;
	}
	
	g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);

	keywords = nautilus_file_get_keywords (file);
	keywords = prepend_automatic_keywords (file, keywords);

	icons = NULL;
	for (l = keywords; l != NULL; l = l->next) {
		keyword = l->data;
		
#ifdef TRASH_IS_FAST_ENOUGH
		if (strcmp (keyword, NAUTILUS_FILE_EMBLEM_NAME_TRASH) == 0) {
			char *uri;
			gboolean file_is_trash;
			 
			uri = nautilus_file_get_uri (file);
			file_is_trash = strcmp (uri, EEL_TRASH_URI) == 0;
			g_free (uri);
			if (file_is_trash) {
				continue;
			}
		}
#endif
		if (exclude) {
			for (i = 0; exclude[i] != NULL; i++) {
				if (strcmp (exclude[i], keyword) == 0) {
					continue;
				}
			}
		}
		

		icon_names[0] = g_strconcat ("emblem-", keyword, NULL);
		icon_names[1] = keyword;
		icon = g_themed_icon_new_from_names (icon_names, 2);
		g_free (icon_names[0]);

		icons = g_list_prepend (icons, icon);
	}
	
	eel_g_list_free_deep (keywords);
	
	return icons;
}