- From: "David Z. Maze" <dmaze donut mit edu>
- To: gtk-list redhat com
- Subject: Tree problems
- Date: 19 Mar 1998 23:28:43 -0500
I've written a gtk app that, given a list of usernames, checks which
of them are logged in. The usernames can be sorted into categories,
and each category can optionally belong to a single parent category.
To display this, I use a GtkTree widget. My main window is a vbox
with a menubar, the tree, and a "Update" button. Pressing the button
forces a check on which users are logged in. If they have logged in
since the last update, their name is added to the tree. If they have
logged out, their name is deleted.
Problems I've run into (on 0.99.3 up to 0.99.7):
-- The "+" and "-" pixmaps don't display correctly when the user
expands/collapses tree branches. It looks like the new pixmaps are
displayed with their centers at the upper-left corner of the
original pixmaps. In 0.99.7, the old pixmap is visible underneath;
in older versions, it was erased first.
-- Adding and removing elements from the tree fails to cause the right
thing to be drawn. A tree branch might look like this:
+-B ==> Add "D" ==> +-B
L-C L-C <== (should have "T" piece, not corner)
+-B ==> Remove "C" ==> +-B <== (should have corner piece, not "T")
/ \ "The cat's been in the box for over
| David Maze | 20 years. Nobody's feeding it. The
| email@example.com | cat is dead."
| http://donut.mit.edu/dmaze/ | -- Grant, on Schroedinger's Cat
] [Thread Prev