Revision: 16566
          http://sourceforge.net/p/skim-app/code/16566
Author:   hofman
Date:     2026-09-28 20:55:07 +0000 (Mon, 28 Sep 2026)
Log Message:
-----------
implement legacy initializer in separate category

Modified Paths:
--------------
    trunk/SkimNotes/PDFAnnotation_SKNExtensions.m

Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2026-09-28 18:06:47 UTC 
(rev 16565)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m       2026-09-28 20:55:07 UTC 
(rev 16566)
@@ -337,16 +337,8 @@
 @interface PDFAnnotationChoiceWidget (SKNExtensions)
 @end
 
-#endif
-
 #pragma mark -
 
-@implementation PDFAnnotation (SKNExtensions)
-
-char SKNIsSkimNoteKey;
-
-#ifdef SKIMNOTES_USE_LEGACY_PDFANNOTATION_SUBCLASSES
-
 static inline Class SKNAnnotationClassForType(NSString *type) {
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -371,20 +363,6 @@
 #pragma clang diagnostic pop
 }
 
-- (id)initSkimNoteWithBounds:(NSRect)bounds {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    self = [self initWithBounds:bounds];
-#pragma clang diagnostic pop
-    if (self) {
-        [self setShouldPrint:YES];
-        [self setSkimNote:YES];
-        if ([self respondsToSelector:@selector(setUserName:)])
-            [self setUserName:nil];
-    }
-    return self;
-}
-
 #elif !defined(PDFKIT_PLATFORM_IOS) && (!defined(MAC_OS_X_VERSION_10_13) || 
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13)
 
 #error "Deployment target before macOS 10.13 not supported without legacy 
PDFAnnotation classes"
@@ -391,6 +369,12 @@
 
 #endif
 
+#pragma mark -
+
+@implementation PDFAnnotation (SKNExtensions)
+
+char SKNIsSkimNoteKey;
+
 - (id)initSkimNoteWithBounds:(PDFRect)bounds forType:(NSString *)type {
     if ([type hasPrefix:@"/"])
         type = [type substringFromIndex:1];
@@ -1231,6 +1215,26 @@
 
 #ifdef SKIMNOTES_USE_LEGACY_PDFANNOTATION_SUBCLASSES
 
+@implementation PDFAnnotation (SKNLegacyExtensions)
+
+- (id)initSkimNoteWithBounds:(NSRect)bounds {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    self = [self initWithBounds:bounds];
+#pragma clang diagnostic pop
+    if (self) {
+        [self setShouldPrint:YES];
+        [self setSkimNote:YES];
+        if ([self respondsToSelector:@selector(setUserName:)])
+            [self setUserName:nil];
+    }
+    return self;
+}
+
+@end
+
+#pragma mark -
+
 @implementation PDFAnnotationCircle (SKNExtensions)
 
 - (id)initSkimNoteWithProperties:(NSDictionary *)dict{

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