[GRASS-dev] Additional switch(es) for <g.mapsets>?
Markus Metz
markus.metz.giswork at gmail.com
Mon Feb 18 11:08:42 PST 2013
On Mon, Feb 18, 2013 at 6:51 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
> On 18 February 2013 15:34, Martin Landa <landa.martin at gmail.com> wrote:
>> Hi,
>>
>> 2013/2/18 Anna Kratochvílová <kratochanna at gmail.com>:
>>> I think there is no reason for that. Also, this g.mapsets -s is not
>>> really consistent with the new g.gui.modules. What about
>>> g.gui.mapsets? Or if we want to keep the flag -s, the code should be
>>> at least on one place.
>>
>> this `-s` flag is a historical artefact from G6 - `g.mapsets -s`
>> originally launch TCL/TK dialog (if GUI is TCL/TK). Having `g.gui.*`
>> modules, `g.gui.mapsets` makes probably more sense (drawback: one more
>> module introduced, backward compatibility broken - 's' flag removed)
>> than `g.mapsets -s`. In any case, code should be on one place, of
>> course.
>>
>
> Hi,
>
> we can ignore backward compatibility issue if we decide that mixing
> modules with and without gui is simply wrong (I vote for non-mixing
> but we can do some wider discussion on that topic, of course).
>
> I'm afraid that we are not able to keep the number of g.gui.* modules small.
>
> For me the drawback is that as a user I have to thing about two
> different mapset modules. Generally speaking, there is no rule to
> determine which functionality is provided by the g.mapset(s) module
> and which by g.gui.mapset(s) module.
>
Adding some confusion:
There is gui/wxpython/modules which holds gui interfaces to modules,
but not modules itself. Other customized interfaces are in
gui/wxpython/gui_core. These have no additional functionality, the
reason for their existence is mainly that the automatically generated
gui is less powerful than the cli. The g.gui.* modules are apparently
distributed in several subfolders of gui/wxpython/.
Since the -s flag does not add new functionality to g.mapsets, I would
strongly opt to remove the -s flag. If you want to use the customized
gui interface for
r.in.gdal/v.in.ogr/r.colors/v.clean/i.group/g.mapsets etc, use the gui
menu. Otherwise, you can use the command line. The g.gui.* naming
should IMHO be reserved exclusively for modules that require a GUI
like e.g. g.gui.mapswipe.
Alternatively, gui/wxpython/gui_core/forms.py could be modified to use
a customized interface if it exists for a given module, defined as
handler in gui/wxpython/gui_core/xml/menudata.xml which in turn is
parsed by gui/wxpython/core/menudata.py, the handler itself is defined
in gui/wxpython/lmgr/frame.py. Can the handlers be moved to forms.py?
Markus M
More information about the grass-dev
mailing list