Re: problems to make the datas appear in a TREE ...
- From: Santhosh <santhosh lists gmail com>
- To: Antonio Gomes <tonikitoo gmail com>
- Cc: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: problems to make the datas appear in a TREE ...
- Date: Tue, 19 Apr 2005 11:11:34 +0530
Hi,
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);
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);
}
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".
--
Santhosh.
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Project - http://eccvs.sf.net
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]