[gtkada] Columned lists
Marc A. Criley
marccriley at earthlink.net
Fri Dec 26 15:27:36 CET 2003
On Fri, 2003-12-26 at 03:43, Michael Gonzalez wrote:
> I am trying to convert a GtkAda application written with GtkAda1.x and
> glade to GtkAda 2.2.1.
Excellent timing, I'm in the process of doing the same thing myself :-)
> My old application has a lot of "columned list" widgets, which are now
> deprecated in the new gtk :-(
I only had one such list, but I'm actively working on it right now.
> In addition, when I try to generate a new "List or Tree View" in
> glade-2, I cannot find the way to add new columns or change the lables
> of the existing ones.
It does appear that glade-2 will only create the Tree View (or list
View) for you, there's no capability to then specify the contents of
that view--or define an associated model (Tree_Store, List_Store).
> What should I do to convert my application to the new gtk? Do I need
> to get rid of the old glade project and do all the changes directly by
> modifying the code?
Here's what I'm doing:
I did in fact rebuild my GUIs using glade-2, basing each off the
original glade GUIs. I used libglade-convert where possible, but several
I just rebuilt from scratch.
When it came to the one where I'm now using the TreeView (for a List) I
just built the whole GUI--the buttons and so on--and inserted the
TreeView widget where it needed to be.
In my application, after calling Gtk_New for the window and before
"showing" it, I have a procedure that takes the Tree_View member of the
record that glade-2 (i.e., gate) generated, which then sets up the
ListStore and adds in the Tree_View_Columns and everything else needed
by that Tree_View. So yes, I'm doing that all manually, just filling in
the parts that glade-2 doesn't yet provide.
By doing it this way, if glade's capabilities advance in this area, I
can just take advantage of those as they become available, and cut the
stuff out of my "Tree View Finishing" procedure.
> Are the new GtkTreeView objects not supported in glade-2, or am I
> missing something?
No, you're not missing anything, support for GtkTreeView in glade-2 does
seem pretty limited.
Marc A. Criley
More information about the gtkada