[GRASS-SVN] r30777 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 28 05:32:01 EDT 2008


Author: martinl
Date: 2008-03-28 05:32:01 -0400 (Fri, 28 Mar 2008)
New Revision: 30777

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: cosmetics in goutput (WriteCmdLog)


Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-03-28 09:13:36 UTC (rev 30776)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-03-28 09:32:01 UTC (rev 30777)
@@ -44,7 +44,8 @@
         self.Map             = None
         self.parent          = parent # GMFrame
         self.cmdThreads      = {}     # cmdThread : cmdPID
-
+        self.lineWidth       = 80
+        
         # progress bar
         self.console_progressbar = wx.Gauge(parent=self, id=wx.ID_ANY,
                                             range=100, pos=(110, 50), size=(-1, 25),
@@ -103,6 +104,10 @@
         p1 = self.cmd_output.GetCurrentPos()
         if pid:
             line = '(' + str(pid) + ') ' + line
+        # fill space
+        if len(line) < self.lineWidth:
+            diff = 80 - len(line) 
+            line += diff * ' '
         self.cmd_output.AddText(line + '%s' % os.linesep)
         self.cmd_output.EnsureCaretVisible()
         p2 = self.cmd_output.GetCurrentPos()



More information about the grass-commit mailing list