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

Follow-up on GtkTree



Hello,

A brief synopsis of my previous post: my GtkTree was fully expanded at creation
time, and was causing bizarre graphical glitches and redraw/reflow problems.

Following up on my previous post, I found a workaround to the bug. By using a
gtk_container_foreach and expanding, and then collapsing every single subtree,
I was able to have the tree display properly. Briefly, then, in pseudocode:

void build_tree( void )
{
    clear_tree( );

    /* Add the groups to the tree. */
    for( i = 0; i < num_groups; ++i ) {
	get_name( );
	create_tree_item( );
	/* Recursively add more children. */
	add_subgroups_to_item( );
    }

    sort_children( );

    /* Post process list, collapsing tree. */
    expand_tree( );
    collapse_tree( );
}

This still points out a bug in the behaviour though. I guess I'll submit it to
the Gtk bug database unless someone indicates I was doing something wrong.

m.

--
"How wonderful! How mysterious                                   Programmer
 I carry wood! I draw water!"                   Loki Entertainment Software
 - Anonymous Tao poet



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