On Feb 28, 2008, at 2:47 AM, [EMAIL PROTECTED] wrote:
Date: Thu, 28 Feb 2008 10:25:43 +0100
From: Moritz Lennert <[EMAIL PROTECTED]>
Subject: Re: [GRASS-dev] 'g.gui wxpython' won't work in wingrass as
wxgui is a shell script
To: Martin Landa <[EMAIL PROTECTED]>
Cc: Glynn Clements <[EMAIL PROTECTED]>, GRASS devel
<[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 27/02/08 21:05, Martin Landa wrote:
Hi,
2008/2/21, Glynn Clements <[EMAIL PROTECTED]>:
Moritz Lennert wrote:
as wxgui is a shell script, g.gui wxpython (which does:
else if (strcmp(type->answer, "wxpython") == 0) {
sprintf (progname, "%s/etc/wxpython/scripts/wxgui",
G_gisbase());
if (rc_file->answer) {
G_spawn(progname, "wxgui", rc_file->answer, NULL);
)
will not work.
since gis.m and d.m are also shell scripts, g.gui tcltk|oldtcktk will
not work too(?)
I have never tried d.m, but for gis.m there is a gis.m.bat replacement
[1] which directly call the tcltk code.
There is one problem, when you run `g.gui wxpython`, the program is
waiting for thread termination. So you cannot use xterm when wxGUI is
running. I am not sure how to fix it since I am not so familiar with
G_spawn*.
I guess you will have to fork before you G_spawn ?
Moritz
[1]
http://trac.osgeo.org/grass/browser/grass/trunk/gui/tcltk/gis.m/
gis.m.bat
I thought the whole reason to have a C-based g.gui was to avoid the
use of *nix specific bash shell scripts for launching GUI's. That way
they would work on all systems without the hack of having to rewrite
*.sh as a *.bat. Why can't the C-code just do the job of the old
shell scripts and directly launch the GUI code in TclTk or wxPython.
The shell scripts are only a convenience anyway, as these could be
launched from the GRASS command line with a bit more complicated
command--e.g., python "$GISBASE/etc/wxpython/wxgui.py" &
The name of the initialization module for each GUI (e.g., wxguy.py in
wxPython) could be set to a variable in init.sh (or its successor) to
avoid hard coding it in C.
Michael
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev