#include <gtk/gtk.h>

int
main (int argc, char *argv[])
{
  GtkWidget *win;
  GtkListStore *main;
  GtkTreeModel *sorted;
  GtkTreeIter iter;
  GtkWidget *view;

  gtk_init (&argc, &argv);

  main = gtk_list_store_new (1, G_TYPE_STRING);
  sorted = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (main));

  view = gtk_icon_view_new_with_model (sorted);

  gtk_list_store_append (main, &iter);
  gtk_list_store_set (main, &iter, 0, "a", -1);
  gtk_list_store_append (main, &iter);
  gtk_list_store_set (main, &iter, 0, "b", -1);

  gtk_list_store_clear (main);

  win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add (GTK_CONTAINER (win), view);

  gtk_widget_show_all (win);
  gtk_main ();
  return 0;
}
