--- a/MIMETypes.st Fri Jan 24 21:48:20 2003 +0100
+++ b/MIMETypes.st Mon Jan 27 16:46:07 2003 +0100
@@ -18,7 +18,8 @@
instanceVariableNames:''
classVariableNames:'TypeToImageReaderClassMapping FileSuffixToTypeMapping
FilenameToTypeMapping FileSuffixToImageReaderClassMapping
- CharSetToFontMapping LastSuffix LastType'
+ CharSetToFontMapping LastSuffix LastType
+ DefaultCommandPerMIMEPerOS'
poolDictionaries:''
category:'System-Documentation'
!
@@ -294,6 +295,23 @@
"Modified: / 19.11.1999 / 15:01:53 / cg"
!
+initializeDefaultCommands
+ "TODO: move this to OS"
+
+ |unixCommands win32Commands|
+
+ DefaultCommandPerMIMEPerOS := Dictionary new.
+ DefaultCommandPerMIMEPerOS at:#unix put:(unixCommands := Dictionary new).
+ DefaultCommandPerMIMEPerOS at:#win32 put:(win32Commands := Dictionary new).
+
+ unixCommands at:'application/x-tar-compressed' put:'gunzip < %1 | tar tvf -'.
+ unixCommands at:'application/pdf' put:'acroread -display %2 %1'.
+
+ "
+ self initializeDefaultCommands
+ "
+!
+
miscFilenameList
"other formats (not by suffix, but by fileName isnstead) ..."
@@ -457,6 +475,18 @@
"
!
+defaultCommandPerMIME
+ "TODO: move this to OS"
+
+ DefaultCommandPerMIMEPerOS isNil ifTrue:[
+ self initializeDefaultCommands
+ ].
+ OperatingSystem isUNIXlike ifTrue:[
+ ^ DefaultCommandPerMIMEPerOS at:#unix
+ ].
+ ^ DefaultCommandPerMIMEPerOS at:#win32
+!
+
defineImageType:mimeType suffix:aSuffix reader:aReaderClass
"register an image reader."
@@ -750,7 +780,7 @@
!MIMETypes class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.47 2002-12-17 14:04:25 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MIMETypes.st,v 1.48 2003-01-27 15:46:07 cg Exp $'
! !
MIMETypes initialize!