Hi Santhosh,

> > for (list = history_list->history, i = 0; list ; list =
> > list->next, i++) {
> 
> >                 GtkTreeStore *store = GTK_TREE_STORE
> 
> > (gtk_tree_view_get_model(GTK_TREE_VIEW(tree)));
> 
> >                 gtk_tree_store_append(store, iter, NULL);
> 
> Here a top-level row is appended but no contents is set for this row.
> 
> >                 add_to_node(history_list, &iter, dialog_widgets->tree, i);

hummm ... yeah man. That's exactually the point. After yout post, can
run again my program and I saw that the fisrt node was really created,
and when I click it , the other elements (childs) appear !! ;)

Now , I did what you say (populate the thee in the same level), and
every thing is working fine, except when I click in a element showed
-> I get a SEGFAULT !!

Any suggestions ?!

> 
> This fn seems to add a child to the top-level row (that was just
> created with no content).
> 
> If the history_list->history contains 14 elements then the TreeView
> will have 14 top level rows with one child each.
> 
> If you have only a list of elements why do you go for TreeStore rather
> than ListStore. Why don't you use code something like the follg:
> 
> GtkTreeIter iter;
> for (list = history_list; list; list = list->next) {
>   gtk_list_store_append (store, &iter);
>   gtk_list_store_set (store, 0, (const char*)list->data, -1);
> }
> 

hummmm ... unfortunality, in the future, I will need a real tree structure ! :S

> Sorry, if my inference is wrong. I have never used a GtkTreeStore. I
> assume that since the toplevel rows doesn't have any content, "you see
> no output".

Best Regards (and thanks Santhosh) !


-- 
Antonio Gomes
E-mail: [EMAIL PROTECTED]
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnologia (Manaus/Br)
NOKIA's Technology Institute
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to