Kristian Rietveld wrote:

> If just saving the column widths of the tree view when the tree view is
> destroyed is not enough, the easiest way to do this is probably to
> connect to the "notify::width" signal on each column.  Remember to keep
> the callback fast (do not write to files, etc) as your callback will be
> called a lot, especially when the user is resizing columns with the
> mouse.

The problem with your first suggestion is that I have to hook every
situation in which the tree view can be destroyed.  The obvious one is when
I change data sets.  Exiting the program is another.  There will be others
when I implement more of the program.  It certainly is possible to record
the column widths at each of these points, but it sure is clumsy.

The problem with the second suggestion is that writing a file is exactly
what I need to do.  The point of this exercise is to record in a file the
width of each column as established by the user with the mouse so that the
columns will have the same width the next time the program runs.

A signal seems the ideal solution and it's the one I used previously (in
wxWidgets), but any other suggestions are welcome.  In the meantime, I'll
work on capturing the column widths at every point where the tree view can
be destroyed.
-- 
Jeffrey Barish

_______________________________________________
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