1388 ! |
1388 ! |
1389 |
1389 |
1390 windowLabelFor:labelString |
1390 windowLabelFor:labelString |
1391 "return an expanded labelString, according to the hostName-in-window setting. |
1391 "return an expanded labelString, according to the hostName-in-window setting. |
1392 The labelString may include positional parameters: |
1392 The labelString may include positional parameters: |
1393 %1 - the actual label |
1393 %1 - the actual label |
1394 %2 - the hostname |
1394 %2 - the hostname |
1395 %3 - the userName |
1395 %3 - the userName |
1396 %4 - the processId |
1396 %4 - the processId |
1397 %5 - the TOP-directories name |
1397 %5 - the TOP-directories name |
1398 %6 - the TOP-directories path |
1398 %6 - the TOP-directories path |
1399 " |
1399 " |
1400 |
1400 |
1401 |wg proc id pidString lbl windowLabelFormat| |
1401 |wg proc id pidString lbl windowLabelFormat stxPackageDirectory topDirectory| |
1402 |
1402 |
1403 (IncludeHostNameInLabel == true |
1403 (IncludeHostNameInLabel == true |
1404 and:[(windowLabelFormat := self class windowLabelFormat) notNil]) ifTrue:[ |
1404 and:[(windowLabelFormat := self class windowLabelFormat) notNil]) ifTrue:[ |
1405 (wg := self windowGroup) notNil ifTrue:[ |
1405 (wg := self windowGroup) notNil ifTrue:[ |
1406 (proc := wg process) notNil ifTrue:[ |
1406 (proc := wg process) notNil ifTrue:[ |
1407 (id := proc id) notNil ifTrue:[ |
1407 (id := proc id) notNil ifTrue:[ |
1408 pidString := id printString |
1408 pidString := id printString |
1409 ] |
1409 ] |
1410 ] |
1410 ] |
1411 ]. |
1411 ]. |
1412 lbl := windowLabelFormat |
1412 stxPackageDirectory := Smalltalk getPackageDirectoryForPackage:'stx'. |
1413 bindWith:labelString |
1413 stxPackageDirectory isNil ifTrue:[ |
1414 with:[OperatingSystem getHostName] |
1414 'StdSysView [info]: cannot figure out stx package directory.' infoPrintCR. |
1415 with:[OperatingSystem getLoginName] |
1415 stxPackageDirectory := OperatingSystem pathOfSTXExecutable asFilename. |
1416 with:pidString |
1416 ]. |
1417 with:[(Smalltalk getPackageDirectoryForPackage:'stx') directory baseName] |
1417 stxPackageDirectory isNil ifTrue:[ |
1418 with:[(Smalltalk getPackageDirectoryForPackage:'stx') directory pathName]. |
1418 topDirectory := OperatingSystem getHomeDirectory asFilename. |
1419 ^ lbl |
1419 ] ifFalse:[ |
|
1420 topDirectory := stxPackageDirectory directory. |
|
1421 ]. |
|
1422 lbl := windowLabelFormat |
|
1423 bindWith:labelString |
|
1424 with:[OperatingSystem getHostName] |
|
1425 with:[OperatingSystem getLoginName] |
|
1426 with:pidString |
|
1427 with:[topDirectory baseName] |
|
1428 with:[topDirectory pathName]. |
|
1429 ^ lbl |
1420 ]. |
1430 ]. |
1421 ^ labelString |
1431 ^ labelString |
1422 |
1432 |
1423 "Created: / 22-09-1997 / 10:10:32 / cg" |
1433 "Created: / 22-09-1997 / 10:10:32 / cg" |
1424 "Modified: / 22-08-2006 / 11:42:53 / cg" |
1434 "Modified: / 22-08-2006 / 11:42:53 / cg" |
1697 ! ! |
1707 ! ! |
1698 |
1708 |
1699 !StandardSystemView class methodsFor:'documentation'! |
1709 !StandardSystemView class methodsFor:'documentation'! |
1700 |
1710 |
1701 version |
1711 version |
1702 ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.220 2014-05-23 08:27:42 stefan Exp $' |
1712 ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.221 2014-06-11 13:59:15 cg Exp $' |
1703 ! |
1713 ! |
1704 |
1714 |
1705 version_CVS |
1715 version_CVS |
1706 ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.220 2014-05-23 08:27:42 stefan Exp $' |
1716 ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.221 2014-06-11 13:59:15 cg Exp $' |
1707 ! ! |
1717 ! ! |
1708 |
1718 |
1709 |
1719 |
1710 StandardSystemView initialize! |
1720 StandardSystemView initialize! |