--- a/Launcher.st Tue Jun 06 06:21:18 1995 +0200
+++ b/Launcher.st Tue Jun 27 04:30:28 1995 +0200
@@ -37,7 +37,7 @@
version
"
-$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.16 1995-06-06 04:20:52 claus Exp $
+$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.17 1995-06-27 02:29:51 claus Exp $
"
!
@@ -45,6 +45,10 @@
"
a new launcher, combining old Launchers menu and transcript into
one view. (you no longer have to move two views around all the time ...).
+
+ Also, this app makes first use of the new compatibility framework;
+ you will notice, that this is a subclass of ApplicationModel.
+ New applications will no longer be built as subclasses of standardSystemView.
"
!
@@ -173,7 +177,7 @@
this will be moved into StandardSystemView and be done
automatically soon ...
"
- Display serverVendor = 'Silicon Graphics' ifTrue:[
+ Screen current serverVendor = 'Silicon Graphics' ifTrue:[
icn := self class aboutIcon.
icn notNil ifTrue:[
icn := icn magnifiedTo:86@68.
@@ -249,7 +253,7 @@
'-'
'snapshot'
'snapshot & exit'
- 'exit'
+ 'exit smalltalk'
))
selectors:#(
#startFileBrowser
@@ -291,7 +295,7 @@
putLabels:(resources array:#(
'new project'
'-'
- 'select project'
+ 'select project ...'
))
selectors:#(
#newProject
@@ -406,7 +410,7 @@
topView model:self.
myMenu := PullDownMenu in:topView.
- myMenu origin:0.0@0.0 corner:[1.0@nil].
+ myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height).
self setupMenu.
self setupButtonPanelIn:topView.
@@ -722,15 +726,15 @@
!NewLauncher methodsFor:'actions - classes'!
startFileBrowser
- FileBrowser open
+ self withWaitCursorDo:[FileBrowser open]
!
startChangesBrowser
- ChangesBrowser open
+ self withWaitCursorDo:[ChangesBrowser open]
!
startSystemBrowser
- SystemBrowser open
+ self withWaitCursorDo:[SystemBrowser open]
!
startWorkspace
@@ -757,7 +761,7 @@
enterBox action:[:selectorName |
|cls|
- SystemBrowser browseImplementorsOf:selectorName
+ self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName]
].
enterBox showAtPointer
!
@@ -770,20 +774,20 @@
enterBox action:[:selectorName |
|cls|
- SystemBrowser browseAllCallsOn:selectorName
+ self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName]
].
enterBox showAtPointer
!
startClassTreeView
- ClassTreeGraphView open
+ self withWaitCursorDo:[ClassTreeGraphView open]
! !
!NewLauncher methodsFor:'actions - settings'!
viewStyleSetting
|listOfStyles resourceDir dir box
- list listView infoLabel infoForwarder newStyle|
+ list listView infoLabel infoForwarder newStyle cont|
"
search resources directory for a list of .style files ...
@@ -855,10 +859,11 @@
box accepted ifTrue:[
newStyle := list selection.
newStyle notNil ifTrue:[
- transcript topView withCursor:Cursor wait do:[
+ self withWaitCursorDo:[
Transcript showCr:'change style to ' , newStyle , ' ...'.
View defaultStyle:newStyle asSymbol.
- ]
+ ].
+ self reopenLauncher.
]
]
!
@@ -883,12 +888,13 @@
box list:listOfLanguages.
box initialText:(Language).
box action:[:newLanguage |
- transcript topView withCursor:Cursor wait do:[
+ self withWaitCursorDo:[
Transcript showCr:'change language to ' , newLanguage , ' ...'.
Smalltalk at:#Language put:newLanguage asSymbol.
Smalltalk changed:#Language.
ResourcePack flushCachedResourcePacks
- ]
+ ].
+ self reopenLauncher.
].
box showAtPointer
!
@@ -927,24 +933,24 @@
allowUnderscore onChangeSend:#check to:enabler.
box := DialogBox new.
- box label:'Compiler settings'.
- box extent:200@300.
+ box label:(resources string:'Compiler settings').
+"/ box extent:200@300.
- box addCheckBox:'allow underscore in identifiers' on:allowUnderscore.
+ box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
box addVerticalSpace.
- box addCheckBox:'literal arrays are immutable' on:immutableArrays.
+ box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
"/ box addVerticalSpace.
box addHorizontalLine.
"/ box addVerticalSpace.
- box addCheckBox:'warnings' on:warnings.
+ box addCheckBox:(resources string:'warnings') on:warnings.
box addVerticalSpace.
box leftIndent:30.
- warnSTXBox := box addCheckBox:'ST/X language extensions' on:warnSTX.
+ warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX.
box addVerticalSpace.
- warnUnderscoreBox := box addCheckBox:'underscores in identifiers' on:warnUnderscore.
+ warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
box addVerticalSpace.
- warnOldStyleBox := box addCheckBox:'oldStyle assignment' on:warnOldStyle.
+ warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
box addVerticalSpace.
box leftIndent:0.
@@ -972,17 +978,17 @@
updChanges := Class updatingChanges asValue.
box := DialogBox new.
- box label:'Other settings'.
- box extent:200@300.
+ box label:(resources string:'Other settings').
+"/ box extent:200@300.
- box addCheckBox:'log compiles in changes file' on:updChanges.
- box addCheckBox:'log doIts in changes file' on:logDoits.
+ box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
+ box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.
box addHorizontalLine.
- box addCheckBox:'lazy compilation when autoloading' on:compileLazy.
+ box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
box addHorizontalLine.
- box addCheckBox:'shadows under popup views ' on:shadows.
+ box addCheckBox:(resources string:'shadows under popup views') on:shadows.
box addAbortButton; addOkButton.
box showAtPointer.
@@ -1040,8 +1046,6 @@
!
startDocumentationTool
- |box|
-
"
although that one is not yet finished,
its better than nothing ...
@@ -1051,42 +1055,10 @@
^ self
].
- box := YesNoBox title:'Sorry, the ST/X HTML reader is not yet released
-and therefore not included in this package.
-
-Shall I try to open some other reader ?
-'.
- (box confirm) ifTrue:[
- "look for a reader"
-
- |s whereIsDoc|
-
- s := Smalltalk systemFileStreamFor:'doc/online/english/TOP.html'.
- s isNil ifTrue:[
- self warn:'no documentation files available'.
- ^ self.
- ].
- whereIsDoc := s pathName asFilename directoryName.
- s close.
-
- #('Mosaic' 'mosaic' 'netscape' 'chimera')
- do:[:reader |
- |cmd|
-
-
- cmd := reader , ' ' , whereIsDoc , '/TOP.html &'.
- (OperatingSystem executeCommand:cmd) ifTrue:[
- ^ self
- ]
- ].
- self warn:'Sorry, no HTML reader seems to be available.
-
-you should get one of Mosaic, netscape, chimera ...
-... or wait till HTML support in ST/X is complete.
-
-Alternatively, use the FileBrowser on *.doc-files
-found in the documentation/online directory.'.
- ]
+ self warn:'Sorry, the ST/X HTML reader is not (yet)
+included in this architectures release.
+Please use Mosaic, netscape, chimera or any
+other HTML viewer to see the documentation.'.
! !
!NewLauncher methodsFor:'actions - tools'!
@@ -1170,7 +1142,7 @@
Processor addTimedBlock:[
|v|
- v := Display viewFromUser.
+ v := Screen current viewFromUser.
v notNil ifTrue:[
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy'
]
@@ -1291,7 +1263,7 @@
project := list detect:[:p | p name = selection] ifNone:[nil].
project isNil ifTrue:[
- Transcript showCr:'no such project'
+ Transcript showCr:'no such project.'
] ifFalse:[
project showViews.
Project current:project
@@ -1303,6 +1275,17 @@
!NewLauncher methodsFor:'private'!
+reopenLauncher
+ "for now (since style & language settings currently do
+ not affect living views ...)"
+
+ |contents|
+
+ contents := Transcript endEntry; contents.
+ self class open.
+ Transcript contents:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor
+!
+
saveAllViews
"tell each topview that we are going to terminate and give it chance
to save its contents."
@@ -1314,7 +1297,7 @@
|v|
(Delay forSeconds:1) wait.
- v := Display viewFromUser.
+ v := Screen current viewFromUser.
v isNil ifTrue:[
self warn:'sorry, this is not a smalltalk view'.
^ nil