[GRASS-SVN] r56094 - grass/branches/develbranch_6/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 2 19:20:55 PDT 2013


Author: hamish
Date: 2013-05-02 19:20:55 -0700 (Thu, 02 May 2013)
New Revision: 56094

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
Log:
rename 'Protocol' to 'Log file' and make it append not overwrite (#1936)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py	2013-05-02 23:20:34 UTC (rev 56093)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py	2013-05-03 02:20:55 UTC (rev 56094)
@@ -265,10 +265,10 @@
         self.btnCmdAbort.SetToolTipString(_("Abort running command"))
         self.btnCmdAbort.Enable(False)
         self.btnCmdProtocol = wx.ToggleButton(parent = self.panelOutput, id = wx.ID_ANY,
-                                              label = _("&Protocol"),
+                                              label = _("&Log file"),
                                               size = self.btnCmdClear.GetSize())
-        self.btnCmdProtocol.SetToolTipString(_("Toggle to save list of executed commands into file; "
-                                               "content saved when switching off."))
+        self.btnCmdProtocol.SetToolTipString(_("Toggle to save list of executed commands into "
+                                               "a file; content saved when switching off."))
         
         if self.parent.GetName() != 'LayerManager':
             self.btnCmdClear.Hide()
@@ -673,7 +673,7 @@
                 GError(_("Unable to write file '%(path)s'.\n\nDetails: %(error)s") % {'path': path, 'error': e})
             finally:
                 output.close()
-            self.parent.SetStatusText(_("Commands output saved into '%s'") % path)
+            self.parent.SetStatusText(_("Command output saved into '%s'") % path)
         
         dlg.Destroy()
 
@@ -772,12 +772,12 @@
         self.progressbar.SetValue(event.value)
 
     def CmdProtocolSave(self):
-        """Save commands protocol into the file"""
+        """Save list of manually entered commands into a text log file"""
         if not hasattr(self, 'cmdFileProtocol'):
             return # it should not happen
         
         try:
-            output = open(self.cmdFileProtocol, "w")
+            output = open(self.cmdFileProtocol, "a")
             cmds = self.cmdPrompt.GetCommands()
             output.write('\n'.join(cmds))
             if len(cmds) > 0:
@@ -788,7 +788,7 @@
         finally:
             output.close()
             
-        self.parent.SetStatusText(_("Commands protocol saved into '%s'") % self.cmdFileProtocol)
+        self.parent.SetStatusText(_("Command log saved to '%s'") % self.cmdFileProtocol)
         del self.cmdFileProtocol
         
     def OnCmdProtocol(self, event = None):
@@ -802,10 +802,10 @@
             self.cmdPrompt.ClearCommands()
             # ask for the file
             dlg = wx.FileDialog(self, message = _("Save file as..."),
-                                defaultFile = "grass_cmd_protocol.txt",
+                                defaultFile = "grass_cmd_log.txt",
                                 wildcard = _("%(txt)s (*.txt)|*.txt|%(files)s (*)|*") % 
                                             {'txt': _("Text files"), 'files': _("Files")},
-                                style = wx.SAVE | wx.FD_OVERWRITE_PROMPT)
+                                style = wx.SAVE)
             if dlg.ShowModal() == wx.ID_OK:
                 self.cmdFileProtocol = dlg.GetPath()
             else:



More information about the grass-commit mailing list