Michael Barton wrote: > >> d.rast.edit ought to run from wxgrass, assuming that TclTk is installed. It > >> launches the wxPython properties dialog when called from the menu. However, > >> the wxPython properties dialog, then launches the TclTk properties dialog > >> instead of just running the command (note that running d.rast.edits with > >> arguments runs fine from the wxgrass built in CLI). > >> > >> The place where the command is getting rerouted to call the TclTk dialog > >> seems to be in line 636 of menuform.py > > > > It's being treated as a layer because it begins with "d.". > > > > The "d.*" hack is a bad idea; I suggest that you remove it. > > I'm not sure why the d.* clause is in this particular place--one reason to > query Daniel who has done most of the work making menuform work well. > > We need to split out d.* commands elsewhere because they must be processed > differently from other commands in order to show up in the display canvas, > but this would not apply to d.rast.edit. It is the only command that I know > of that would handle it's own display still.
d.* commands used as map layers belong in a separate menu. The menu items for layer commands should have different bindings to normal commands. Determining how to run a command based upon its name is simply wrong. > >> retcode = subprocess.call(cmd, shell=True) > > > > Why are you using a string instead of a list? > > I looked at cmd coming in and I think it is a list. In which case, the shell=True doesn't belong there. > It should be possible to port d.rast.edit (or its functionality) to > wxPython, since it is TclTk, at which time we'd just change the call in the > menu to aim at the new one. Nviz launches fine, as do the xterm commands. > d.rast.edit is the only one that doesn't launch quite right. It's not a > biggie, but if it is an easy fix, it would be nice. The fix for d.rast.edit is to remove the hack which treats d.* commands differently. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

