[GRASS-SVN] r30390 - grass/trunk/general/g.gui
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 28 12:05:11 EST 2008
Author: glynn
Date: 2008-02-28 12:05:11 -0500 (Thu, 28 Feb 2008)
New Revision: 30390
Modified:
grass/trunk/general/g.gui/main.c
Log:
Invoke Tcl/Tk scripts directly, rather than via shell scripts
Modified: grass/trunk/general/g.gui/main.c
===================================================================
--- grass/trunk/general/g.gui/main.c 2008-02-28 16:04:55 UTC (rev 30389)
+++ grass/trunk/general/g.gui/main.c 2008-02-28 17:05:11 UTC (rev 30390)
@@ -74,19 +74,21 @@
}
if (strcmp(type->answer, "oldtcltk") == 0) {
+ sprintf(progname, "%s/etc/dm/d.m.tcl", G_gisbase());
if (rc_file->answer) {
- G_spawn("d.m", "dmrc=%s", rc_file->answer, NULL);
+ G_spawn(getenv("GRASS_WISH"), "d.m", progname, "-name", "d_m_tcl", rc_file->answer, NULL);
}
else {
- G_system("d.m");
+ G_spawn(getenv("GRASS_WISH"), "d.m", progname, "-name", "d_m_tcl", NULL);
}
}
else if (strcmp(type->answer, "tcltk") == 0) {
+ sprintf(progname, "%s/etc/gm/gm.tcl", G_gisbase());
if (rc_file->answer) {
- G_spawn("gis.m", "dmrc=%s", rc_file->answer, NULL);
+ G_spawn(getenv("GRASS_WISH"), "gis.m", progname, "-name", "gm_tcl", rc_file->answer, NULL);
}
else {
- G_system("gis.m");
+ G_spawn(getenv("GRASS_WISH"), "gis.m", progname, "-name", "gm_tcl", NULL);
}
}
else if (strcmp(type->answer, "wxpython") == 0) {
More information about the grass-commit
mailing list