Experimental async folder tree view model seems to be working



Hi there fellow hackers,

I've finished all the in-implementations bugfixes for getting asynchrone
filling up the tree view with folders working.

Chris, this is the thingy you where interested in, right?

There were indeed a pretty huge amount of bugs and incompleteness that
now make me feel like a biggest coding idiot of all times that just got
that little bit smarter because he found the by-himself-created defects.

You might think, why the fuck does he still code if he gets depressed
each time he makes a bug? Good question. I don't know.

The greatest philosopher of all times told us that he might be wise only
in so far as he knows that he knows nothing. Not that it has anything to
do with this.

I'm talking algebra, I know.

The point is that TnyGtkAccountTreeModel, on an experimental basis, now
has a flag in its constructor that, if TRUE, will let it function in an
asynchrone way.

There's still two or three warnings coming from the sortable gtk tree
model about stamps not being correct. The reason is probably because I
used stack variables for GtkTreeIter too often. Of course will an async
invocation pass the pointer to another thread, that passes it to yet
another thread and etc. The result is that if the thread where the stack
variable was pushed on the stack finished the stack-frame, that that
variable got popped and that therefore the pointer passed to another
thread is shredded. Poor other thread that will still use it.

I know, I know .. ugly shit. I'm ... fixing it. Nevertheless are most of
them already cleared (converted to heap pointers) and surprisingly it's
working. Yeah. *stunned*

Note that the async stuff might leak a few GtkTreeIter heap instances
(they're small). And note that this isn't the intention. The idea is
indeed to clear them up. I just need to read some GtkTreeView code and
samples to understand the beasts GtkTreeIter management and to know how
to feed the animal heap iters that should be freed afterwards.

There's indeed a gtk_tree_iter_free and a gtk_tree_iter_copy. Yep, yeap,
I already know that. I've been experimenting with moving iters to heap
indeed ;)

But feel free to "/msg pvanhoof Dude! THATS NOT HOW TO DO IT YOU FUCK!!
You do it this way <insert the correct way>"


-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




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