StandardSystemView.st
changeset 3539 d1f51be1c8b4
parent 3463 cdfc1db6bccf
child 3706 c2b41c6ea4ef
--- a/StandardSystemView.st	Fri Nov 09 12:30:32 2001 +0100
+++ b/StandardSystemView.st	Fri Nov 09 14:06:48 2001 +0100
@@ -1254,11 +1254,31 @@
 !
 
 windowLabelFor:labelString
-    "return an expanded labelString, according to the hostName-in-window setting"
+    "return an expanded labelString, according to the hostName-in-window setting.
+     The labelString may include positional parameters:
+        %1 - the actual label
+        %2 - the hostname
+        %3 - the userName
+        %4 - the processId
+    "
+
+    |pid wg proc id pidString|
 
     (IncludeHostNameInLabel == true
     and:[WindowLabelFormat notNil]) ifTrue:[
-	^ WindowLabelFormat bindWith:labelString with:(OperatingSystem getHostName)
+        (wg := self windowGroup) notNil ifTrue:[
+            (proc := wg process) notNil ifTrue:[
+                (id := proc id) notNil ifTrue:[
+                    pidString := id printString
+                ]
+            ]
+        ].
+
+        ^ WindowLabelFormat 
+                bindWith:labelString 
+                with:(OperatingSystem getHostName)
+                with:(OperatingSystem getLoginName)
+                with:pidString
     ].
     ^ labelString
 
@@ -1504,6 +1524,6 @@
 !StandardSystemView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.140 2001-08-15 14:46:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.141 2001-11-09 13:06:48 cg Exp $'
 ! !
 StandardSystemView initialize!