[GRASS-dev] [GRASS GIS] #1778: Typing in g.region without parameters does not open a g.region window

GRASS GIS trac at osgeo.org
Mon Sep 9 20:47:30 PDT 2013


#1778: Typing in g.region without parameters does not open a g.region window
----------------------------------------+-----------------------------------
 Reporter:  pvanbosgeo                  |       Owner:  grass-dev@…              
     Type:  defect                      |      Status:  new                      
 Priority:  normal                      |   Milestone:  7.0.0                    
Component:  Default                     |     Version:  svn-trunk                
 Keywords:  g.region, r.colors, r.mask  |    Platform:  Linux                    
      Cpu:  x86-64                      |  
----------------------------------------+-----------------------------------

Comment(by glynn):

 Replying to [comment:23 wenzeslaus]:

 > So if we want ''start GUI if no parameters'' behavior, I think that the
 solution could be to provide a function in gparser library to show the
 GUI. Module itself can check its parameters and when no parameters are
 set, instead of [http://geoinformatics.fsv.cvut.cz/pdf/geoinformatics-fce-
 ctu-2007-02.pdf NOP] (e.g., `g.region`) or error (e.g., `r3.colors`), it
 can call the function to show GUI.

 No, the module shouldn't be calling a function to show a GUI. A correct
 solution for this case is to add a flag to the GModule structure which the
 module would set to indicate that it cannot run without parameters, even
 though none of its options have the ->required flag. The parser would then
 use this flag in determining whether to show a parameter dialog.

 This is similar to the existing mechanism (in 7.0) whereby a module can
 set the ->overwrite flag in the the GModule structure to indicate that the
 --overwrite switch should be included in the --help, --interface-
 description, etc output even though the module has no options with "new"
 in the ->gisprompt field.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1778#comment:24>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list