#include <gtk/gtk.h>

int
main (int argc, char *argv[])
{
  GtkListStore *store;
  GtkWidget *window, *combo;
  GtkCellRenderer *cell;

  gtk_init (&argc, &argv);

  store = gtk_list_store_new (1, G_TYPE_STRING);
  gtk_list_store_insert_with_values (store, NULL, 50, 0, "ZZZ", -1);
  gtk_list_store_insert_with_values (store, NULL, 50, 0, "YYY", -1);
  gtk_list_store_insert_with_values (store, NULL, 50, 0, "AAA", -1);
  gtk_list_store_insert_with_values (store, NULL, 50, 0, "BBB", -1);

  //gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), 0, GTK_SORT_ASCENDING);

  combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
  cell = gtk_cell_renderer_text_new ();
  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE);
  gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, "text", 0, NULL);
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add (GTK_CONTAINER (window), combo);
  gtk_widget_show_all (window);

  gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), 0, GTK_SORT_ASCENDING);
  gtk_main ();

  return 0;
}
