Revision: 15683
http://sourceforge.net/p/skim-app/code/15683
Author: hofman
Date: 2025-10-04 15:48:35 +0000 (Sat, 04 Oct 2025)
Log Message:
-----------
make init designated initializer of singleton bookmark controller and make sure
every initializer returns th shared instance
Modified Paths:
--------------
trunk/SKBookmarkController.h
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.h
===================================================================
--- trunk/SKBookmarkController.h 2025-10-02 17:02:55 UTC (rev 15682)
+++ trunk/SKBookmarkController.h 2025-10-04 15:48:35 UTC (rev 15683)
@@ -65,6 +65,8 @@
BOOL appIsTerminating;
}
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
@property (class, nonatomic, readonly) SKBookmarkController
*sharedBookmarkController;
@property (nonatomic, nullable, strong) IBOutlet SKOutlineView *outlineView;
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-02 17:02:55 UTC (rev 15682)
+++ trunk/SKBookmarkController.m 2025-10-04 15:48:35 UTC (rev 15683)
@@ -146,7 +146,7 @@
return sharedBookmarkController ?: [super allocWithZone:zone];
}
-- (instancetype)initWithWindow:(NSWindow *)window {
+- (instancetype)init {
if (sharedBookmarkController == nil) {
self = [super initWithWindow:nil];
if (self) {
@@ -183,6 +183,16 @@
return self;
}
+- (instancetype)initWithWindow:(NSWindow *)window {
+ return [self init];
+}
+
+- (instancetype)initWithCoder:(NSCoder *)coder {
+ return [self init];
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {}
+
- (void)dealloc {
[self stopObservingBookmarks:@[bookmarkRoot]];
}
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