Revision: 13973
          http://sourceforge.net/p/skim-app/code/13973
Author:   hofman
Date:     2023-12-24 15:20:25 +0000 (Sun, 24 Dec 2023)
Log Message:
-----------
remove some array kvc methods we don't use

Modified Paths:
--------------
    trunk/SKMainWindowController.h
    trunk/SKMainWindowController.m

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2023-12-24 14:56:07 UTC (rev 13972)
+++ trunk/SKMainWindowController.h      2023-12-24 15:20:25 UTC (rev 13973)
@@ -238,8 +238,6 @@
 @property (nonatomic, readonly) BOOL hasNotes;
 
 @property (nonatomic, readonly) NSArray<PDFAnnotation *> *notes;
-@property (nonatomic, readonly) NSUInteger countOfNotes;
-- (PDFAnnotation *)objectInNotesAtIndex:(NSUInteger)theIndex;
 - (void)insertObject:(PDFAnnotation *)note inNotesAtIndex:(NSUInteger)theIndex;
 - (void)insertNotes:(NSArray *)newNotes atIndexes:(NSIndexSet *)theIndexes;
 - (void)removeObjectFromNotesAtIndex:(NSUInteger)theIndex;
@@ -248,23 +246,13 @@
 @property (nonatomic, nullable, copy) NSArray<SKThumbnail *> *thumbnails;
 
 @property (nonatomic, readonly) NSArray<SKSnapshotWindowController *> 
*snapshots;
-@property (nonatomic, readonly) NSUInteger countOfSnapshots;
-- (SKSnapshotWindowController *)objectInSnapshotsAtIndex:(NSUInteger)theIndex;
 - (void)insertObject:(SKSnapshotWindowController *)snapshot 
inSnapshotsAtIndex:(NSUInteger)theIndex;
 - (void)removeObjectFromSnapshotsAtIndex:(NSUInteger)theIndex;
 - (void)removeAllObjectsFromSnapshots;
 
 @property (nonatomic, nullable, copy) NSArray<PDFSelection *> *searchResults;
-@property (nonatomic, readonly) NSUInteger countOfSearchResults;
-- (PDFSelection *)objectInSearchResultsAtIndex:(NSUInteger)theIndex;
-- (void)insertObject:(PDFSelection *)searchResult 
inSearchResultsAtIndex:(NSUInteger)theIndex;
-- (void)removeObjectFromSearchResultsAtIndex:(NSUInteger)theIndex;
 
 @property (nonatomic, nullable, copy) NSArray<SKGroupedSearchResult *> 
*groupedSearchResults;
-@property (nonatomic, readonly) NSUInteger countOfGroupedSearchResults;
-- (SKGroupedSearchResult 
*)objectInGroupedSearchResultsAtIndex:(NSUInteger)theIndex;
-- (void)insertObject:(SKGroupedSearchResult *)groupedSearchResult 
inGroupedSearchResultsAtIndex:(NSUInteger)theIndex;
-- (void)removeObjectFromGroupedSearchResultsAtIndex:(NSUInteger)theIndex;
 
 @property (nonatomic, nullable, copy) NSDictionary<NSString *, id> 
*presentationOptions;
 

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2023-12-24 14:56:07 UTC (rev 13972)
+++ trunk/SKMainWindowController.m      2023-12-24 15:20:25 UTC (rev 13973)
@@ -217,7 +217,7 @@
 @implementation SKMainWindowController
 
 @synthesize mainWindow, splitView, centerContentView, pdfSplitView, 
