FileBrowser.st
changeset 1110 9ec4692e9cda
parent 1104 3de3f0cf3ba0
child 1111 5e7eb6e13e59
--- a/FileBrowser.st	Wed Apr 02 18:18:19 1997 +0200
+++ b/FileBrowser.st	Wed Apr 02 23:25:24 1997 +0200
@@ -440,7 +440,10 @@
 
     |fileName msg label|
 
-    (subView modified not or:[subView contentsWasSaved]) ifTrue:[^ self doFileGet:viaDoubleClick].
+    (subView modified not or:[subView contentsWasSaved]) ifTrue:[
+        self doFileGet:viaDoubleClick.
+        ^ self
+    ].
     fileName := self getSelectedFileName.
     fileName notNil ifTrue:[
         (currentDirectory isDirectory:fileName) ifTrue:[
@@ -456,7 +459,7 @@
     ]
 
     "Created: 19.6.1996 / 09:38:35 / cg"
-    "Modified: 19.6.1996 / 09:39:02 / cg"
+    "Modified: 2.4.1997 / 23:24:40 / cg"
 !
 
 fileGetInfo
@@ -2758,22 +2761,28 @@
      If encoding is nonNil, the file is assumed to be coded according to
      that symbol, and #decodeString: should be able to convert it."
 
-    |text line|
+    |text line enc|
 
     text := StringCollection new.
+
+    enc := encoding.
+    enc == #iso8859 ifTrue:[
+        enc := nil
+    ].
+
     aCharacter == Character cr ifTrue:[
         [aStream atEnd] whileFalse:[
             line := aStream nextLine withTabsExpanded.
-            encoding notNil ifTrue:[
-                line := line decodeFrom:encoding
+            enc notNil ifTrue:[
+                line := line decodeFrom:enc
             ].
             text add:line
         ].
     ] ifFalse:[
         [aStream atEnd] whileFalse:[
             line := (aStream upTo:aCharacter) withTabsExpanded.
-            encoding notNil ifTrue:[
-                line := line decodeFrom:encoding
+            enc notNil ifTrue:[
+                line := line decodeFrom:enc
             ].
             text add:line
         ].
@@ -2781,7 +2790,7 @@
     ^ text
 
     "Created: 22.2.1996 / 14:58:25 / cg"
-    "Modified: 22.2.1996 / 15:07:53 / cg"
+    "Modified: 2.4.1997 / 21:31:36 / cg"
 !
 
 showFile:fileName
@@ -2963,5 +2972,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.126 1997-03-28 16:10:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.127 1997-04-02 21:25:24 cg Exp $'
 ! !