Trouble in a Gtk tree: a branch in my eyes?
- From: Herve Foucher <hfoucher club-internet fr>
- To: gtk-list redhat com
- Subject: Trouble in a Gtk tree: a branch in my eyes?
- Date: Mon, 10 May 1999 14:18:11 +0200
Hi everyone,
Here is my trouble: I am trying to store in a tree the content
of a directory "foo": I wrote a function that returns a GSList
of gchar* corresponding to each of the files in a directory:
for example:
H_getDir("/usr"); returns . -> .. -> local -> include -> etc...
The following code shows what I try to do:
| file_subtree = gtk_tree_new();
| fileNames = H_getdir( "/users" );
| while(fileNames)
| {
1| g_print("%s\n", (gchar*)fileNames->data);
2| file_subtree_item =
3| gtk_tree_item_new_with_label( (gchar*)fileNames->data );
4| gtk_tree_append(GTK_TREE(file_subtree), file_subtree_item);
5| fileNames = fileNames->next;
| }
This leads to the following result on screen:
------------
.
ÿ
(
------------
Removing lines 2,3 and 4 (no operation on a tree) leads to:
------------
.
..
lost+found
hfr
lbi
ins
gmn
ffr
------------
Could you please tell me what's wrong in my code ?
Thanks!
----------------------------------------------------------------------
HERVE FOUCHER, HELIO Herve.Foucher@helio.org http://www.helio.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]