How to remove all the columns of a GtkListStore in one shot ?


I create 8 columns in a GtkListStore this way:
liststore = gtk_list_store_new (8, G_TYPE_STRING , G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING); gtk_tree_view_set_model (GTK_TREE_VIEW (treeview1), GTK_TREE_MODEL (liststore) ); char *names[] = {("Original Size"),("Method"),("Compressed Size"),("Ratio"),("Date"),("Time"),("CRC-32"),("Filename")};
        for (x = 0; x <= 7; x++)
                renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ( names[x],renderer,"text",x,NULL);
                gtk_tree_view_append_column (GTK_TREE_VIEW (treeview1), column);

Next I need to remove and to create others of different type and numbers, instead of using another for loop to remove a column at a time, is there a way to remove ALL of them is one shot as gtk_list_store_clear() for the rows ?

Thank you,

Cpsed, a Linux OpenGL 3D scene editor

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]