Revision: 6551
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6551&view=rev
Author:   hofman
Date:     2010-05-20 11:46:43 +0000 (Thu, 20 May 2010)

Log Message:
-----------
include notes files in dropped bookmarks

Modified Paths:
--------------
    trunk/SKBookmarkController.m

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2010-05-20 11:36:26 UTC (rev 6550)
+++ trunk/SKBookmarkController.m        2010-05-20 11:46:43 UTC (rev 6551)
@@ -260,6 +260,7 @@
         if ([[file lastPathComponent] hasPrefix:@"."] == NO) {
             NSString *path = [basePath stringByAppendingPathComponent:file] ?: 
file;
             NSString *fileType = [dc typeForContentsOfURL:[NSURL 
fileURLWithPath:path] error:NULL];
+            Class docClass;
             SKBookmark *bookmark;
             if (SKIsFolderDocumentType(fileType)) {
                 if (bookmark = [SKBookmark bookmarkFolderWithLabel:[fm 
displayNameAtPath:path]]) {
@@ -267,8 +268,8 @@
                     [self addBookmarksForPaths:[fm 
contentsOfDirectoryAtPath:path error:NULL] basePath:path toFolder:bookmark 
atIndex:0];
                     rv = YES;
                 }
-            } else if ([dc documentClassForType:fileType] == [SKMainDocument 
class]) {
-                if (bookmark = [SKBookmark bookmarkWithPath:path pageIndex:0 
label:[fm displayNameAtPath:path]]) {
+            } else if (docClass = [dc documentClassForType:fileType]) {
+                if (bookmark = [SKBookmark bookmarkWithPath:path 
pageIndex:(docClass == [SKMainDocument class] ? 0 : NSNotFound) label:[fm 
displayNameAtPath:path]]) {
                     [folder insertObject:bookmark inChildrenAtIndex:anIndex++];
                     rv = YES;
                 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------

_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to