224 |
224 |
225 unixCommands at:'application/x-tar-compressed' put:'tar tvf -'. |
225 unixCommands at:'application/x-tar-compressed' put:'tar tvf -'. |
226 |
226 |
227 OperatingSystem isMSWINDOWSlike ifFalse:[ |cmd| |
227 OperatingSystem isMSWINDOWSlike ifFalse:[ |cmd| |
228 OperatingSystem isOSXlike ifTrue:[ |
228 OperatingSystem isOSXlike ifTrue:[ |
229 listToTry := #( '/Applications/Safari.app/Contents/MacOS/Safari' ) |
229 unixCommands at:'text/html' put:('open -a Safari "%1"'). |
|
230 unixCommands at:'application/pdf' put:('open -a Preview "%1"'). |
230 ] ifFalse:[ |
231 ] ifFalse:[ |
231 listToTry := #('firefox' 'chrome' 'chromium' 'konqueror' 'opera') |
232 listToTry := #('firefox' 'chrome' 'chromium' 'konqueror' 'opera'). |
232 ]. |
233 cmd := listToTry |
233 cmd := listToTry |
234 detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ] |
234 detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ] |
235 ifNone:nil. |
235 ifNone:nil. |
236 cmd notNil ifTrue:[ |
236 |
237 unixCommands at:'text/html' put:(cmd, ' "%1"') |
237 cmd notNil ifTrue:[ |
238 ]. |
238 unixCommands at:'text/html' put:(cmd, ' "%1"') |
239 |
239 ]. |
240 listToTry := #('acroread' 'okular' 'evince' 'kpdf' 'xpdf'). |
240 |
241 cmd := listToTry |
241 OperatingSystem isOSXlike ifTrue:[ |
242 detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ] |
242 listToTry := #( '/Applications/Preview.app/Contents/MacOS/Preview' ) |
243 ifNone:nil. |
243 ] ifFalse:[ |
244 cmd notNil ifTrue:[ |
244 listToTry := #('acroread' 'okular' 'evince' 'kpdf' 'xpdf') |
245 unixCommands at:'application/pdf' put:(cmd, ' "%1"') |
245 ]. |
246 ]. |
246 cmd := listToTry |
|
247 detect:[:aCmd| (OperatingSystem pathOfCommand:aCmd) notEmptyOrNil ] |
|
248 ifNone:nil. |
|
249 |
|
250 cmd notNil ifTrue:[ |
|
251 unixCommands at:'application/pdf' put:(cmd, ' "%1"') |
|
252 ]. |
247 ]. |
253 ]. |
248 ]. |
254 |
249 |
255 |
250 |
256 DefaultPrintCommandPerMIMEPerOS := Dictionary new. |
251 DefaultPrintCommandPerMIMEPerOS := Dictionary new. |
1499 ! ! |
1494 ! ! |
1500 |
1495 |
1501 !MIMETypes class methodsFor:'documentation'! |
1496 !MIMETypes class methodsFor:'documentation'! |
1502 |
1497 |
1503 version |
1498 version |
1504 ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.132 2014-02-28 15:31:25 cg Exp $' |
1499 ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.133 2014-03-31 09:19:26 cg Exp $' |
1505 ! |
1500 ! |
1506 |
1501 |
1507 version_CVS |
1502 version_CVS |
1508 ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.132 2014-02-28 15:31:25 cg Exp $' |
1503 ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.133 2014-03-31 09:19:26 cg Exp $' |
1509 ! ! |
1504 ! ! |
1510 |
1505 |
1511 |
1506 |
1512 MIMETypes initialize! |
1507 MIMETypes initialize! |