checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 10 Dec 1999 16:03:50 +0100
changeset 3112 94968bec00b0
parent 3111 669af85a5998
child 3113 b7c936dc24be
checkin from browser
ViewStyle.st
--- a/ViewStyle.st	Fri Dec 10 15:46:39 1999 +0100
+++ b/ViewStyle.st	Fri Dec 10 16:03:50 1999 +0100
@@ -55,7 +55,7 @@
 fromFile:aFileName
     "get the preferences definitions from a file"
 
-    |prefs failed nm dir path|
+    |prefs failed nm dir d path|
 
     prefs := self new.
     (aFileName endsWith:'.style') ifTrue:[
@@ -67,13 +67,20 @@
 
     "/ generic search first (allows for user to overwrite it)
     path := Smalltalk getResourceFileName:aFileName forPackage:'stx:libview'.
+    path := Smalltalk getResourceFileName:aFileName forPackage:'stx:libview'.
     path notNil ifTrue:[
         dir := path asFilename directory name
     ] ifFalse:[
         "/ then search in the classes package directory ...
         dir := Smalltalk projectDirectoryForPackage:'stx:libview'.
         dir notNil ifTrue:[
-            dir := dir , '/resources'
+            d := dir asFilename construct:'resources'.
+            (d exists and:[(d construct:aFileName) exists]) ifFalse:[
+                d := dir asFilename construct:'styles'.
+            ].
+            (d exists and:[(d construct:aFileName) exists]) ifTrue:[
+                dir := d pathName
+            ].
         ].
     ].
     failed := (prefs readFromFile:aFileName directory:dir) isNil.
@@ -81,11 +88,12 @@
     ^ prefs
 
     "
-     ViewStyle fromFile:'motif.style'
-     ViewStyle fromFile:'normal.style'
+     ViewStyle fromFile:'motif.style'  
+     ViewStyle fromFile:'normal.style' 
      ViewStyle fromFile:'iris.style'
     "
 
+    "Modified: / 10.12.1999 / 16:05:30 / cg"
 ! !
 
 !ViewStyle methodsFor:'accessing'!
@@ -245,5 +253,5 @@
 !ViewStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.25 1999-12-05 16:59:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ViewStyle.st,v 1.26 1999-12-10 15:03:50 cg Exp $'
 ! !