5 May 2000 tony   » (Journeyer)

Added a (broken, so far) tree object. The current gtk+ tree implementation is a bit too obtuse for use in gnome-filer, so I've taken the liberty of wrapping the object up a bit tighter than usual. The new tree is managed using tree paths. So, to add a new item, you simply state the path to the location you wish the item to reside, like this:

	data_set (tree, "path", "/Tree/Subtree/Item");
	data_set_watchpoint (tree, "/Tree/Subtree/Item",
			     callback_func, data);

At this point, when the item selection is changed, the callback_func is called. (There should be a similar function for a double-click, too, but I haven't even started that.)

A couple of notes: when an item is inserted, subtrees are created if they do not exist. So you can add an entire group of nested subtrees at a blow. Also, I'm not sure whether I should track the changes to an item label. That is, should I change the path to "/Tree/Subtree/NewLabel" when the label is changed? I could do that automagically, I suppose.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!