Revision: 5394
http://skim-app.svn.sourceforge.net/skim-app/?rev=5394&view=rev
Author: hofman
Date: 2009-06-04 16:26:53 +0000 (Thu, 04 Jun 2009)
Log Message:
-----------
Ditch all UTIs for document types, only use old-style document type names.
Mixing types with and without UTI leads to even more serious problems, in
particular the app refuses to open PDF bundles.
Modified Paths:
--------------
trunk/Info.plist
trunk/SKDocumentController.m
Modified: trunk/Info.plist
===================================================================
--- trunk/Info.plist 2009-06-04 14:46:53 UTC (rev 5393)
+++ trunk/Info.plist 2009-06-04 16:26:53 UTC (rev 5394)
@@ -28,10 +28,6 @@
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>com.adobe.pdf</string>
- </array>
<key>LSTypeIsPackage</key>
<false/>
<key>NSDocumentClass</key>
@@ -48,18 +44,6 @@
<string>Notes as RTFD</string>
<string>Notes as FDF</string>
</array>
- <key>NSExportableTypes</key>
- <array>
- <string>com.adobe.pdf</string>
- <string>net.sourceforge.skim-app.pdfd</string>
- <string>PDF With Embedded Notes</string>
- <string>PDF Without Notes</string>
-
<string>net.sourceforge.skim-app.skimnotes</string>
- <string>Notes as Text</string>
- <string>Notes as RTF</string>
- <string>Notes as RTFD</string>
- <string>Notes as FDF</string>
- </array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
@@ -78,10 +62,6 @@
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>net.sourceforge.skim-app.pdfd</string>
- </array>
<key>LSTypeIsPackage</key>
<true/>
<key>NSDocumentClass</key>
@@ -98,18 +78,6 @@
<string>Notes as RTFD</string>
<string>Notes as FDF</string>
</array>
- <key>NSExportableTypes</key>
- <array>
- <string>com.adobe.pdf</string>
- <string>net.sourceforge.skim-app.pdfd</string>
- <string>PDF With Embedded Notes</string>
- <string>PDF Without Notes</string>
-
<string>net.sourceforge.skim-app.skimnotes</string>
- <string>Notes as Text</string>
- <string>Notes as RTF</string>
- <string>Notes as RTFD</string>
- <string>Notes as FDF</string>
- </array>
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
@@ -130,10 +98,6 @@
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
- <key>LSItemContentTypes</key>
- <array>
-
<string>net.sourceforge.skim-app.skimnotes</string>
- </array>
<key>LSTypeIsPackage</key>
<false/>
<key>NSDocumentClass</key>
@@ -143,11 +107,6 @@
<string>Notes as RTF</string>
<string>Notes as Text</string>
</array>
- <key>NSExportableTypes</key>
- <array>
- <string>Notes as RTF</string>
- <string>Notes as Text</string>
- </array>
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
@@ -172,10 +131,6 @@
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>com.adobe.postscript</string>
- </array>
<key>LSTypeIsPackage</key>
<false/>
<key>NSDocumentClass</key>
@@ -194,20 +149,6 @@
<string>Notes as RTFD</string>
<string>Notes as FDF</string>
</array>
- <key>NSExportableTypes</key>
- <array>
- <string>com.adobe.postscript</string>
- <string>PostScript Without Notes</string>
- <string>com.adobe.pdf</string>
- <string>net.sourceforge.skim-app.pdfd</string>
- <string>PDF With Embedded Notes</string>
- <string>PDF Without Notes</string>
-
<string>net.sourceforge.skim-app.skimnotes</string>
- <string>Notes as Text</string>
- <string>Notes as RTF</string>
- <string>Notes as RTFD</string>
- <string>Notes as FDF</string>
- </array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
@@ -248,20 +189,6 @@
<string>Notes as RTFD</string>
<string>Notes as FDF</string>
</array>
- <key>NSExportableTypes</key>
- <array>
- <string>net.sourceforge.skim-app.dvi</string>
- <string>DVI Without Notes</string>
- <string>com.adobe.pdf</string>
- <string>net.sourceforge.skim-app.pdfd</string>
- <string>PDF With Embedded Notes</string>
- <string>PDF Without Notes</string>
-
<string>net.sourceforge.skim-app.skimnotes</string>
- <string>Notes as Text</string>
- <string>Notes as RTF</string>
- <string>Notes as RTFD</string>
- <string>Notes as FDF</string>
- </array>
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2009-06-04 14:46:53 UTC (rev 5393)
+++ trunk/SKDocumentController.m 2009-06-04 16:26:53 UTC (rev 5394)
@@ -67,11 +67,6 @@
#define SKDVIDocumentTypeName @"DVI document"
#define SKBareDVIDocumentTypeName @"DVI Without Notes"
-#define SKPDFDocumentTypeUTI @"com.adobe.pdf"
-#define SKPDFBundleDocumentTypeUTI @"net.sourceforge.skim-app.pdfd"
-#define SKNotesDocumentTypeUTI @"net.sourceforge.skim-app.skimnotes"
-#define SKPostScriptDocumentTypeUTI @"com.adobe.postscript"
-
NSString *SKPDFDocumentType = nil;
NSString *SKPDFBundleDocumentType = nil;
NSString *SKEmbeddedPDFDocumentType = nil;
@@ -87,12 +82,11 @@
NSString *SKBareDVIDocumentType = nil;
#define DEFINE_IS_DOCUMENT_TYPE(name) BOOL SKIs##name##DocumentType(NSString
*docType) { return [docType isEqualToString:SK##name##DocumentTypeName]; }
-#define DEFINE_IS_DOCUMENT_TYPE_UTI(name) BOOL
SKIs##name##DocumentType(NSString *docType) { return ([[NSWorkspace
sharedWorkspace] respondsToSelector:@selector(type:conformsToType:)] &&
[[NSWorkspace sharedWorkspace] type:docType
conformsToType:SK##name##DocumentTypeUTI]) || [docType
isEqualToString:SK##name##DocumentTypeName]; }
-DEFINE_IS_DOCUMENT_TYPE_UTI(PDF)
-DEFINE_IS_DOCUMENT_TYPE_UTI(PDFBundle)
-DEFINE_IS_DOCUMENT_TYPE_UTI(Notes)
-DEFINE_IS_DOCUMENT_TYPE_UTI(PostScript)
+DEFINE_IS_DOCUMENT_TYPE(PDF)
+DEFINE_IS_DOCUMENT_TYPE(PDFBundle)
+DEFINE_IS_DOCUMENT_TYPE(Notes)
+DEFINE_IS_DOCUMENT_TYPE(PostScript)
DEFINE_IS_DOCUMENT_TYPE(DVI)
DEFINE_IS_DOCUMENT_TYPE(EmbeddedPDF)
DEFINE_IS_DOCUMENT_TYPE(BarePDF)
@@ -136,22 +130,14 @@
@implementation SKDocumentController
#define DEFINE_DOCUMENT_TYPE(name) SK##name##DocumentType =
SK##name##DocumentTypeName
-#define DEFINE_DOCUMENT_TYPE_UTI(name) SK##name##DocumentType =
SK##name##DocumentTypeUTI
+ (void)initialize {
SKINITIALIZE;
- if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4) {
- DEFINE_DOCUMENT_TYPE(PDF);
- DEFINE_DOCUMENT_TYPE(PDFBundle);
- DEFINE_DOCUMENT_TYPE(Notes);
- DEFINE_DOCUMENT_TYPE(PostScript);
- } else {
- DEFINE_DOCUMENT_TYPE_UTI(PDF);
- DEFINE_DOCUMENT_TYPE_UTI(PDFBundle);
- DEFINE_DOCUMENT_TYPE_UTI(Notes);
- DEFINE_DOCUMENT_TYPE_UTI(PostScript);
- }
+ DEFINE_DOCUMENT_TYPE(PDF);
+ DEFINE_DOCUMENT_TYPE(PDFBundle);
+ DEFINE_DOCUMENT_TYPE(Notes);
+ DEFINE_DOCUMENT_TYPE(PostScript);
DEFINE_DOCUMENT_TYPE(DVI);
DEFINE_DOCUMENT_TYPE(EmbeddedPDF);
DEFINE_DOCUMENT_TYPE(BarePDF);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit