[GRASS-SVN] r64443 - grass/trunk/display/d.mon
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 3 12:59:16 PST 2015
Author: martinl
Date: 2015-02-03 12:59:16 -0800 (Tue, 03 Feb 2015)
New Revision: 64443
Modified:
grass/trunk/display/d.mon/start.c
Log:
d.mon: partly revert r64437, another attempt to fix launching wx-monitors
Modified: grass/trunk/display/d.mon/start.c
===================================================================
--- grass/trunk/display/d.mon/start.c 2015-02-03 20:52:19 UTC (rev 64442)
+++ grass/trunk/display/d.mon/start.c 2015-02-03 20:59:16 UTC (rev 64443)
@@ -75,7 +75,7 @@
/* start wxGUI display monitor */
char *start_wx(const char *name, const char *element, int width, int height, int x_only)
{
- char progname[GPATH_MAX];
+ char progname[GPATH_MAX], mon_path[GPATH_MAX];
char str_width[1024], str_height[1024], *str_x_only;
char *mapfile;
@@ -97,9 +97,10 @@
str_x_only = "1";
else
str_x_only = "0";
-
+
+ G_file_name(mon_path, element, NULL, G_mapset());
G_spawn_ex(getenv("GRASS_PYTHON"), progname, progname,
- name, element, str_width, str_height, str_x_only, SF_BACKGROUND, NULL);
+ name, mon_path, str_width, str_height, str_x_only, SF_BACKGROUND, NULL);
G_file_name(mapfile, element, "map.ppm", G_mapset());
@@ -190,13 +191,10 @@
close(fd);
/* start monitor */
- if (strncmp(name, "wx", 2) == 0) {
- G_file_name(file_path, mon_path, NULL, G_mapset());
- out_file = start_wx(name, file_path, width, height, x_only);
- }
- else {
+ if (strncmp(name, "wx", 2) == 0)
+ out_file = start_wx(name, mon_path, width, height, x_only);
+ else
out_file = start(name, output, update);
- }
/* create env file (environmental variables used for rendering) */
G_debug(1, "Monitor name=%s, envfile=%s", name, env_file);
More information about the grass-commit
mailing list