Revision: 13349
          http://sourceforge.net/p/skim-app/code/13349
Author:   hofman
Date:     2023-03-08 15:06:40 +0000 (Wed, 08 Mar 2023)
Log Message:
-----------
no need for scripting cover method for border style

Modified Paths:
--------------
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/PDFAnnotationText_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.h
    trunk/PDFAnnotation_SKExtensions.m
    trunk/SKNotePrefs.h
    trunk/SKNotePrefs.m
    trunk/Skim.sdef

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2023-03-08 10:05:19 UTC (rev 
13348)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2023-03-08 15:06:40 UTC (rev 
13349)
@@ -378,7 +378,7 @@
         [customKeys addObject:SKPDFAnnotationSelectionSpecifierKey];
         [customKeys addObject:SKPDFAnnotationScriptingPointListsKey];
         [customKeys removeObject:SKNPDFAnnotationLineWidthKey];
-        [customKeys removeObject:SKPDFAnnotationScriptingBorderStyleKey];
+        [customKeys removeObject:SKNPDFAnnotationBorderStyleKey];
         [customKeys removeObject:SKNPDFAnnotationDashPatternKey];
         customMarkupScriptingKeys = [customKeys copy];
         [customKeys release];

Modified: trunk/PDFAnnotationText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.m      2023-03-08 10:05:19 UTC (rev 
13348)
+++ trunk/PDFAnnotationText_SKExtensions.m      2023-03-08 15:06:40 UTC (rev 
13349)
@@ -79,7 +79,7 @@
         NSMutableSet *customKeys = [[super customScriptingKeys] mutableCopy];
         [customKeys addObject:SKPDFAnnotationScriptingIconTypeKey];
         [customKeys removeObject:SKNPDFAnnotationLineWidthKey];
-        [customKeys removeObject:SKPDFAnnotationScriptingBorderStyleKey];
+        [customKeys removeObject:SKNPDFAnnotationBorderStyleKey];
         [customKeys removeObject:SKNPDFAnnotationDashPatternKey];
         customTextScriptingKeys = [customKeys copy];
         [customKeys release];

Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h  2023-03-08 10:05:19 UTC (rev 13348)
+++ trunk/PDFAnnotation_SKExtensions.h  2023-03-08 15:06:40 UTC (rev 13349)
@@ -42,7 +42,6 @@
 #import "NSGeometry_SKExtensions.h"
 
 
-extern NSString *SKPDFAnnotationScriptingBorderStyleKey;
 extern NSString *SKPDFAnnotationScriptingColorKey;
 extern NSString *SKPDFAnnotationScriptingModificationDateKey;
 extern NSString *SKPDFAnnotationScriptingUserNameKey;
@@ -156,8 +155,6 @@
 - (CGFloat)fontSize;
 - (NSColor *)scriptingFontColor;
 - (NSColor *)scriptingInteriorColor;
-- (PDFBorderStyle)scriptingBorderStyle;
-- (void)setScriptingBorderStyle:(PDFBorderStyle)style;
 - (NSData *)startPointAsQDPoint;
 - (NSData *)endPointAsQDPoint;
 - (PDFLineStyle)scriptingStartLineStyle;

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2023-03-08 10:05:19 UTC (rev 13348)
+++ trunk/PDFAnnotation_SKExtensions.m  2023-03-08 15:06:40 UTC (rev 13349)
@@ -67,7 +67,6 @@
 #import "SKAnnotationTypeImageCell.h"
 
 
-NSString *SKPDFAnnotationScriptingBorderStyleKey = @"scriptingBorderStyle";
 NSString *SKPDFAnnotationScriptingColorKey = @"scriptingColor";
 NSString *SKPDFAnnotationScriptingModificationDateKey = 
@"scriptingModificationDate";
 NSString *SKPDFAnnotationScriptingUserNameKey = @"scriptingUserName";
