[GRASS-dev] [GRASS GIS] #1978: module GUIs: "or enter values interactively" should be opt-in
GRASS GIS
trac at osgeo.org
Sat Jun 8 02:17:19 PDT 2013
#1978: module GUIs: "or enter values interactively" should be opt-in
--------------------+-------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: wxGUI | Version: svn-trunk
Keywords: parser | Platform: All
Cpu: All |
--------------------+-------------------------------------------------------
Comment(by hamish):
If term 2 (element) is "file", trunk's libgis checks to see if the file
already exists & insists on --overwrite. So for file input= and output=
term 2 should probably stay as "file". This also means that the GUI
should use term 2 (element) to decide if there should be a file [Browse]
button present, instead of term 3 (prompt/description) as it does now.
term 1 remains "old", "new"; the value of "any" doesn't seem to be used
any more in g6.4+ or g7.
so that leaves the switch for deciding on a text input box to be based on
the third term (prompt/description). (as far as
gui/wxpython/gui_core/forms.py is concerned)
so e.g. for r.in.mat we have this info from --interface-description
<gisprompt age="old" element="mat" prompt="file" />
`element` would go back to "file", and term 3, `prompt` (aka description),
would change from "file" to "text" (or "bin" or generic "file").
And the "or enter text interactively" box would be made to only show up if
`prompt` was "text".
In GRASS 6 with GRASS_UI_TERM set, the `prompt` term 3 is used in the
"Enter the name of" line, as is term 1's "new". e.g. for r.in.bin it is
{input}:
{{{
OPTION: Binary raster file to be imported
key: input
required: YES
Enter the name of an existing {input} file
Hit RETURN to cancel request
>
}}}
so having that be "text" or "binary" would still read well (although still
locked to English).
thoughts?
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1978#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list