rendered paste body enum {
FS_COLUMN_MARKUP = 0,
FS_COLUMN_REALNAME,
FS_COLUMN_SENSITIVE,
};
static void
setup_filesystem_menu(FormatDialog* dialog)
{
GtkTreeStore* model;
model = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
GtkComboBox* combo = dialog->fs_combo;
GtkCellRenderer* text_renderer;
/* Set up the column */
gtk_cell_layout_pack_start( GTK_CELL_LAYOUT(combo), (text_renderer = gtk_cell_renderer_text_new()), TRUE );
gtk_cell_layout_add_attribute( GTK_CELL_LAYOUT(combo), text_renderer, "markup", FS_COLUMN_MARKUP );
gtk_cell_layout_add_attribute( GTK_CELL_LAYOUT(combo), text_renderer, "sensitive", FS_COLUMN_SENSITIVE );
gtk_combo_box_set_model(combo, GTK_TREE_MODEL(model));
/* Add the default items */
gtk_tree_store_insert_with_values(model, NULL, NULL, 100 /*Always at end*/,
FS_COLUMN_REALNAME, "friendly_vfat",
FS_COLUMN_MARKUP, _("For all computers"),
FS_COLUMN_SENSITIVE, TRUE, -1);
gtk_tree_store_insert_with_values(model, NULL, NULL, 100 /*Always at end*/,
FS_COLUMN_REALNAME, "friendly_ext2",
FS_COLUMN_MARKUP, _("For Linux computers"),
FS_COLUMN_SENSITIVE, TRUE, -1);
gtk_tree_store_insert_with_values(model, NULL, NULL, 100 /*Always at end*/,
FS_COLUMN_REALNAME, "friendly_hfsplus",
FS_COLUMN_MARKUP, _("For Apple computers"),
FS_COLUMN_SENSITIVE, TRUE, -1);
GtkTreeIter parent = {0, NULL};
gtk_tree_store_insert_with_values(model, &parent, NULL, 100 /*Always at end*/,
FS_COLUMN_REALNAME, "specific_fs",
FS_COLUMN_MARKUP, _("Specific Filesystem"),
FS_COLUMN_SENSITIVE, TRUE, -1);
/* Populate the specific fs list */
struct _setup_fs_duple s;
s.model = model; s.parent = &parent;
g_hash_table_foreach(dialog->fs_map, setup_fs_cb, &s);
}