@@ -664,7 +663,7 @@
 + (NSSet *)customScriptingKeys {
     static NSSet *customScriptingKeys = nil;
     if (customScriptingKeys == nil)
-        customScriptingKeys = [[NSSet alloc] 
initWithObjects:SKNPDFAnnotationLineWidthKey, 
SKPDFAnnotationScriptingBorderStyleKey, SKNPDFAnnotationDashPatternKey, nil];
+        customScriptingKeys = [[NSSet alloc] 
initWithObjects:SKNPDFAnnotationLineWidthKey, SKNPDFAnnotationBorderStyleKey, 
SKNPDFAnnotationDashPatternKey, nil];
     return customScriptingKeys;
 }
 
@@ -696,9 +695,9 @@
 - (void)setScriptingProperties:(NSDictionary *)properties {
     [super setScriptingProperties:properties];
     // set the borderStyle afterwards, as this may have been changed when 
setting the dash pattern
-    id style = [properties 
objectForKey:SKPDFAnnotationScriptingBorderStyleKey];
+    id style = [properties objectForKey:SKNPDFAnnotationBorderStyleKey];
     if ([style respondsToSelector:@selector(integerValue)] && [properties 
objectForKey:SKNPDFAnnotationDashPatternKey])
-        [self setScriptingBorderStyle:[style integerValue]];
+        [self setBorderStyle:[style integerValue]];
 }
 
 - (NSColor *)scriptingColor {
@@ -801,16 +800,6 @@
     return NSTextAlignmentLeft;
 }
 
-- (PDFBorderStyle)scriptingBorderStyle {
-    return [self borderStyle];
-}
-
-- (void)setScriptingBorderStyle:(PDFBorderStyle)borderStyle {
-    if ([self isEditable]) {
-        [self setBorderStyle:borderStyle];
-    }
-}
-
 - (NSData *)startPointAsQDPoint {
     return nil;
 }

Modified: trunk/SKNotePrefs.h
===================================================================
--- trunk/SKNotePrefs.h 2023-03-08 10:05:19 UTC (rev 13348)
+++ trunk/SKNotePrefs.h 2023-03-08 15:06:40 UTC (rev 13349)
@@ -49,7 +49,7 @@
 @property (nonatomic, retain) NSColor *scriptingColor;
 @property (nonatomic, retain) NSColor *scriptingInteriorColor;
 @property (nonatomic) CGFloat lineWidth;
-@property (nonatomic) PDFBorderStyle scriptingBorderStyle;
+@property (nonatomic) PDFBorderStyle borderStyle;
 @property (nonatomic, retain) NSArray *dashPattern;
 @property (nonatomic) PDFLineStyle scriptingStartLineStyle, 
scriptingEndLineStyle;
 @property (nonatomic, retain) NSString *fontName;

Modified: trunk/SKNotePrefs.m
===================================================================
--- trunk/SKNotePrefs.m 2023-03-08 10:05:19 UTC (rev 13348)
+++ trunk/SKNotePrefs.m 2023-03-08 15:06:40 UTC (rev 13349)
@@ -45,7 +45,7 @@
 @implementation SKNotePrefs
 
 @synthesize type;
-@dynamic name, scriptingColor, scriptingInteriorColor, lineWidth, 
scriptingBorderStyle, dashPattern, scriptingStartLineStyle, 
scriptingEndLineStyle, fontName, fontSize, scriptingFontColor, 
scriptingAlignment, scriptingIconType, scriptingUserName, scriptingProperties;
+@dynamic name, scriptingColor, scriptingInteriorColor, lineWidth, borderStyle, 
dashPattern, scriptingStartLineStyle, scriptingEndLineStyle, fontName, 
fontSize, scriptingFontColor, scriptingAlignment, scriptingIconType, 
scriptingUserName, scriptingProperties;
 
 static NSDictionary *alternateTypeNames = nil;
 static NSDictionary *colorKeys = nil;
