Browse Source

fix https://trac.osgeo.org/grass/ticket/1059 (wxGUI: No menu option for r.mapcalc)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42183 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 years ago
parent
commit
30241fb37c
2 changed files with 23 additions and 7 deletions
  1. 17 5
      gui/wxpython/xml/menudata.xml
  2. 6 2
      raster/r.mapcalc/main.c

+ 17 - 5
gui/wxpython/xml/menudata.xml

@@ -1007,11 +1007,23 @@
 	  <handler>OnMenuCmd</handler>
 	  <command>r.mask</command>
 	</menuitem>
-	<menuitem>
-	  <label>Map calculator</label>
-	  <help>Map calculator for raster map algebra</help>
-	  <handler>DispMapCalculator</handler>
-	</menuitem>
+	<menu>
+	  <label>Map algebra</label>
+	  <items>
+	    <menuitem>
+	      <label>Interactive map calculator</label>
+	      <help>Map calculator for raster map algebra.</help>
+	      <handler>MapCalculator</handler>
+	    </menuitem>
+	    <menuitem>
+	      <label>Map calculator</label>
+	      <help>Raster map calculator.</help>
+	      <keywords>raster,algebra</keywords>
+	      <handler>OnMenuCmd</handler>
+	      <command>r.mapcalc</command>
+	    </menuitem>
+	  </items>
+	</menu>
 	<menu>
 	  <label>Neighborhood analysis</label>
 	  <items>

+ 6 - 2
raster/r.mapcalc/main.c

@@ -109,6 +109,7 @@ int main(int argc, char **argv)
 
     module = G_define_module();
     G_add_keyword(_("raster"));
+    G_add_keyword(_("algebra"));
     module->description = _("Raster map calculator.");
     module->overwrite = 1;
 
@@ -117,10 +118,13 @@ int main(int argc, char **argv)
     expr->type = TYPE_STRING;
     expr->required = NO;
     expr->description = _("Expression to evaluate");
-
+    expr->guisection = _("Expression");
+    
     file = G_define_standard_option(G_OPT_F_INPUT);
+    file->key = "file";
     file->required = NO;
-    file->description = _("File containing expression to evaluate");
+    file->description = _("File containing expression(s) to evaluate");
+    file->guisection = _("Expression");
 
     if (argc == 1)
     {