static void
nautilus_emblem_sidebar_populate (NautilusEmblemSidebar *emblem_sidebar)
{
	GList *icons, *l, *widgets;
	GtkWidget *emblem_widget;
	char *name;
	char *path;
	GdkPixbuf *erase_pixbuf;

	erase_pixbuf = NULL;

	path = nautilus_pixmap_file ("erase.png");
	if (path != NULL) {
		erase_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
	}
	g_free (path);

	if (erase_pixbuf != NULL) {
		emblem_widget = create_emblem_widget_with_pixbuf (emblem_sidebar,
							ERASE_EMBLEM_KEYWORD,
							_("Erase"),
							erase_pixbuf);
		gtk_container_add (GTK_CONTAINER
				(emblem_sidebar->details->emblems_table),
				emblem_widget);
	}


	icons = nautilus_emblem_list_available ();

	l = icons;
	widgets = NULL;
	while (l != NULL) {
		name = (char *)l->data;
		l = l->next;

		if (!nautilus_emblem_should_show_in_list (name)) {
			continue;
		}

		emblem_widget = create_emblem_widget (emblem_sidebar, name);
		
		widgets = g_list_prepend (widgets, emblem_widget);
	}
	eel_g_list_free_deep (icons);

	/* sort the emblems by display name */
	widgets = g_list_sort (widgets, emblem_widget_sort_func);

	l = widgets;
	while (l != NULL) {
		gtk_container_add
			(GTK_CONTAINER (emblem_sidebar->details->emblems_table),
			 l->data);
		l = l->next;
	}
	g_list_free (widgets);

	gtk_widget_show_all (emblem_sidebar->details->emblems_table);
}
static GdkPixbuf *
nautilus_get_thumbnail_frame (void)
{
	char *image_path;
	static GdkPixbuf *thumbnail_frame = NULL;

	if (thumbnail_frame == NULL) {
		image_path = nautilus_pixmap_file ("thumbnail_frame.png");
		if (image_path != NULL) {
			thumbnail_frame = gdk_pixbuf_new_from_file (image_path, NULL);
		}
		g_free (image_path);
	}
	
	return thumbnail_frame;
}
NautilusCustomizationData* 
nautilus_customization_data_new (const char *customization_name,
				 gboolean show_public_customizations,
				 int maximum_icon_height,
				 int maximum_icon_width)
{
	NautilusCustomizationData *data;
	char *public_directory_path, *private_directory_path;
	char *temp_str;
	gboolean public_result, private_result;

	data = g_new0 (NautilusCustomizationData, 1);

	public_result = TRUE;

	if (show_public_customizations) {
		public_directory_path = get_global_customization_path (customization_name);
		
		public_result  = read_all_children (public_directory_path,
						    G_FILE_ATTRIBUTE_STANDARD_NAME ","
						    G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
						    &data->public_file_list);
		g_free (public_directory_path);
	}

	private_directory_path = get_private_customization_path (customization_name);
	private_result = read_all_children (private_directory_path,
					    G_FILE_ATTRIBUTE_STANDARD_NAME ","
					    G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
					    &data->private_file_list);
	g_free (private_directory_path);
	if (!public_result && !private_result) {
		g_warning ("Couldn't read any of the emblem directories\n");
		g_free (data);
		return NULL;
	}
	if (private_result) {
		data->reading_mode = READ_PRIVATE_CUSTOMIZATIONS;
		data->current_file_list = data->private_file_list;
	}
	if (show_public_customizations && public_result) {
		data->reading_mode = READ_PUBLIC_CUSTOMIZATIONS;	
		data->current_file_list = data->public_file_list;
	}

	data->pattern_frame = NULL;

	/* load the frame if necessary */
	if (strcmp (customization_name, "patterns") == 0) {
		temp_str = nautilus_pixmap_file ("chit_frame.png");
		if (temp_str != NULL) {
			data->pattern_frame = gdk_pixbuf_new_from_file (temp_str, NULL);
		}
		g_free (temp_str);
	}

	data->private_data_was_displayed = FALSE;
	data->customization_name = g_strdup (customization_name);

	data->maximum_icon_height = maximum_icon_height;
	data->maximum_icon_width = maximum_icon_width;

	load_name_map_hash_table (data);
	
	return data;
}