Tuesday, September 02, 2008

Lists meet autoglade

The latest autoglade (available from svn repository) now supports lists as a special case of a GtkTreeView widget usng a ListStore model with a single column. Remember, as always, it's a zero programming solution.

As other widgets, lists can be initialized from the environment using autoglade annotation to its name, for example:

treeview1:auto:init:env

will use the environment variable treeview1 to obtain list header and items

export treeview1='("Fruits" "Apples" "Bananas" "Hedge aple" "Kiwifruits" "Melons" "Oranges" "Pineapples" "Strawberries" )'

Using one of the tests also present in the svn repository

$ ./list.sh


and, after selecting one item and pressing OK

treeview1='("Kiwifruits")'
autoargs='$treeview1'

appears in application's stdout.

More information about autoglade can be obtained from http://autoglade.sf.net.

3 comments:

Yoanne said...
This comment has been removed by the author.
Diego Torres Milano said...

Thanks for your comment.
As the first line of this post states, it's only available on development branch on subversion repository.
SF site has instructions on how to use subversion.
It will be available on a release soon.

Yoanne said...
This comment has been removed by the author.