Revision: 3242
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3242&view=rev
Author:   hofman
Date:     2007-11-23 12:47:00 -0800 (Fri, 23 Nov 2007)

Log Message:
-----------
Sort notes for quicklook

Modified Paths:
--------------
    trunk/QuickLook-Skim/GeneratePreviewForURL.m
    trunk/QuickLook-Skim/GenerateThumbnailForURL.m

Modified: trunk/QuickLook-Skim/GeneratePreviewForURL.m
===================================================================
--- trunk/QuickLook-Skim/GeneratePreviewForURL.m        2007-11-23 19:39:01 UTC 
(rev 3241)
+++ trunk/QuickLook-Skim/GeneratePreviewForURL.m        2007-11-23 20:47:00 UTC 
(rev 3242)
@@ -97,7 +97,8 @@
             [data release];
             
             if (array) {
-                NSEnumerator *noteEnum = [array objectEnumerator];
+                NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc] 
initWithKey:@"pageIndex" ascending:YES] autorelease];
+                NSEnumerator *noteEnum = [[array 
sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] 
objectEnumerator];
                 NSDictionary *note;
                 while (note = [noteEnum nextObject]) {
                     NSString *type = [note objectForKey:@"type"];

Modified: trunk/QuickLook-Skim/GenerateThumbnailForURL.m
===================================================================
--- trunk/QuickLook-Skim/GenerateThumbnailForURL.m      2007-11-23 19:39:01 UTC 
(rev 3241)
+++ trunk/QuickLook-Skim/GenerateThumbnailForURL.m      2007-11-23 20:47:00 UTC 
(rev 3242)
@@ -127,7 +127,8 @@
                 [noteParStyle setHeadIndent:20.0];
                  
                 if (array) {
-                    NSEnumerator *noteEnum = [array objectEnumerator];
+                    NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor 
alloc] initWithKey:@"pageIndex" ascending:YES] autorelease];
+                    NSEnumerator *noteEnum = [[array 
sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] 
objectEnumerator];
                     NSDictionary *note;
                     while (note = [noteEnum nextObject]) {
                         NSString *type = [note objectForKey:@"type"];


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to