Browse Source

pyedit: be specific about template/example in the replace dialog

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68404 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 9 years ago
parent
commit
725955b1e3
1 changed files with 5 additions and 3 deletions
  1. 5 3
      gui/wxpython/gui_core/pyedit.py

+ 5 - 3
gui/wxpython/gui_core/pyedit.py

@@ -405,20 +405,22 @@ class PyEditController(object):
             self.body.SetText(module_template())
             self.body.SetText(module_template())
 
 
     def SetScriptExample(self, event):
     def SetScriptExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(script_example())
             self.body.SetText(script_example())
 
 
     def SetModuleExample(self, event):
     def SetModuleExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(module_example())
             self.body.SetText(module_example())
 
 
     def SetModuleErrorHandlingExample(self, event):
     def SetModuleErrorHandlingExample(self, event):
-        if self.CanReplaceContent('template'):
+        if self.CanReplaceContent('example'):
             self.body.SetText(module_error_handling_example())
             self.body.SetText(module_error_handling_example())
 
 
     def CanReplaceContent(self, by_message):
     def CanReplaceContent(self, by_message):
         if by_message == 'template':
         if by_message == 'template':
             message = _("Replace the content by the template?")
             message = _("Replace the content by the template?")
+        elif by_message == 'example':
+            message = _("Replace the content by the example?")
         elif by_message == 'file':
         elif by_message == 'file':
             message = _("Replace the current content by the file content?")
             message = _("Replace the current content by the file content?")
         else:
         else: