[GRASS-SVN] r68404 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 7 19:56:35 PDT 2016


Author: wenzeslaus
Date: 2016-05-07 19:56:35 -0700 (Sat, 07 May 2016)
New Revision: 68404

Modified:
   grass/trunk/gui/wxpython/gui_core/pyedit.py
Log:
pyedit: be specific about template/example in the replace dialog

Modified: grass/trunk/gui/wxpython/gui_core/pyedit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/pyedit.py	2016-05-08 02:54:35 UTC (rev 68403)
+++ grass/trunk/gui/wxpython/gui_core/pyedit.py	2016-05-08 02:56:35 UTC (rev 68404)
@@ -405,20 +405,22 @@
             self.body.SetText(module_template())
 
     def SetScriptExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(script_example())
 
     def SetModuleExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(module_example())
 
     def SetModuleErrorHandlingExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(module_error_handling_example())
 
     def CanReplaceContent(self, by_message):
         if by_message == 'template':
             message = _("Replace the content by the template?")
+        elif by_message == 'example':
+            message = _("Replace the content by the example?")
         elif by_message == 'file':
             message = _("Replace the current content by the file content?")
         else:



More information about the grass-commit mailing list