[GRASS5] GUI code cleanup patch
glynn at gclements.plus.com
Mon Mar 13 01:18:09 EST 2006
Cedric Shock wrote:
> This patch cleans up the calling convention between lib/gis/parser.c and
> lib/gis/gui.tcl. It extends general/g.parser/main.c to cover all of the
> string attributes available via the c interface. It adds a new char *
> guisection attribute to options and flags in include/gis.h.
> In detail:
> Flag and module attributes are now passed from lib/gis/parser.c to
> lib/gis/gui.tcl as the flattened list form of a tcl array, just like the
> attributes for options.
That seems reasonable.
> I moved GUI logic regarding text to use for labels (label or description) from
> lib/gis/parser.c to lib/gis/gui.tcl. This will allow a gui to decide, for
> example, to display the description text as "tooltip" or balloon help when an
> option has a label.
That seems reasonable, except that I would suggest leaving the
label/desc entries untouched, and either moving the choice to the
point where the value is actually used, or creating a separate entry
in opts() and copying the label/desc entry to that instead.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev