Continue flame about WEIRD gtk2 design.



Hello there again,
I've pointed out before that new tree/list model/view sructures has the same
disadvantages which was in gtk+1.2.x. To be accurate I need to notice that
some of disadvantages was fixed (e.g. ability to store pointer to the row) but
some of them pass through the versions to GTK+-2.x.
I try to confirm my words by examples:

1) There is no any gtk_tree_model_iter_prev() routine for fast access to previous iterator because gtk-team does not know about double linked lists and prefer to use single linked lists. Just image that your list have about 100'000 rows and you want to move last(selected) row up some times. GTK+2 only allow to programmer get TreePath (imbecile structure for our inconvenience) from iter then get previous TreePath then recalc iter from TreePath. For ListStore recalculation routine will path through whole list...

2) GtkTreeSelection is absolutely unusual structure (at least in <=2.0.6). Again image the list with 100'000 rows with MULTIPLE selection enabled. Simple task to determine "has your list any selection or not" can be solved only in one VERY NONOPTIMAL way. Look through whole list to determine has its rows IS_SELECTED flag or not... (GtkCList is slightly better in this case because it has normal list of selected rows).

3) GtkTreePath is UNUSUAL STRUCTURE FOR OUR INCONVENIENCE!!!
I absolutely does not understand WHY WE CANNOT USE ONLY GtkTreeIter
for all operations with model/store!!!

4) Why gtk-team always tries to hide normal structures inside *.c files?! Are they thinking
that another programmers prefer to use expressions like this:
((gtk_supername_of_structure_getting_some_sub_structure_from_another_sub_structure(a,b))->another_sub_routine(c,d))->blablabla
(of course I can expand this expression to tmp1=gtk_supername_of...;tmp2=tmp1->another_...)

What did we (normal programmers which know about the word "optimisation") need? We need NORMAL LIST/TREE/ANOTHER_COMPLEX_STRUCTURE STRUCTURES WITH FAST ACCESS VIA ITERATORS (valid iterators of course) TO ANY ROW.

Maxim.




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