@@ -64,11 +64,11 @@
     lineStyleKeys = [[NSDictionary alloc] 
initWithObjectsAndKeys:SKFreeTextNoteLineStyleKey, SKNFreeTextString, 
SKCircleNoteLineStyleKey, SKNCircleString, SKSquareNoteLineStyleKey, 
SKNSquareString, SKLineNoteLineStyleKey, SKNLineString, SKInkNoteLineStyleKey, 
SKNInkString, nil];
     dashPatternKeys = [[NSDictionary alloc] 
initWithObjectsAndKeys:SKFreeTextNoteDashPatternKey, SKNFreeTextString, 
SKCircleNoteDashPatternKey, SKNCircleString, SKSquareNoteDashPatternKey, 
SKNSquareString, SKLineNoteDashPatternKey, SKNLineString, 
SKInkNoteDashPatternKey, SKNInkString, nil];
     NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-    NSArray *array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"lineWidth", @"scriptingBorderStyle", @"dashPattern", 
@"fontName", @"fontSize", @"scriptingFontColor", @"scriptingAlignment"];
+    NSArray *array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"lineWidth", @"bBorderStyle", @"dashPattern", @"fontName", 
@"fontSize", @"scriptingFontColor", @"scriptingAlignment"];
     [dict setObject:array forKey:SKNFreeTextString];
     array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"fontName", @"fontSize", @"scriptingIconType"];
     [dict setObject:array forKey:SKNNoteString];
-    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"scriptingInteriorColor", @"lineWidth", 
@"scriptingBorderStyle", @"dashPattern"];
+    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"scriptingInteriorColor", @"lineWidth", @"bBorderStyle", 
@"dashPattern"];
     [dict setObject:array forKey:SKNCircleString];
     [dict setObject:array forKey:SKNSquareString];
     array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor"];
@@ -75,9 +75,9 @@
     [dict setObject:array forKey:SKNHighlightString];
     [dict setObject:array forKey:SKNUnderlineString];
     [dict setObject:array forKey:SKNStrikeOutString];
-    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"scriptingInteriorColor", @"lineWidth", 
@"scriptingBorderStyle", @"dashPattern", @"scriptingStartLineStyle", 
@"scriptingEndLineStyle"];
+    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"scriptingInteriorColor", @"lineWidth", @"bBorderStyle", 
@"dashPattern", @"scriptingStartLineStyle", @"scriptingEndLineStyle"];
     [dict setObject:array forKey:SKNLineString];
-    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"lineWidth", @"scriptingBorderStyle", @"dashPattern"];
+    array = @[@"name", @"type", @"classCode", @"scriptingUserName", 
@"scriptingColor", @"lineWidth", @"bBorderStyle", @"dashPattern"];
     [dict setObject:array forKey:SKNInkString];
     propertyKeys = [dict copy];
 }
@@ -162,12 +162,12 @@
         [[NSUserDefaults standardUserDefaults] setDouble:lineWidth forKey:key];
 }
 
-- (PDFBorderStyle)scriptingBorderStyle {
+- (PDFBorderStyle)borderStyle {
     NSString *key = [lineStyleKeys objectForKey:type];
     return key ? [[NSUserDefaults standardUserDefaults] integerForKey:key] : 0;
 }
 
-- (void)setScriptingBorderStyle:(PDFBorderStyle)borderStyle {
+- (void)setBorderStyle:(PDFBorderStyle)borderStyle {
     NSString *key = [lineStyleKeys objectForKey:type];
     if (key)
         [[NSUserDefaults standardUserDefaults] setInteger:borderStyle 
forKey:key];

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2023-03-08 10:05:19 UTC (rev 13348)
+++ trunk/Skim.sdef     2023-03-08 15:06:40 UTC (rev 13349)
@@ -889,7 +889,7 @@
             </property>
             <property name="line style" code="LnSt" type="note line style"
                 description="The line style of the note.">
-                <cocoa key="scriptingBorderStyle"/>
+                <cocoa key="borderStyle"/>
             </property>
             <property name="dash pattern" code="DshP"
                 description="The dash pattern of the border of the note or of 
the line, a list of numbers.">

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