pdfContentView, statusBar, pdfView, secondaryPdfView, leftSideController, 
rightSideController, toolbarController, leftSideContentView, 
rightSideContentView, presentationNotesDocument, presentationNotesOffset, tags, 
rating, pageLabel, interactionMode, placeholderPdfDocument;
-@dynamic pdfDocument, notes, thumbnails, snapshots, countOfSnapshots, 
searchResults, countOfSearchResults, groupedSearchResults, 
countOfGroupedSearchResults, presentationOptions, presentationUndoManager, 
selectedNotes, hasNotes, widgetProperties, autoScales, leftSidePaneState, 
rightSidePaneState, findPaneState, leftSidePaneIsOpen, rightSidePaneIsOpen, 
recentInfoNeedsUpdate, searchString, hasOverview, notesMenu;
+@dynamic pdfDocument, notes, thumbnails, snapshots, searchResults, 
groupedSearchResults, presentationOptions, presentationUndoManager, 
selectedNotes, hasNotes, widgetProperties, autoScales, leftSidePaneState, 
rightSidePaneState, findPaneState, leftSidePaneIsOpen, rightSidePaneIsOpen, 
recentInfoNeedsUpdate, searchString, hasOverview, notesMenu;
 
 + (void)initialize {
     SKINITIALIZE;
@@ -1296,15 +1296,7 @@
 - (NSArray *)notes {
     return notes;
 }
-        
-- (NSUInteger)countOfNotes {
-    return [notes count];
-}
 
-- (PDFAnnotation *)objectInNotesAtIndex:(NSUInteger)theIndex {
-    return [notes objectAtIndex:theIndex];
-}
-
 - (void)insertObject:(PDFAnnotation *)note inNotesAtIndex:(NSUInteger)theIndex 
{
     [notes insertObject:note atIndex:theIndex];
 
@@ -1369,14 +1361,6 @@
     return snapshots;
 }
 
-- (NSUInteger)countOfSnapshots {
-    return [snapshots count];
-}
-
-- (SKSnapshotWindowController *)objectInSnapshotsAtIndex:(NSUInteger)theIndex {
-    return [snapshots objectAtIndex:theIndex];
-}
-
 - (void)insertObject:(SKSnapshotWindowController *)snapshot 
inSnapshotsAtIndex:(NSUInteger)theIndex {
     [snapshots insertObject:snapshot atIndex:theIndex];
 }
@@ -1430,46 +1414,14 @@
     [searchResults setArray:newSearchResults];
 }
 
-- (NSUInteger)countOfSearchResults {
-    return [searchResults count];
-}
-
-- (PDFSelection *)objectInSearchResultsAtIndex:(NSUInteger)theIndex {
-    return [searchResults objectAtIndex:theIndex];
-}
-
 - (void)insertObject:(PDFSelection *)searchResult 
inSearchResultsAtIndex:(NSUInteger)theIndex {
     [searchResults insertObject:searchResult atIndex:theIndex];
 }
 
-- (void)removeObjectFromSearchResultsAtIndex:(NSUInteger)theIndex {
-    [searchResults removeObjectAtIndex:theIndex];
-}
-
-- (NSArray *)groupedSearchResults {
-    return groupedSearchResults;
-}
-
 - (void)setGroupedSearchResults:(NSArray *)newGroupedSearchResults {
     [groupedSearchResults setArray:newGroupedSearchResults];
 }
 
-- (NSUInteger)countOfGroupedSearchResults {
-    return [groupedSearchResults count];
-}
-
-- (SKGroupedSearchResult 
*)objectInGroupedSearchResultsAtIndex:(NSUInteger)theIndex {
-    return [groupedSearchResults objectAtIndex:theIndex];
-}
-
-- (void)insertObject:(SKGroupedSearchResult *)groupedSearchResult 
inGroupedSearchResultsAtIndex:(NSUInteger)theIndex {
-    [groupedSearchResults insertObject:groupedSearchResult atIndex:theIndex];
-}
-
-- (void)removeObjectFromGroupedSearchResultsAtIndex:(NSUInteger)theIndex {
-    [groupedSearchResults removeObjectAtIndex:theIndex];
-}
-
 - (NSDictionary *)presentationOptions {
     SKTransitionController *transitions = [pdfView transitionController];
     SKTransitionInfo *transition = [transitions transition];
@@ -1955,7 +1907,7 @@
         
         if ([currentSel hasCharacters]) {
             [pdfView setCurrentSelection:currentSel animate:YES];
-            [[statusBar rightField] setStringValue:[NSString 
stringWithFormat:NSLocalizedString(@"Match %lu of %lu", @"Status message"), 
(unsigned long)[searchResults indexOfObject:currentSel] + 1, (unsigned 
long)[self countOfSearchResults]]];
+            [[statusBar rightField] setStringValue:[NSString 
stringWithFormat:NSLocalizedString(@"Match %lu of %lu", @"Status message"), 
(unsigned long)[searchResults indexOfObject:currentSel] + 1, (unsigned 
long)[searchResults count]]];
         } else {
             [self updateRightStatus];
         }
@@ -3046,7 +2998,7 @@
             snapshotTimer = nil;
         }
         
-        if ([self countOfSnapshots])
+        if ([[self snapshots] count])
             [self allSnapshotsNeedUpdate];
     }
 }

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