Revision: 15679
http://sourceforge.net/p/skim-app/code/15679
Author: hofman
Date: 2025-10-02 16:21:17 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
Add some more designated initializer attributes
Modified Paths:
--------------
trunk/SKFileUpdateChecker.h
trunk/SKLoupeController.h
trunk/SKNoteTypeSheetController.h
trunk/SKNoteTypeSheetController.m
trunk/SKNoteWindowController.h
trunk/SKNoteWindowController.m
trunk/SKPresentationOptionsSheetController.h
trunk/SKPresentationOptionsSheetController.m
trunk/SKViewSettingsController.h
trunk/SKViewSettingsController.m
Modified: trunk/SKFileUpdateChecker.h
===================================================================
--- trunk/SKFileUpdateChecker.h 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKFileUpdateChecker.h 2025-10-02 16:21:17 UTC (rev 15679)
@@ -61,7 +61,8 @@
@property (nonatomic, getter=isEnabled) BOOL enabled;
@property (nonatomic, readonly) BOOL fileChangedOnDisk, isUpdatingFile;
-- (instancetype)initForDocument:(NSDocument *)aDocument;
+- (instancetype)initForDocument:(NSDocument *)aDocument
NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
- (void)terminate;
Modified: trunk/SKLoupeController.h
===================================================================
--- trunk/SKLoupeController.h 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKLoupeController.h 2025-10-02 16:21:17 UTC (rev 15679)
@@ -50,7 +50,8 @@
NSInteger level;
}
-- (instancetype)initWithPDFView:(PDFView *)aPdfView;
+- (instancetype)initWithPDFView:(PDFView *)aPdfView NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
@property (nonatomic) CGFloat magnification;
@property (nonatomic) NSInteger level;
Modified: trunk/SKNoteTypeSheetController.h
===================================================================
--- trunk/SKNoteTypeSheetController.h 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKNoteTypeSheetController.h 2025-10-02 16:21:17 UTC (rev 15679)
@@ -47,7 +47,9 @@
__weak id <SKNoteTypeSheetControllerDelegate> delegate;
}
-- (instancetype)initIncludingWidgets:(BOOL)includeWidgets;
+- (instancetype)initIncludingWidgets:(BOOL)includeWidgets
NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithWindow:(nullable NSWindow *)window NS_UNAVAILABLE;
+- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
@property (nonatomic, nullable, weak) id <SKNoteTypeSheetControllerDelegate>
delegate;
@property (nonatomic, readonly) NSArray<NSString *> *noteTypes;
Modified: trunk/SKNoteTypeSheetController.m
===================================================================
--- trunk/SKNoteTypeSheetController.m 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKNoteTypeSheetController.m 2025-10-02 16:21:17 UTC (rev 15679)
@@ -56,7 +56,7 @@
@dynamic noteTypes;
- (instancetype)initIncludingWidgets:(BOOL)includeWidgets {
- self = [super initWithWindowNibName:@"NoteTypeSheet"];
+ self = [super initWithWindow:nil];
if (self) {
noteTypeMenu = [[NSMenu alloc] init];
NSArray *noteTypes = [NSArray arrayWithObjects:SKNFreeTextString,
SKNNoteString, SKNCircleString, SKNSquareString, SKNHighlightString,
SKNUnderlineString, SKNStrikeOutString, SKNLineString, SKNInkString,
includeWidgets ? SKNWidgetString : nil, nil];
@@ -79,6 +79,10 @@
return [self initIncludingWidgets:NO];
}
+- (NSString *)windowNibName {
+ return @"NoteTypeSheet";
+}
+
- (NSButton *)switchForTag:(NSInteger)tag {
for (NSView *view in [[[self window] contentView] subviews]) {
if ([view isKindOfClass:[NSButton class]] && [(NSButton *)view action]
== NULL && [(NSButton *)view tag] == tag)
Modified: trunk/SKNoteWindowController.h
===================================================================
--- trunk/SKNoteWindowController.h 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKNoteWindowController.h 2025-10-02 16:21:17 UTC (rev 15679)
@@ -78,7 +78,9 @@
@property (nonatomic, readonly) PDFAnnotation *note;
@property (nonatomic) BOOL keepOnTop, forceOnTop, isNoteType;
-- (instancetype)initWithNote:(PDFAnnotation *)aNote;
+- (instancetype)initWithNote:(PDFAnnotation *)aNote NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithWindow:(nullable NSWindow *)window NS_UNAVAILABLE;
+- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
- (void)statusBarClicked:(nullable id)sender;
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKNoteWindowController.m 2025-10-02 16:21:17 UTC (rev 15679)
@@ -148,7 +148,7 @@
}
- (instancetype)initWithNote:(PDFAnnotation *)aNote {
- self = [self initWithWindowNibName:@"NoteWindow"];
+ self = [super initWithWindow:nil];
if (self) {
note = aNote;
@@ -170,6 +170,10 @@
return self;
}
+- (NSString *)windowNibName {
+ return @"NoteWindow";
+}
+
- (void)updateStatusMessage {
NSRect bounds = [note bounds];
[[statusBar leftField] setStringValue:[NSString
stringWithFormat:NSLocalizedString(@"Page %@ at (%ld, %ld)", @"Status
message"), [[note page] displayLabel], (long)NSMidX(bounds),
(long)NSMidY(bounds)]];
Modified: trunk/SKPresentationOptionsSheetController.h
===================================================================
--- trunk/SKPresentationOptionsSheetController.h 2025-10-02 15:53:38 UTC
(rev 15678)
+++ trunk/SKPresentationOptionsSheetController.h 2025-10-02 16:21:17 UTC
(rev 15679)
@@ -76,7 +76,9 @@
@property (nonatomic) BOOL separate;
@property (nonatomic, copy) NSArray<SKLabeledTransitionInfo *> *transitions;
-- (instancetype)initForController:(SKMainWindowController *)aController;
+- (instancetype)initForController:(SKMainWindowController *)aController
NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithWindow:(nullable NSWindow *)window NS_UNAVAILABLE;
+- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
- (IBAction)preview:(nullable id)sender;
Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m 2025-10-02 15:53:38 UTC
(rev 15678)
+++ trunk/SKPresentationOptionsSheetController.m 2025-10-02 16:21:17 UTC
(rev 15679)
@@ -102,7 +102,7 @@
}
- (instancetype)initForController:(SKMainWindowController *)aController {
- self = [self initWithWindowNibName:@"TransitionSheet"];
+ self = [super initWithWindow:nil];
if (self) {
controller = aController;
@@ -134,6 +134,10 @@
);
}
+- (NSString *)windowNibName {
+ return @"TransitionSheet";
+}
+
- (void)handleDocumentsDidChangeNotification:(NSNotification *)note {
id currentDoc = [[notesDocumentPopUpButton selectedItem]
representedObject];
Modified: trunk/SKViewSettingsController.h
===================================================================
--- trunk/SKViewSettingsController.h 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKViewSettingsController.h 2025-10-02 16:21:17 UTC (rev 15679)
@@ -54,7 +54,9 @@
NSDictionary<NSString *, id> *defaultSettings;
}
-- (instancetype)initWithSettings:(NSDictionary<NSString *, id> *)settings
defaultSettings:(nullable NSDictionary<NSString *, id> *)aDefaultSettings;
+- (instancetype)initWithSettings:(NSDictionary<NSString *, id> *)settings
defaultSettings:(nullable NSDictionary<NSString *, id> *)aDefaultSettings
NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithWindow:(nullable NSWindow *)window NS_UNAVAILABLE;
+- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
@property (nonatomic, getter=isCustom) BOOL custom;
Modified: trunk/SKViewSettingsController.m
===================================================================
--- trunk/SKViewSettingsController.m 2025-10-02 15:53:38 UTC (rev 15678)
+++ trunk/SKViewSettingsController.m 2025-10-02 16:21:17 UTC (rev 15679)
@@ -60,7 +60,7 @@
}
- (instancetype)initWithSettings:(NSDictionary *)settings
defaultSettings:(NSDictionary *)aDefaultSettings {
- self = [self initWithWindowNibName: @"ViewSettings"];
+ self = [super initWithWindow:nil];
if (self) {
defaultSettings = [aDefaultSettings copy];
if (defaultSettings == nil || [settings count]) {
@@ -75,6 +75,10 @@
return self;
}
+- (NSString *)windowNibName {
+ return @"ViewSettings";
+}
+
- (NSInteger)extendedDisplayMode {
NSInteger mode = [self displayMode];
if (mode == kPDFDisplaySinglePageContinuous && [self displayDirection] ==
1)
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