[GRASS-dev] Re: g.gui

Martin Landa landa.martin at gmail.com
Tue Feb 12 11:07:06 EST 2008


Hi,

2008/2/12, Hamish <hamish_b at yahoo.com>:
> Martin Landa wrote:
> >   4. write g.gui module (draft)
> >
> > g.gui now in trunk (not compiled by default)
> I made a few changes; e.g. added a flag to skip resetting the default.
> It's a good start.

Thanks for enhancements...

> I am not sure of what the logic is supposed to be if the current
> GRASS_GUI setting was "text" or unset? Why bother with that at all?
> The type= answer has to be one of the GUIs.
> Note that strcmp() returns 0 if the strings are the same.

The initial idea was to set type->answer to "tcltk" when GRASS_GUI is
unset or is "text".

> Also that calls G_store() before G_parser(), and G_store() calls
> G_malloc() which can call G_fatal_error(), which must not be called
> before G_parser() has been called.

Can you explain in detail why G_fatal_error() cannot be called before
G_parser()?

> is type= the best word to use as the option name?
>   gui=? start=? (like d.mon)   launch=?  ???= ?

'type' refers to GUI type meaning, it is not the best. I would be
happy to change it to something better then 'type'.

> Can the wxgui startup take a saved project file as a command line
> option like d.m and gis.m? (dmrc=)

yes, it is possible

> If so, once the command-line is built, use G_spawn() instead of
> G_system()?
> Even though d.m and gis.m fork themselves off, 'g.gui --ui' sticks in
> "Run" mode until it finishes. (I don't know if that's harmless or not,
> and if fork() would change that)

implemented in SVN now, thanks for pointing it out

> > > >    5. copy wxgui script to $GISBASE/etc/wxpython (not to
> > > > $GISBASE/scripts)
> >
> > I think we can do this step too (before 6.3.0/1), just to test now
> > g.gui module.
>
> Thinking again about what to name that- as it is a grass program
> shouldn't we try for some "g.module" style name?  {m|d|g}.wxgui?

g.wxgui would be maybe better then wxgui. Anyway I would prefer not to
copy this script to $(ETC)/scripts in the future, and to launch wxGUI
only via g.gui module.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-dev mailing list