[RFC] ui_hint attribute for Options
Ian Clatworthy
ian.clatworthy at canonical.com
Tue Jan 26 10:06:38 GMT 2010
Explorer now has some generic code for building a form of widgets from a
list of Option instances. The core code handles booleans, strings and
registries. Al has submitted a patch to epxlorer so that certain options
can be tagged as "locations" so we can provide a nicer widget for those
fields, including a Browse button that selects a directory.
The $64M question is how to specify the metadata saying "this option is
a location". We could overload the type field, e.g. type="location" but
that doesn't feel optimal to me. I'd like to suggest we add an attribute
to Options called "ui_hint". We can then use that to tweak appearance of
widgets, e.g. use radio buttons instead of combo-boxes, allow file
selection, directory selection, etc.
Sound OK? Other ideas?
Ian C.
More information about the bazaar
mailing list