class: MIMETypes
authorClaus Gittinger <cg@exept.de>
Mon, 31 Mar 2014 11:19:26 +0200
changeset 3322 78576b7fa8c5
parent 3321 e749388a10b8
child 3323 a251378c32d8
class: MIMETypes changed: #initializeDefaultCommands
MIMETypes.st
--- a/MIMETypes.st	Fri Mar 28 14:24:00 2014 +0100
+++ b/MIMETypes.st	Mon Mar 31 11:19:26 2014 +0200
@@ -226,29 +226,24 @@
 
     OperatingSystem isMSWINDOWSlike ifFalse:[ |cmd|
         OperatingSystem isOSXlike ifTrue:[
-            listToTry := #( '/Applications/Safari.app/Contents/MacOS/Safari' )
+            unixCommands at:'text/html' put:('open -a Safari "%1"').       
+            unixCommands at:'application/pdf' put:('open -a Preview "%1"').       
         ] ifFalse:[
-            listToTry := #('firefox' 'chrome' 'chromium' 'konqueror' 'opera')
-        ].
-        cmd := listToTry
-                    detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ]
-                    ifNone:nil.
-
-        cmd notNil ifTrue:[
-            unixCommands at:'text/html' put:(cmd, ' "%1"')       
-        ].
+            listToTry := #('firefox' 'chrome' 'chromium' 'konqueror' 'opera').
+            cmd := listToTry
+                        detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ]
+                        ifNone:nil.
+            cmd notNil ifTrue:[
+                unixCommands at:'text/html' put:(cmd, ' "%1"')       
+            ].
 
-        OperatingSystem isOSXlike ifTrue:[
-            listToTry := #( '/Applications/Preview.app/Contents/MacOS/Preview' )
-        ] ifFalse:[
-            listToTry := #('acroread' 'okular' 'evince' 'kpdf' 'xpdf')
-        ].
-        cmd := listToTry
-                    detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ]
-                    ifNone:nil.
-
-        cmd notNil ifTrue:[
-            unixCommands at:'application/pdf' put:(cmd, ' "%1"')       
+            listToTry := #('acroread' 'okular' 'evince' 'kpdf' 'xpdf').
+            cmd := listToTry
+                        detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ]
+                        ifNone:nil.
+            cmd notNil ifTrue:[
+                unixCommands at:'application/pdf' put:(cmd, ' "%1"')       
+            ].
         ].
     ].
 
@@ -1501,11 +1496,11 @@
 !MIMETypes class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.132 2014-02-28 15:31:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.133 2014-03-31 09:19:26 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.132 2014-02-28 15:31:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.133 2014-03-31 09:19:26 cg Exp $'
 ! !