#UI_ENHANCEMENT by exept
authorClaus Gittinger <cg@exept.de>
Tue, 03 Sep 2019 09:46:46 +0200
changeset 19111 f5f9615fec07
parent 19110 64a09c9c02cb
child 19112 d5d3d629d387
#UI_ENHANCEMENT by exept class: OSProcessMonitor class definition changed: #numberOfHeadlines #updateStatus:
OSProcessMonitor.st
--- a/OSProcessMonitor.st	Tue Sep 03 09:44:51 2019 +0200
+++ b/OSProcessMonitor.st	Tue Sep 03 09:46:46 2019 +0200
@@ -16,7 +16,7 @@
 "{ NameSpace: Smalltalk }"
 
 SystemStatusMonitor subclass:#OSProcessMonitor
-	instanceVariableNames:'processes'
+	instanceVariableNames:'processes showTime'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Monitors-ST/X'
@@ -195,7 +195,9 @@
         ].
         processes notNil ifTrue:[
             list := OrderedCollection new:(processes size + numberOfHeadlines).
-            list add:'Time: ',(Time now printString).        
+            showTime == true ifTrue:[
+                list add:'Time: ',(Time now printString).
+            ].
             list add:self titleLine.
             list add:(String new:(self titleLine size+20) withAll:$-).
 
@@ -328,7 +330,7 @@
 !OSProcessMonitor methodsFor:'queries'!
 
 numberOfHeadlines
-    ^ 3
+    ^ 2 + (showTime == true ifTrue:1 ifFalse:0)
 
     "Modified: / 29-10-2018 / 15:24:14 / Claus Gittinger"
 ! !