[GRASS-SVN] r37813 - in grass/branches/releasebranch_6_4:
gui/wxpython/support gui/wxpython/xml raster/r.support.stats
raster/r.terraflow raster/r.water.outlet
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 10 16:49:28 EDT 2009
Author: martinl
Date: 2009-06-10 16:49:28 -0400 (Wed, 10 Jun 2009)
New Revision: 37813
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py
grass/branches/releasebranch_6_4/gui/wxpython/xml/menudata.xml
grass/branches/releasebranch_6_4/raster/r.support.stats/main.c
grass/branches/releasebranch_6_4/raster/r.terraflow/main.cc
grass/branches/releasebranch_6_4/raster/r.water.outlet/main.c
Log:
Add missing keywords
Update menu (remove disabled modules)
(merge from devbr6, r37812)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py 2009-06-10 20:38:43 UTC (rev 37812)
+++ grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py 2009-06-10 20:49:28 UTC (rev 37813)
@@ -80,16 +80,24 @@
def updateData(data, modules):
"""!Update menu data tree"""
+ # list of modules to be ignored
+ ignore = [ 'v.type_wrapper.py',
+ 'vcolors' ]
+
+
for node in data.tree.getiterator():
if node.tag != 'menuitem':
continue
-
+
item = dict()
for child in node.getchildren():
item[child.tag] = child.text
if not item.has_key('command'):
continue
+
+ if item['command'] in ignore:
+ continue
module = item['command'].split(' ')[0]
if not modules.has_key(module):
@@ -101,11 +109,15 @@
else:
desc = modules[module]['desc']
node.find('help').text = desc
-
+
def writeData(data):
"""!Write updated menudata.xml"""
file = os.path.join('..', 'xml', 'menudata.xml')
- data.tree.write(file)
+ try:
+ data.tree.write(file)
+ except IOError:
+ print >> sys.stderr, "'menudata.xml' not found. Please run the script from 'gui/wxpython/support'."
+
def main(argv = None):
if argv is None:
@@ -132,7 +144,7 @@
print >> sys.stderr, "You must be in GRASS GIS to run this program."
sys.exit(1)
- sys.path.append('../gui_modules')
+ sys.path.append(os.path.join(os.getenv("GISBASE"), 'etc', 'wxpython', 'gui_modules'))
import menudata
import menuform
import globalvar
Modified: grass/branches/releasebranch_6_4/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/xml/menudata.xml 2009-06-10 20:38:43 UTC (rev 37812)
+++ grass/branches/releasebranch_6_4/gui/wxpython/xml/menudata.xml 2009-06-10 20:49:28 UTC (rev 37813)
@@ -528,7 +528,8 @@
<separator />
<menuitem>
<label>NVIZ (requires Tcl/Tk)</label>
- <help>nviz - Visualization and animation tool for GRASS data</help>
+ <help>nviz - Visualization and animation tool for GRASS data.</help>
+ <keywords>raster,vector,visualization</keywords>
<handler>self.OnMenuCmd</handler>
<command>nviz</command>
</menuitem>
@@ -730,6 +731,7 @@
<menuitem>
<label>Update map statistics</label>
<help>Update raster map statistics</help>
+ <keywords>raster,statistics</keywords>
<handler>self.OnMenuCmd</handler>
<command>r.support.stats</command>
</menuitem>
@@ -1009,6 +1011,7 @@
<menuitem>
<label>Flow accumulation</label>
<help>Flow computation for massive grids (Float version).</help>
+ <keywords>raster</keywords>
<handler>self.OnMenuCmd</handler>
<command>r.terraflow</command>
</menuitem>
@@ -1060,6 +1063,7 @@
<menuitem>
<label>Watershed basin creation</label>
<help>Watershed basin creation program.</help>
+ <keywords>raster</keywords>
<handler>self.OnMenuCmd</handler>
<command>r.water.outlet</command>
</menuitem>
Modified: grass/branches/releasebranch_6_4/raster/r.support.stats/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.support.stats/main.c 2009-06-10 20:38:43 UTC (rev 37812)
+++ grass/branches/releasebranch_6_4/raster/r.support.stats/main.c 2009-06-10 20:49:28 UTC (rev 37813)
@@ -36,6 +36,7 @@
module = G_define_module();
module->description = _("Update raster map statistics");
+ module->keywords = _("raster, statistics");
parm.raster = G_define_standard_option(G_OPT_R_MAP);
Modified: grass/branches/releasebranch_6_4/raster/r.terraflow/main.cc
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.terraflow/main.cc 2009-06-10 20:38:43 UTC (rev 37812)
+++ grass/branches/releasebranch_6_4/raster/r.terraflow/main.cc 2009-06-10 20:49:28 UTC (rev 37813)
@@ -471,6 +471,7 @@
#ifdef ELEV_FLOAT
module->description = _("Flow computation for massive grids (Float version).");
#endif
+ module->keywords = _("raster");
/* read user options; fill in global <opt> */
opt = (userOptions*)malloc(sizeof(userOptions));
Modified: grass/branches/releasebranch_6_4/raster/r.water.outlet/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.water.outlet/main.c 2009-06-10 20:38:43 UTC (rev 37812)
+++ grass/branches/releasebranch_6_4/raster/r.water.outlet/main.c 2009-06-10 20:49:28 UTC (rev 37813)
@@ -45,7 +45,8 @@
module = G_define_module();
module->description = _("Watershed basin creation program.");
-
+ module->keywords = _("raster");
+
opt1 = G_define_option();
opt1->key = "drainage";
opt1->type = TYPE_STRING;
@@ -127,7 +128,7 @@
for (row = 0; row < nrows; row++) {
G_get_map_row(drain_fd, cell_buf, row);
for (col = 0; col < ncols; col++) {
- if (cell_buf[col] == 0)
+ if (cell_buf[col] == 0)
total--;
drain_ptrs[SEG_INDEX(pt_seg, row, col)] = cell_buf[col];
}
More information about the grass-commit
mailing list