Revision: 4607
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4607&view=rev
Author:   hofman
Date:     2008-09-10 20:20:29 +0000 (Wed, 10 Sep 2008)

Log Message:
-----------
Initially open some toc outline items in reloadData. Don't observe sequential 
numbering pref, as you can't change it during a run.

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m
    trunk/SKTocOutlineView.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-09-10 18:23:41 UTC (rev 4606)
+++ trunk/SKMainWindowController.m      2008-09-10 20:20:29 UTC (rev 4607)
@@ -3263,7 +3263,7 @@
                                   SKSearchHighlightColorKey, 
SKShouldHighlightSearchResultsKey, 
                                   SKThumbnailSizeKey, 
SKSnapshotThumbnailSizeKey, 
                                   SKShouldAntiAliasKey, 
SKGreekingThresholdKey, 
-                                  SKTableFontSizeKey, 
SKSequentialPageNumberingKey, nil]
+                                  SKTableFontSizeKey, nil]
         context:SKMainWindowDefaultsObservationContext];
 }
 
@@ -3273,7 +3273,7 @@
                                   SKSearchHighlightColorKey, 
SKShouldHighlightSearchResultsKey, 
                                   SKThumbnailSizeKey, 
SKSnapshotThumbnailSizeKey, 
                                   SKShouldAntiAliasKey, 
SKGreekingThresholdKey, 
-                                  SKTableFontSizeKey, 
SKSequentialPageNumberingKey, nil]];
+                                  SKTableFontSizeKey, nil]];
 }
 
 #pragma mark Undo
@@ -3380,9 +3380,6 @@
             [findTableView setFont:font];
             [groupedFindTableView setFont:font];
             [self updatePageColumnWidthForTableView:outlineView];
-        } else if ([key isEqualToString:SKSequentialPageNumberingKey]) {
-            [PDFPage setUsesSequentialPageNumbering:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKSequentialPageNumberingKey]];
-            [self updatePageLabelsAndOutline];
         }
         
     } else if (context == SKNPDFAnnotationPropertiesObservationContext) {

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-09-10 18:23:41 UTC (rev 4606)
+++ trunk/SKMainWindowController_UI.m   2008-09-10 20:20:29 UTC (rev 4607)
@@ -531,12 +531,9 @@
         if (item == nil && [[pdfView document] isLocked] == NO)
             item = pdfOutline;
         PDFOutline *obj = [(PDFOutline *)item childAtIndex:anIndex];
-        BOOL shouldExpand = floor(NSAppKitVersionNumber) > 
NSAppKitVersionNumber10_4 && [pdfOutlineItems containsObject:obj] == NO && [obj 
numberOfChildren] > 0 && [obj isOpen];
         // Apple's sample code retains this object before returning it, which 
prevents a crash, but also causes a leak.  We could rewrite PDFOutline, but 
it's easier just to collect these objects and release them in -dealloc.
         if (obj)
             [pdfOutlineItems addObject:obj];
-        if (shouldExpand)
-            [outlineView performSelector:@selector(expandItem:) withObject:obj 
afterDelay:0.0];
         return obj;
     } else if ([ov isEqual:noteOutlineView]) {
         if (item == nil)

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2008-09-10 18:23:41 UTC (rev 4606)
+++ trunk/SKTocOutlineView.m    2008-09-10 20:20:29 UTC (rev 4607)
@@ -165,6 +165,12 @@
 
 - (void)reloadData{
     [super reloadData];
+    int i;
+       for (i = 0; i < [self numberOfRows]; i++) {
+               id item = [self itemAtRow:i];
+               if ([item respondsToSelector:@selector(isOpen)] && [item 
isOpen])
+                       [self expandItem:item];
+       }
        [self rebuildTrackingRects];
 }
 


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to