Browse Source

wxGUI/xml: mark generated file, fix indentation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55884 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 12 years ago
parent
commit
bb0cfcbef2
2 changed files with 4 additions and 3 deletions
  1. 2 1
      gui/wxpython/Makefile
  2. 2 2
      gui/wxpython/core/menutree.py

+ 2 - 1
gui/wxpython/Makefile

@@ -27,7 +27,8 @@ $(ETCDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS)
 	$(INSTALL_DATA) $< $@
 
 menustrings.py: core/menutree.py $(ETCDIR)/xml/menudata.xml $(ETCDIR)/xml/menudata_modeler.xml $(ETCDIR)/xml/menudata_psmap.xml
-	$(call run_grass,$(PYTHON) $< > $@)
+	@echo "# This is a generated file.\n" > $@
+	$(call run_grass,$(PYTHON) $< >> $@)
 	$(call run_grass,$(PYTHON) $< "modeler" >> $@)
 	$(call run_grass,$(PYTHON) $< "psmap" >> $@)
 

+ 2 - 2
gui/wxpython/core/menutree.py

@@ -166,10 +166,10 @@ def printTree(node, fh, indent=0):
 
 def printStrings(node, fh):
     if node.label:
-        fh.write('     _(%r),\n' % str(node.label))
+        fh.write('    _(%r),\n' % str(node.label))
     if node.data:
         if 'description' in node.data and node.data['description']:
-            fh.write('     _(%r),\n' % str(node.data['description']))
+            fh.write('    _(%r),\n' % str(node.data['description']))
     for child in node.children:
         printStrings(node=child, fh=fh)