--- a/AbstractLauncherApplication.st Fri Dec 03 17:20:12 1999 +0100
+++ b/AbstractLauncherApplication.st Fri Dec 03 20:25:38 1999 +0100
@@ -3934,15 +3934,15 @@
showStandardStylesOnly := true asValue.
standardStyles := #(
- 'decWindows'
- 'iris'
- 'motif'
- 'mswindows95'
- 'next'
- 'normal'
- 'os2'
- 'st80'
- ).
+ 'decWindows'
+ 'iris'
+ 'motif'
+ 'mswindows95'
+ 'next'
+ 'normal'
+ 'os2'
+ 'st80'
+ ).
resources := requestor class classResources.
@@ -3950,57 +3950,60 @@
search resources directory for a list of .style files ...
"
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
+ someRsrcFile isNil ifTrue:[
+ someRsrcFile := Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'.
+ ].
someRsrcFile notNil ifTrue:[
- resourceDir := someRsrcFile asFilename directoryName
+ resourceDir := someRsrcFile asFilename directoryName
] ifFalse:[
- resourceDir := Smalltalk getSystemFileName:'resources'.
+ resourceDir := Smalltalk getSystemFileName:'resources'.
].
resourceDir isNil ifTrue:[
- self warn:(resources string:'no styles found (missing ''resources'' directory)').
- ^ self
+ self warn:(resources string:'no styles found (missing ''resources'' directory)').
+ ^ self
].
dir := resourceDir asFilename directoryContents.
list := SelectionInList new.
listUpdater := [
- |listOfStyles lastSelection|
-
- lastSelection := list selection.
- listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
- listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
- Filename isCaseSensitive ifFalse:[
- listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
- ].
- listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
- showStandardStylesOnly value ifTrue:[
- listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
- ].
-
- listOfStyles sort.
- list list:listOfStyles.
- list selection:lastSelection.
+ |listOfStyles lastSelection|
+
+ lastSelection := list selection.
+ listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
+ listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
+ Filename isCaseSensitive ifFalse:[
+ listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
+ ].
+ listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
+ showStandardStylesOnly value ifTrue:[
+ listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
+ ].
+
+ listOfStyles sort.
+ list list:listOfStyles.
+ list selection:lastSelection.
].
listUpdater value.
showStandardStylesOnly onChangeSend:#value to:listUpdater.
infoForwarder := [
- |nm sheet comment|
-
- comment := ''.
- nm := list selection.
- nm notNil ifTrue:[
- sheet := ViewStyle fromFile:(nm , '.style').
- comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
- ].
- comment := comment withCRs asStringCollection.
- comment size == 1 ifTrue:[
- comment := comment first
- ].
- infoLabel label:comment
- ].
+ |nm sheet comment|
+
+ comment := ''.
+ nm := list selection.
+ nm notNil ifTrue:[
+ sheet := ViewStyle fromFile:(nm , '.style').
+ comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
+ ].
+ comment := comment withCRs asStringCollection.
+ comment size == 1 ifTrue:[
+ comment := comment first
+ ].
+ infoLabel label:comment
+ ].
list onChangeSend:#value to:infoForwarder.
@@ -4023,7 +4026,7 @@
"/ b action:[didApply := true. requestor changeViewStyleTo:(list selection)].
(standardStyles includes:View defaultStyle) ifFalse:[
- showStandardStylesOnly value:false
+ showStandardStylesOnly value:false
].
list selection:(View defaultStyle).
@@ -4034,10 +4037,10 @@
box destroy.
box accepted ifTrue:[
- ((newStyle := list selection) ~= View defaultStyle
- or:[didApply ~~ true]) ifTrue:[
- requestor changeViewStyleTo:newStyle.
- ].
+ ((newStyle := list selection) ~= View defaultStyle
+ or:[didApply ~~ true]) ifTrue:[
+ requestor changeViewStyleTo:newStyle.
+ ].
].
"
@@ -4835,5 +4838,5 @@
!AbstractLauncherApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.87 1999-12-03 16:20:12 ps Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.88 1999-12-03 19:25:38 cg Exp $'
! !