Revision: 13993
http://sourceforge.net/p/skim-app/code/13993
Author: hofman
Date: 2023-12-26 09:43:29 +0000 (Tue, 26 Dec 2023)
Log Message:
-----------
make pageLabels immutable
Modified Paths:
--------------
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2023-12-26 09:26:00 UTC (rev 13992)
+++ trunk/SKMainWindowController.h 2023-12-26 09:43:29 UTC (rev 13993)
@@ -143,7 +143,7 @@
NSButton *colorAccessoryView;
NSButton *textColorAccessoryView;
- NSMutableArray<NSString *> *pageLabels;
+ NSArray<NSString *> *pageLabels;
NSString *pageLabel;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2023-12-26 09:26:00 UTC (rev 13992)
+++ trunk/SKMainWindowController.m 2023-12-26 09:43:29 UTC (rev 13993)
@@ -245,7 +245,7 @@
rating = 0.0;
snapshots = [[NSMutableArray alloc] init];
dirtySnapshots = [[NSMutableArray alloc] init];
- pageLabels = [[NSMutableArray alloc] init];
+ pageLabels = [[NSArray alloc] init];
lastViewedPages = [[NSPointerArray alloc]
initWithOptions:NSPointerFunctionsOpaqueMemory |
NSPointerFunctionsIntegerPersonality];
rowHeights = [[NSMapTable alloc]
initWithKeyOptions:NSPointerFunctionsStrongMemory |
NSPointerFunctionsObjectPersonality valueOptions:NSPointerFunctionsOpaqueMemory
| NSPointerFunctionsIntegerPersonality capacity:0];
@@ -784,7 +784,7 @@
- (void)updatePageLabelsAndOutlineForExpansionState:(NSDictionary *)info {
// update page labels, also update the size of the table columns
displaying the labels
[self willChangeValueForKey:PAGELABELS_KEY];
- [pageLabels setArray:[[pdfView document] pageLabels]];
+ pageLabels = [[[pdfView document] pageLabels] copy];
[self didChangeValueForKey:PAGELABELS_KEY];
[self updatePageLabel];
@@ -833,7 +833,7 @@
return;
[self willChangeValueForKey:PAGELABELS_KEY];
- [pageLabels setArray:newPageLabels];
+ pageLabels = [newPageLabels copy];
[self didChangeValueForKey:PAGELABELS_KEY];
[self updatePageLabel];
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