FileBrowser.st
changeset 1111 5e7eb6e13e59
parent 1110 9ec4692e9cda
child 1112 6808d55dd8d8
--- a/FileBrowser.st	Wed Apr 02 23:25:24 1997 +0200
+++ b/FileBrowser.st	Fri Apr 04 10:51:56 1997 +0200
@@ -2289,14 +2289,26 @@
     "for some nonBinary files, if double clicked, we can do some useful
      action ..."
 
-    ((aFilename endsWith:'.htm') or:[aFilename endsWith:'.html']) ifTrue:[
-        HTMLDocumentView openOn:(currentDirectory pathName , '/' , aFilename).
+    |fullPath lcName|
+
+    fullPath := currentDirectory pathName , '/' , aFilename.
+    lcName := aFilename asLowercase.
+    ((lcName endsWith:'.htm') or:[lcName endsWith:'.html']) ifTrue:[
+        HTMLDocumentView openOn:fullPath.
         ^ true
     ].
+
+    OperatingSystem isUNIXlike ifTrue:[
+        (#('.man' '.1' '.2' '.3') findFirst:[:suff | aFilename endsWith:suff]) ~~ 0 
+        ifTrue:[
+             HTMLDocumentView openFullOnText:(HTMLDocGenerator manPageForFile:fullPath).
+            ^ true
+        ]
+    ].
     ^ self imageAction:aFilename
 
     "Created: 19.6.1996 / 09:36:38 / cg"
-    "Modified: 19.6.1996 / 09:44:32 / cg"
+    "Modified: 4.4.1997 / 10:49:00 / cg"
 !
 
 onlyOneSelection
@@ -2972,5 +2984,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.127 1997-04-02 21:25:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.128 1997-04-04 08:51:56 cg Exp $'
 ! !