*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 21 Aug 1997 17:00:19 +0200
changeset 1300 fd0f774f6090
parent 1299 d32b7c160ea2
child 1301 6c2fd40d502f
*** empty log message ***
ProcMonitor.st
ProcessMonitor.st
--- a/ProcMonitor.st	Thu Aug 21 15:41:19 1997 +0200
+++ b/ProcMonitor.st	Thu Aug 21 17:00:19 1997 +0200
@@ -88,6 +88,12 @@
 
 defaultLabel
     ^ 'Process Monitor'
+!
+
+nameLengthInList
+    ^ 30
+
+    "Created: 21.8.1997 / 15:42:05 / cg"
 ! !
 
 !ProcessMonitor methodsFor:'drawing'!
@@ -145,10 +151,11 @@
 
     |oldList list line dIndex interrupted contextCount 
      aProcess nm st n found running sel space oldSelection
-     newSelection numHeaderLines|
+     newSelection numHeaderLines nameLength|
 
     numHeaderLines := 2.
     space := Character space.
+    nameLength := self class nameLengthInList.
 
     shown ifTrue:[
         oldList := listView list.
@@ -196,13 +203,13 @@
                         ].
 
                         (nm := aProcess name) isNil ifFalse:[
-                            nm := nm printStringPaddedTo:28.
-                            nm size >= 29 ifTrue:[
-                                nm := (nm contractTo:28).
+                            nm := nm printStringPaddedTo:(nameLength-1).
+                            nm size >= nameLength ifTrue:[
+                                nm := (nm contractTo:(nameLength-1)).
                             ].
                             line nextPutAll:nm; nextPut:space.
                         ] ifTrue:[
-                            line next:29 put:space.
+                            line next:(nameLength) put:space.
                         ].
 "/                        n := cpuUsages at:(id) ifAbsent:[0].
 "/                        n ~~ 0 ifTrue:[
@@ -349,7 +356,7 @@
     ]
 
     "Modified: 3.7.1996 / 13:56:01 / stefan"
-    "Modified: 24.4.1997 / 21:16:25 / cg"
+    "Modified: 21.8.1997 / 15:43:44 / cg"
 ! !
 
 !ProcessMonitor methodsFor:'initialization'!
@@ -629,5 +636,5 @@
 !ProcessMonitor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.54 1997-08-21 13:41:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.55 1997-08-21 15:00:19 cg Exp $'
 ! !
--- a/ProcessMonitor.st	Thu Aug 21 15:41:19 1997 +0200
+++ b/ProcessMonitor.st	Thu Aug 21 17:00:19 1997 +0200
@@ -88,6 +88,12 @@
 
 defaultLabel
     ^ 'Process Monitor'
+!
+
+nameLengthInList
+    ^ 30
+
+    "Created: 21.8.1997 / 15:42:05 / cg"
 ! !
 
 !ProcessMonitor methodsFor:'drawing'!
@@ -145,10 +151,11 @@
 
     |oldList list line dIndex interrupted contextCount 
      aProcess nm st n found running sel space oldSelection
-     newSelection numHeaderLines|
+     newSelection numHeaderLines nameLength|
 
     numHeaderLines := 2.
     space := Character space.
+    nameLength := self class nameLengthInList.
 
     shown ifTrue:[
         oldList := listView list.
@@ -196,13 +203,13 @@
                         ].
 
                         (nm := aProcess name) isNil ifFalse:[
-                            nm := nm printStringPaddedTo:28.
-                            nm size >= 29 ifTrue:[
-                                nm := (nm contractTo:28).
+                            nm := nm printStringPaddedTo:(nameLength-1).
+                            nm size >= nameLength ifTrue:[
+                                nm := (nm contractTo:(nameLength-1)).
                             ].
                             line nextPutAll:nm; nextPut:space.
                         ] ifTrue:[
-                            line next:29 put:space.
+                            line next:(nameLength) put:space.
                         ].
 "/                        n := cpuUsages at:(id) ifAbsent:[0].
 "/                        n ~~ 0 ifTrue:[
@@ -349,7 +356,7 @@
     ]
 
     "Modified: 3.7.1996 / 13:56:01 / stefan"
-    "Modified: 24.4.1997 / 21:16:25 / cg"
+    "Modified: 21.8.1997 / 15:43:44 / cg"
 ! !
 
 !ProcessMonitor methodsFor:'initialization'!
@@ -629,5 +636,5 @@
 !ProcessMonitor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.54 1997-08-21 13:41:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.55 1997-08-21 15:00:19 cg Exp $'
 ! !