Kaynağa Gözat

wxGUI/gconsole: rename write methods parameter

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58089 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 yıl önce
ebeveyn
işleme
d7ef562290

+ 8 - 8
gui/wxpython/core/gconsole.py

@@ -396,29 +396,29 @@ class GConsole(wx.EvtHandler):
         """!Generic method for writing log message in
         given style
 
-        @param line text line
+        @param text text line
         @param notification form of notification
         """
         self.writeLog.emit(text=text, wrap=wrap,
                           notification=notification)
 
-    def WriteCmdLog(self, line, pid=None, notification=Notification.MAKE_VISIBLE):
+    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
         """!Write message in selected style
 
-        @param line message to be printed
+        @param text message to be printed
         @param pid process pid or None
         @param notification form of notification
         """
-        self.writeCmdLog.emit(line=line, pid=pid,
+        self.writeCmdLog.emit(text=text, pid=pid,
                               notification=notification)
 
-    def WriteWarning(self, line):
+    def WriteWarning(self, text):
         """!Write message in warning style"""
-        self.writeWarning.emit(line=line)
+        self.writeWarning.emit(text=text)
 
-    def WriteError(self, line):
+    def WriteError(self, text):
         """!Write message in error style"""
-        self.writeError.emit(line=line)
+        self.writeError.emit(text=text)
 
     def RunCmd(self, command, compReg=True, skipInterface=False,
                onDone=None, onPrepare=None, userData=None, notification=Notification.MAKE_VISIBLE):

+ 10 - 10
gui/wxpython/core/giface.py

@@ -123,17 +123,17 @@ class GrassInterface:
         """
         raise NotImplementedError()
 
-    def WriteCmdLog(self, line, pid=None, notification=Notification.MAKE_VISIBLE):
+    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
         """!Writes message related to start or end of the command.
         """
         raise NotImplementedError()
 
-    def WriteWarning(self, line):
+    def WriteWarning(self, text):
         """!Writes warning message for the user.
         """
         raise NotImplementedError()
 
-    def WriteError(self, line):
+    def WriteError(self, text):
         """!Writes error message for the user."""
         raise NotImplementedError()
 
@@ -236,16 +236,16 @@ class StandaloneGrassInterface():
                  notification=Notification.HIGHLIGHT):
         self._write(grass.message, text)
 
-    def WriteCmdLog(self, line, pid=None, notification=Notification.MAKE_VISIBLE):
+    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
         if pid:
-            line = '(' + str(pid) + ') ' + line
-        self._write(grass.message, line)
+            text = '(' + str(pid) + ') ' + text
+        self._write(grass.message, text)
 
-    def WriteWarning(self, line):
-        self._write(grass.warning, line)
+    def WriteWarning(self, text):
+        self._write(grass.warning, text)
 
-    def WriteError(self, line):
-        self._write(grass.error, line)
+    def WriteError(self, text):
+        self._write(grass.error, text)
 
     def _write(self, function, text):
         orig = os.getenv("GRASS_MESSAGE_FORMAT")

+ 8 - 8
gui/wxpython/gui_core/goutput.py

@@ -334,24 +334,24 @@ class GConsoleWindow(wx.SplitterWindow):
 
         self.contentChanged.emit(notification=notification)
         
-    def WriteCmdLog(self, line, pid=None, notification=Notification.MAKE_VISIBLE):
+    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
         """!Write message in selected style
         
-        @param line message to be printed
+        @param text message to be printed
         @param pid process pid or None
         @param switchPage True to switch page
         """
         if pid:
-            line = '(' + str(pid) + ') ' + line
-        self.WriteLog(line, style = self.cmdOutput.StyleCommand, notification=notification)
+            text = '(' + str(pid) + ') ' + text
+        self.WriteLog(text, style=self.cmdOutput.StyleCommand, notification=notification)
 
-    def WriteWarning(self, line):
+    def WriteWarning(self, text):
         """!Write message in warning style"""
-        self.WriteLog(line, style = self.cmdOutput.StyleWarning, notification=Notification.MAKE_VISIBLE)
+        self.WriteLog(text, style=self.cmdOutput.StyleWarning, notification=Notification.MAKE_VISIBLE)
 
-    def WriteError(self, line):
+    def WriteError(self, text):
         """!Write message in error style"""
-        self.WriteLog(line, style = self.cmdOutput.StyleError, notification=Notification.MAKE_VISIBLE)
+        self.WriteLog(text, style=self.cmdOutput.StyleError, notification=Notification.MAKE_VISIBLE)
 
     def OnOutputClear(self, event):
         """!Clear content of output window"""

+ 6 - 6
gui/wxpython/lmgr/giface.py

@@ -153,14 +153,14 @@ class LayerManagerGrassInterface(object):
         self.lmgr._gconsole.WriteLog(text=text, wrap=wrap, 
                                      notification=notification)
 
-    def WriteCmdLog(self, line, pid=None, notification=Notification.MAKE_VISIBLE):
-        self.lmgr._gconsole.WriteCmdLog(line=line, pid=pid, notification=notification)
+    def WriteCmdLog(self, text, pid=None, notification=Notification.MAKE_VISIBLE):
+        self.lmgr._gconsole.WriteCmdLog(text=text, pid=pid, notification=notification)
 
-    def WriteWarning(self, line):
-        self.lmgr._gconsole.WriteWarning(line = line)
+    def WriteWarning(self, text):
+        self.lmgr._gconsole.WriteWarning(text=text)
 
-    def WriteError(self, line):
-        self.lmgr._gconsole.WriteError(line = line)
+    def WriteError(self, text):
+        self.lmgr._gconsole.WriteError(text=text)
 
     def GetLayerTree(self):
         return self.lmgr.GetLayerTree()