--- a/ViewStyle.st Wed Dec 01 21:34:06 1999 +0100
+++ b/ViewStyle.st Wed Dec 01 22:05:41 1999 +0100
@@ -55,7 +55,7 @@
fromFile:aFileName
"get the preferences definitions from a file"
- |prefs failed nm dir|
+ |prefs failed nm dir path|
prefs := self new.
(aFileName endsWith:'.style') ifTrue:[
@@ -66,8 +66,10 @@
prefs at:#name put:nm.
"/ generic search first (allows for user to overwrite it)
- dir := Smalltalk getResourceFileName:aFileName.
- dir isNil ifTrue:[
+ path := Smalltalk getResourceFileName:aFileName.
+ path notNil ifTrue:[
+ dir := path asFilename directory name
+ ] ifFalse:[
"/ then search in the classes package directory ...
dir := Smalltalk projectDirectoryForPackage:'stx:libview'.
dir notNil ifTrue:[
@@ -215,5 +217,5 @@
!ViewStyle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.22 1999-12-01 19:46:48 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.23 1999-12-01 21:05:41 cg Exp $'
! !