GtkTreeModel patch ...



Hello ,i have written a small patch to get the rows from 
the GtkTreeModel:
----
gint gtk_tree_model_get_n_rows (GtkTreeModel *model) {
gint rows=0;
GtkTreeIter iter;
if (gtk_tree_model_get_flags
(GTK_TREE_MODEL(model))!=GTK_TREE_MODEL_LIST_ONLY)
return -1;
 gtk_tree_model_get_iter_root    (GTK_TREE_MODEL(model),  &iter);
 do {
 rows++;
 }while ( gtk_tree_model_iter_next(GTK_TREE_MODEL(model),&iter) );
return rows;
}
----
So i want to get the rows from a GtkTreeModel (i wanna use it as
gtkclist ..)
But if i test with gtk_tree_model_get_flags if it was a list .. 
i didn`t get what i expected there did i misunderstood gtk_tree_model
flags ???

Thanks

-- 
Andreas Scherf
ICQ: 52910964
scherfa web de




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