Revision: 12600
          http://sourceforge.net/p/skim-app/code/12600
Author:   hofman
Date:     2021-12-03 17:00:32 +0000 (Fri, 03 Dec 2021)
Log Message:
-----------
Scripting for default note preferences through a note preferences class. Named 
element of the app with the note type as name. Preeferences for command to get 
the proper object for a given note type (as we cannot use an enumerator as 
name). Inherits from the note class so it has the properties defined. This way 
we don't need property keys for every individual preference.

Modified Paths:
--------------
    trunk/SKApplicationController.h
    trunk/SKApplicationController.m
    trunk/Skim.sdef
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/SKNotePrefs.h
    trunk/SKNotePrefs.m
    trunk/SKPreferencesCommand.h
    trunk/SKPreferencesCommand.m

Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h     2021-12-03 14:51:49 UTC (rev 12599)
+++ trunk/SKApplicationController.h     2021-12-03 17:00:32 UTC (rev 12600)
@@ -65,8 +65,7 @@
 @property (nonatomic, readonly) NSColorList *colorList;
 
 @property (nonatomic, copy) NSDictionary *defaultPdfViewSettings, 
*defaultFullScreenPdfViewSettings;
-@property (nonatomic, copy) NSColor *backgroundColor, 
*fullScreenBackgroundColor, *pageBackgroundColor, *defaultTextNoteFontColor;
-@property (nonatomic, copy) NSDictionary *defaultNoteColors, 
*defaultLineWidths, *defaultLineStyles, *defaultDashPatterns, 
*defaultFontNames, *defaultFontSizes;
+@property (nonatomic, copy) NSColor *backgroundColor, 
*fullScreenBackgroundColor, *pageBackgroundColor;
 @property (nonatomic, copy) NSArray *favoriteColors;
 @property (nonatomic) CGFloat sepiaTone;
 @property (nonatomic) PDFLineStyle defaultStartLineStyle, defaultEndLineStyle;

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2021-12-03 14:51:49 UTC (rev 12599)
+++ trunk/SKApplicationController.m     2021-12-03 17:00:32 UTC (rev 12600)
@@ -79,6 +79,7 @@
 #import "NSView_SKExtensions.h"
 #import "SKColorList.h"
 #import "NSCharacterSet_SKExtensions.h"
+#import "SKNotePrefs.h"
 
 #define WEBSITE_URL @"https://skim-app.sourceforge.io/";
 #define WIKI_URL    @"https://sourceforge.net/p/skim-app/wiki/";
@@ -122,7 +123,7 @@
 @implementation SKApplicationController
 
 @synthesize noteColumnsMenu, noteTypeMenu, colorList;
-@dynamic defaultPdfViewSettings, defaultFullScreenPdfViewSettings, 
backgroundColor, fullScreenBackgroundColor, pageBackgroundColor, 
defaultNoteColors, defaultLineWidths, defaultLineStyles, defaultDashPatterns, 
defaultStartLineStyle, defaultEndLineStyle, defaultFontNames, defaultFontSizes, 
defaultTextNoteFontColor, defaultAlignment, defaultIconType, favoriteColors;
+@dynamic defaultPdfViewSettings, defaultFullScreenPdfViewSettings, 
backgroundColor, fullScreenBackgroundColor, pageBackgroundColor, sepiaTone, 
favoriteColors;
 
 + (void)initialize{
     SKINITIALIZE;
@@ -473,10 +474,9 @@
 - (BOOL)application:(NSApplication *)sender delegateHandlesKey:(NSString *)key 
{
     static NSSet *applicationScriptingKeys = nil;
     if (applicationScriptingKeys == nil)
-        applicationScriptingKeys = [[NSSet alloc] 
initWithObjects:@"bookmarks", @"downloads", 
-            @"defaultPdfViewSettings", @"defaultFullScreenPdfViewSettings", 
@"backgroundColor", @"fullScreenBackgroundColor", @"pageBackgroundColor", 
-            @"defaultNoteColors", @"defaultLineWidths", @"defaultLineStyles", 
@"defaultDashPatterns", @"defaultStartLineStyle", @"defaultEndLineStyle", 
@"defaultFontNames", @"defaultFontSizes", @"defaultTextNoteFontColor", 
@"defaultAlignment", @"defaultIconType", 
-            @"favoriteColors", @"sepiaTone", nil];
+        applicationScriptingKeys = [[NSSet alloc] 
initWithObjects:@"bookmarks", @"downloads", @"notePreferences", 
+            @"defaultPdfViewSettings", @"defaultFullScreenPdfViewSettings", 
@"backgroundColor", @"fullScreenBackgroundColor", @"pageBackgroundColor", 
@"sepiaTone",
+            @"favoriteColors", nil];
        return [applicationScriptingKeys containsObject:key];
 }
 
@@ -529,6 +529,10 @@
         [[SKDownloadController sharedDownloadController] 
removeObjectFromDownloads:download];
 }
 
+- (SKNotePrefs *)valueInNotePreferencesWithName:(NSString *)name {
+    return [[[SKNotePrefs alloc] initWithType:name] autorelease];
+}
+
 - (NSDictionary *)defaultPdfViewSettings {
     return [[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultPDFDisplaySettingsKey];
 }
@@ -603,208 +607,17 @@
         [[NSUserDefaults standardUserDefaults] setColor:color 
forKey:SKPageBackgroundColorKey];
 }
 
-- (NSDictionary *)defaultNoteColors {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud colorForKey:SKFreeTextNoteColorKey], SKNFreeTextString, 
-        [sud colorForKey:SKAnchoredNoteColorKey], SKNNoteString, 
-        [sud colorForKey:SKCircleNoteColorKey], SKNCircleString, 
-        [sud colorForKey:SKSquareNoteColorKey], SKNSquareString, 
-        [sud colorForKey:SKHighlightNoteColorKey], SKNHighlightString, 
-        [sud colorForKey:SKUnderlineNoteColorKey], SKNUnderlineString, 
-        [sud colorForKey:SKStrikeOutNoteColorKey], SKNStrikeOutString, 
-        [sud colorForKey:SKLineNoteColorKey], SKNLineString, 
-        [sud colorForKey:SKInkNoteColorKey], SKNInkString, 
-        [sud colorForKey:SKCircleNoteInteriorColorKey], 
SKCircleInteriorString, 
-        [sud colorForKey:SKSquareNoteInteriorColorKey], 
SKSquareInteriorString, 
-        [sud colorForKey:SKLineNoteInteriorColorKey], SKLineInteriorString, 
-        [sud colorForKey:SKFreeTextNoteFontColorKey], SKFreeTextFontString, 
-        nil];
+- (CGFloat)sepiaTone {
+    return [[NSUserDefaults standardUserDefaults] doubleForKey:SKSepiaToneKey];
 }
 
-- (void)setDefaultNoteColors:(NSDictionary *)colorDict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSColor *color;
-    if ((color = [colorDict objectForKey:SKNFreeTextString]))
-        [sud setColor:color forKey:SKFreeTextNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNNoteString]))
-        [sud setColor:color forKey:SKAnchoredNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNCircleString]))
-        [sud setColor:color forKey:SKCircleNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNSquareString]))
-        [sud setColor:color forKey:SKSquareNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNHighlightString]))
-        [sud setColor:color forKey:SKHighlightNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNUnderlineString]))
-        [sud setColor:color forKey:SKUnderlineNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNStrikeOutString]))
-        [sud setColor:color forKey:SKStrikeOutNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNLineString]))
-        [sud setColor:color forKey:SKLineNoteColorKey];
-    if ((color = [colorDict objectForKey:SKNInkString]))
-        [sud setColor:color forKey:SKInkNoteColorKey];
-    if ((color = [colorDict objectForKey:SKCircleInteriorString]))
-        [sud setColor:color forKey:SKCircleNoteInteriorColorKey];
-    if ((color = [colorDict objectForKey:SKSquareInteriorString]))
-        [sud setColor:color forKey:SKSquareNoteInteriorColorKey];
-    if ((color = [colorDict objectForKey:SKLineInteriorString]))
-        [sud setColor:color forKey:SKLineNoteInteriorColorKey];
-    if ((color = [colorDict objectForKey:SKFreeTextFontString]))
-        [sud setColor:color forKey:SKFreeTextNoteFontColorKey];
+- (void)setSepiaTone:(CGFloat)sepiaTone {
+    if (sepiaTone <= 0.0)
+        [[NSUserDefaults standardUserDefaults] 
removeObjectForKey:SKSepiaToneKey];
+    else
+        [[NSUserDefaults standardUserDefaults] setDouble:fmin(sepiaTone, 1.0) 
forKey:SKSepiaToneKey];
 }
 
-- (NSDictionary *)defaultLineWidths {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [NSNumber numberWithDouble:[sud 
doubleForKey:SKFreeTextNoteLineWidthKey]], SKNFreeTextString, 
-        [NSNumber numberWithDouble:[sud 
doubleForKey:SKCircleNoteLineWidthKey]], SKNCircleString, 
-        [NSNumber numberWithDouble:[sud 
doubleForKey:SKSquareNoteLineWidthKey]], SKNSquareString, 
-        [NSNumber numberWithDouble:[sud doubleForKey:SKLineNoteLineWidthKey]], 
SKNLineString, 
-        [NSNumber numberWithDouble:[sud doubleForKey:SKInkNoteLineWidthKey]], 
SKNInkString, 
-        nil];
-}
-
-- (void)setDefaultLineWidths:(NSDictionary *)dict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSNumber *number;
-    if ((number = [dict objectForKey:SKNFreeTextString]))
-        [sud setDouble:[number doubleValue] forKey:SKFreeTextNoteLineWidthKey];
-    if ((number = [dict objectForKey:SKNCircleString]))
-        [sud setDouble:[number doubleValue] forKey:SKCircleNoteLineWidthKey];
-    if ((number = [dict objectForKey:SKNSquareString]))
-        [sud setDouble:[number doubleValue] forKey:SKSquareNoteLineWidthKey];
-    if ((number = [dict objectForKey:SKNLineString]))
-        [sud setDouble:[number doubleValue] forKey:SKLineNoteLineWidthKey];
-    if ((number = [dict objectForKey:SKNInkString]))
-        [sud setDouble:[number doubleValue] forKey:SKInkNoteLineWidthKey];
-}
-
-- (NSDictionary *)defaultLineStyles {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [NSNumber numberWithInteger:[sud 
integerForKey:SKFreeTextNoteLineStyleKey]], SKNFreeTextString, 
-        [NSNumber numberWithInteger:[sud 
integerForKey:SKCircleNoteLineStyleKey]], SKNCircleString, 
-        [NSNumber numberWithInteger:[sud 
integerForKey:SKSquareNoteLineStyleKey]], SKNSquareString, 
-        [NSNumber numberWithInteger:[sud 
integerForKey:SKLineNoteLineStyleKey]], SKNLineString,
-        [NSNumber numberWithInteger:[sud 
integerForKey:SKInkNoteLineStyleKey]], SKNInkString,
-        nil];
-}
-
-- (void)setDefaultLineStyles:(NSDictionary *)dict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSNumber *number;
-    if ((number = [dict objectForKey:SKNFreeTextString]))
-        [sud setInteger:[number integerValue] 
forKey:SKFreeTextNoteLineStyleKey];
-    if ((number = [dict objectForKey:SKNCircleString]))
-        [sud setInteger:[number integerValue] forKey:SKCircleNoteLineStyleKey];
-    if ((number = [dict objectForKey:SKNSquareString]))
-        [sud setInteger:[number integerValue] forKey:SKSquareNoteLineStyleKey];
-    if ((number = [dict objectForKey:SKNLineString]))
-        [sud setInteger:[number integerValue] forKey:SKLineNoteLineStyleKey];
-    if ((number = [dict objectForKey:SKNInkString]))
-        [sud setInteger:[number integerValue] forKey:SKInkNoteLineStyleKey];
-}
-
-- (NSDictionary *)defaultDashPatterns {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud arrayForKey:SKFreeTextNoteDashPatternKey], SKNFreeTextString, 
-        [sud arrayForKey:SKCircleNoteDashPatternKey], SKNCircleString, 
-        [sud arrayForKey:SKSquareNoteDashPatternKey], SKNSquareString, 
-        [sud arrayForKey:SKLineNoteDashPatternKey], SKNLineString,
-        [sud arrayForKey:SKInkNoteDashPatternKey], SKNInkString,
-        nil];
-}
-
-- (void)setDefaultDashPatterns:(NSDictionary *)dict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSArray *array;
-    if ((array = [dict objectForKey:SKNFreeTextString]))
-        [sud setObject:array forKey:SKFreeTextNoteDashPatternKey];
-    if ((array = [dict objectForKey:SKNCircleString]))
-        [sud setObject:array forKey:SKCircleNoteDashPatternKey];
-    if ((array = [dict objectForKey:SKNSquareString]))
-        [sud setObject:array forKey:SKSquareNoteDashPatternKey];
-    if ((array = [dict objectForKey:SKNLineString]))
-        [sud setObject:array forKey:SKLineNoteDashPatternKey];
-    if ((array = [dict objectForKey:SKNInkString]))
-        [sud setObject:array forKey:SKInkNoteDashPatternKey];
-}
-
-- (NSDictionary *)defaultFontNames {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud stringForKey:SKFreeTextNoteFontNameKey], SKNFreeTextString, 
-        [sud stringForKey:SKAnchoredNoteFontNameKey], SKNNoteString, 
-        nil];
-}
-
-- (void)setDefaultFontNames:(NSDictionary *)fontNameDict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSString *fontName;
-    if ((fontName = [fontNameDict objectForKey:SKNFreeTextString]))
-        [sud setObject:fontName forKey:SKFreeTextNoteFontNameKey];
-    if ((fontName = [fontNameDict objectForKey:SKNNoteString]))
-        [sud setObject:fontName forKey:SKAnchoredNoteFontNameKey];
-}
-
-- (NSDictionary *)defaultFontSizes {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud objectForKey:SKFreeTextNoteFontSizeKey], SKNFreeTextString, 
-        [sud objectForKey:SKAnchoredNoteFontSizeKey], SKNNoteString, 
-        nil];
-}
-
-- (void)setDefaultFontSizes:(NSDictionary *)fontSizeDict {
-    NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-    NSNumber *fontSize;
-    if ((fontSize = [fontSizeDict objectForKey:SKNFreeTextString]))
-        [sud setObject:fontSize forKey:SKFreeTextNoteFontSizeKey];
-    if ((fontSize = [fontSizeDict objectForKey:SKNNoteString]))
-        [sud setObject:fontSize forKey:SKAnchoredNoteFontSizeKey];
-}
-
-- (NSColor *)defaultTextNoteFontColor {
-    return [[NSUserDefaults standardUserDefaults] 
colorForKey:SKFreeTextNoteFontColorKey];
-}
-
-- (void)setDefaultTextNoteFontColor:(NSColor *)color {
-    [[NSUserDefaults standardUserDefaults] setColor:color 
forKey:SKFreeTextNoteFontColorKey];
-}
-
-- (PDFLineStyle)defaultStartLineStyle {
-    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteStartLineStyleKey];
-}
-
-- (void)setDefaultStartLineStyle:(PDFLineStyle)style {
-    [[NSUserDefaults standardUserDefaults] setInteger:style 
forKey:SKLineNoteStartLineStyleKey];
-}
-
-- (PDFLineStyle)defaultEndLineStyle {
-    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteEndLineStyleKey];
-}
-
-- (void)setDefaultEndLineStyle:(PDFLineStyle)style {
-    [[NSUserDefaults standardUserDefaults] setInteger:style 
forKey:SKLineNoteEndLineStyleKey];
-}
-
-- (NSTextAlignment)defaultAlignment {
-    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKFreeTextNoteAlignmentKey];
-}
-
-- (void)setDefaultAlignment:(NSTextAlignment)alignment {
-    [[NSUserDefaults standardUserDefaults] setInteger:alignment 
forKey:SKFreeTextNoteAlignmentKey];
-}
-
-- (PDFTextAnnotationIconType)defaultIconType {
-    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKAnchoredNoteIconTypeKey];
-}
-
-- (void)setDefaultIconType:(PDFTextAnnotationIconType)type {
-    [[NSUserDefaults standardUserDefaults] setInteger:type 
forKey:SKAnchoredNoteIconTypeKey];
-}
-
 - (NSArray *)favoriteColors {
     return [NSColor favoriteColors];
 }
@@ -814,15 +627,4 @@
     [[NSUserDefaults standardUserDefaults] setObject:[transformer 
reverseTransformedValue:array] forKey:SKSwatchColorsKey];
 }
 
-- (CGFloat)sepiaTone {
-    return [[NSUserDefaults standardUserDefaults] doubleForKey:SKSepiaToneKey];
-}
-
-- (void)setSepiaTone:(CGFloat)sepiaTone {
-    if (sepiaTone <= 0.0)
-        [[NSUserDefaults standardUserDefaults] 
removeObjectForKey:SKSepiaToneKey];
-    else
-        [[NSUserDefaults standardUserDefaults] setDouble:fmin(sepiaTone, 1.0) 
forKey:SKSepiaToneKey];
-}
-
 @end

Added: trunk/SKNotePrefs.h
===================================================================
--- trunk/SKNotePrefs.h                         (rev 0)
+++ trunk/SKNotePrefs.h 2021-12-03 17:00:32 UTC (rev 12600)
@@ -0,0 +1,63 @@
+//
+//  SKNotePrefs.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 03/12/2021.
+/*
+ This software is Copyright (c) 2021
+ Christiaan Hofman. All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ 
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <Quartz/Quartz.h>
+
+
+@interface SKNotePrefs : NSObject {
+    NSString *type;
+}
+
+@property (nonatomic, readonly) NSString *type;
+@property (nonatomic, retain) NSColor *scriptingColor;
+@property (nonatomic, retain) NSColor *scriptingInteriorColor;
+@property (nonatomic) CGFloat lineWidth;
+@property (nonatomic) PDFBorderStyle scriptingBorderStyle;
+@property (nonatomic, retain) NSArray *dashPattern;
+@property (nonatomic) PDFLineStyle scriptingStartLineStyle, 
scriptingEndLineStyle;
+@property (nonatomic, retain) NSString *fontName;
+@property (nonatomic) CGFloat fontSize;
+@property (nonatomic, retain) NSColor *scriptingFontColor;
+@property (nonatomic) NSTextAlignment scriptingAlignment;
+@property (nonatomic) PDFTextAnnotationIconType scriptingIconType;
+@property (nonatomic, retain) NSDictionary *scriptingProperties;
+
+- (id)initWithType:(NSString *)aType;
+
+@end

Added: trunk/SKNotePrefs.m
===================================================================
--- trunk/SKNotePrefs.m                         (rev 0)
+++ trunk/SKNotePrefs.m 2021-12-03 17:00:32 UTC (rev 12600)
@@ -0,0 +1,255 @@
+//
+//  SKNotePrefs.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 03/12/2021.
+/*
+ This software is Copyright (c) 2021
+ Christiaan Hofman. All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ 
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKNotePrefs.h"
+#import "SKStringConstants.h"
+#import <SkimNotes/SkimNotes.h>
+#import "NSUserDefaults_SKExtensions.h"
+
+@implementation SKNotePrefs
+
+@synthesize type;
+@dynamic scriptingColor, scriptingInteriorColor, lineWidth, 
scriptingBorderStyle, dashPattern, scriptingStartLineStyle, 
scriptingEndLineStyle, fontName, fontSize, scriptingFontColor, 
scriptingAlignment, scriptingIconType, scriptingProperties;
+
+static NSDictionary *colorKeys = nil;
+static NSDictionary *interiorColorKeys = nil;
+static NSDictionary *lineWidthKeys = nil;
+static NSDictionary *lineStyleKeys = nil;
+static NSDictionary *dashPatternKeys = nil;
+static NSDictionary *propertyKeys = nil;
+
++ (void)initialize {
+    SKINITIALIZE;
+    colorKeys = [[NSDictionary alloc] 
initWithObjectsAndKeys:SKFreeTextNoteColorKey, SKNFreeTextString, 
SKAnchoredNoteColorKey, SKNNoteString, SKCircleNoteColorKey, SKNCircleString, 
SKSquareNoteColorKey, SKNSquareString, SKHighlightNoteColorKey, 
SKNHighlightString, SKUnderlineNoteColorKey, SKNUnderlineString, 
SKStrikeOutNoteColorKey, SKNStrikeOutString, SKLineNoteColorKey, SKNLineString, 
SKInkNoteColorKey, SKNInkString, nil];
+    interiorColorKeys = [[NSDictionary alloc] 
initWithObjectsAndKeys:SKCircleNoteInteriorColorKey, SKNCircleString, 
SKSquareNoteInteriorColorKey, SKNSquareString, SKLineNoteInteriorColorKey, 
SKNLineString, nil];
+    lineWidthKeys = [[NSDictionary alloc] 
initWithObjectsAndKeys:SKFreeTextNoteLineWidthKey, SKNFreeTextString, 
SKCircleNoteLineWidthKey, SKNCircleString, SKSquareNoteLineWidthKey, 
SKNSquareString, SKLineNoteLineWidthKey, SKNLineString, SKInkNoteLineWidthKey, 
SKNInkString, nil];
+    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 = [NSArray arrayWithObjects:@"scriptingColor", 
@"lineWidth", @"scriptingBorderStyle", @"dashPattern", @"fontName", 
@"fontSize", @"scriptingFontColor", @"scriptingAlignment", nil];
+    [dict setObject:array forKey:SKNFreeTextString];
+    array = [NSArray arrayWithObjects:@"scriptingColor", @"fontName", 
@"fontSize", @"scriptingIconType", nil];
+    [dict setObject:array forKey:SKNNoteString];
+    array = [NSArray arrayWithObjects:@"scriptingColor", 
@"scriptingInteriorColor", @"lineWidth", @"scriptingBorderStyle", 
@"dashPattern", nil];
+    [dict setObject:array forKey:SKNCircleString];
+    [dict setObject:array forKey:SKNSquareString];
+    array = [NSArray arrayWithObjects:@"scriptingColor", nil];
+    [dict setObject:array forKey:SKNHighlightString];
+    [dict setObject:array forKey:SKNUnderlineString];
+    [dict setObject:array forKey:SKNStrikeOutString];
+    array = [NSArray arrayWithObjects:@"scriptingColor", 
@"scriptingInteriorColor", @"lineWidth", @"scriptingBorderStyle", 
@"dashPattern", @"scriptingStartLineStyle", @"scriptingEndLineStyle", nil];
+    [dict setObject:array forKey:SKNLineString];
+    array = [NSArray arrayWithObjects:@"scriptingColor", @"lineWidth", 
@"scriptingBorderStyle", @"dashPattern", nil];
+    [dict setObject:array forKey:SKNInkString];
+    propertyKeys = [dict copy];
+}
+
+- (id)initWithType:(NSString *)aType {
+    if (aType == nil || [propertyKeys objectForKey:aType] == nil) {
+        [self release];
+        self = nil;
+    } else {
+        self = [super init];
+        if (self) {
+            type = [aType retain];
+        }
+    }
+    return self;
+}
+
+- (void)dealloc {
+    SKDESTROY(type);
+    [super dealloc];
+}
+
+- (NSScriptObjectSpecifier *)objectSpecifier {
+    NSScriptClassDescription *containerClassDescription = 
[NSScriptClassDescription classDescriptionForClass:[NSApp class]];
+    return [[[NSNameSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:nil key:@"notePreferences" name:[self type]] autorelease];
+}
+
+- (NSColor *)scriptingColor {
+    NSString *key = [colorKeys objectForKey:type];
+    return key ? [[NSUserDefaults standardUserDefaults] colorForKey:key] : nil;
+    
+}
+
+- (void)setScriptingColor:(NSColor *)color {
+    NSString *key = [colorKeys objectForKey:type];
+    if (key)
+        [[NSUserDefaults standardUserDefaults] setColor:color forKey:key];
+}
+
+- (NSColor *)scriptingInteriorColor {
+    NSString *key = [interiorColorKeys objectForKey:type];
+    return key ? [[NSUserDefaults standardUserDefaults] colorForKey:key] : nil;
+
+}
+
+- (void)setScriptingInteriorColor:(NSColor *)color {
+    NSString *key = [interiorColorKeys objectForKey:type];
+    if (key)
+        [[NSUserDefaults standardUserDefaults] setColor:color forKey:key];
+}
+
+- (CGFloat)lineWidth {
+    NSString *key = [lineWidthKeys objectForKey:type];
+    return key ? [[NSUserDefaults standardUserDefaults] doubleForKey:key] : 
0.0;
+}
+
+- (void)setLineWidth:(CGFloat)lineWidth {
+    NSString *key = [lineWidthKeys objectForKey:type];
+    if (key)
+        [[NSUserDefaults standardUserDefaults] setDouble:lineWidth forKey:key];
+}
+
+- (PDFBorderStyle)scriptingBorderStyle {
+    NSString *key = [lineStyleKeys objectForKey:type];
+    return key ? [[NSUserDefaults standardUserDefaults] integerForKey:key] : 0;
+}
+
+- (void)setScriptingBorderStyle:(PDFBorderStyle)borderStyle {
+    NSString *key = [lineStyleKeys objectForKey:type];
+    if (key)
+        [[NSUserDefaults standardUserDefaults] setInteger:borderStyle 
forKey:key];
+}
+
+- (NSArray *)dashPattern {
+    NSString *key = [dashPatternKeys objectForKey:type];
+    return key ? [[NSUserDefaults standardUserDefaults] arrayForKey:key] : nil;
+}
+
+- (void)setDashPattern:(NSArray *)dashPattern {
+    NSString *key = [dashPatternKeys objectForKey:type];
+    if (key)
+        [[NSUserDefaults standardUserDefaults] setObject:dashPattern 
forKey:key];
+}
+
+- (PDFLineStyle)scriptingStartLineStyle {
+    if ([type isEqualToString:SKNLineString])
+        return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteStartLineStyleKey];
+    return 0;
+}
+
+- (void)setScriptingStartLineStyle:(PDFLineStyle)lineStyle {
+    if ([type isEqualToString:SKNLineString])
+        [[NSUserDefaults standardUserDefaults] setInteger:lineStyle 
forKey:SKLineNoteStartLineStyleKey];
+}
+
+- (PDFLineStyle)scriptingEndLineStyle {
+    if ([type isEqualToString:SKNLineString])
+        return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteEndLineStyleKey];
+    return 0;
+}
+
+- (void)setScriptingEndLineStyle:(PDFLineStyle)lineStyle {
+    if ([type isEqualToString:SKNLineString])
+        [[NSUserDefaults standardUserDefaults] setInteger:lineStyle 
forKey:SKLineNoteEndLineStyleKey];
+}
+
+- (NSString *)fontName {
+    if ([type isEqualToString:SKNFreeTextString])
+        return [[NSUserDefaults standardUserDefaults] 
objectForKey:SKFreeTextNoteFontNameKey];
+    else if ([type isEqualToString:SKNNoteString])
+        return [[NSUserDefaults standardUserDefaults] 
objectForKey:SKAnchoredNoteFontNameKey];
+    return nil;
+}
+
+- (void)setFontName:(NSString *)fontName {
+    if ([type isEqualToString:SKNFreeTextString])
+        [[NSUserDefaults standardUserDefaults] setObject:fontName 
forKey:SKFreeTextNoteFontNameKey];
+    else if ([type isEqualToString:SKNNoteString])
+        [[NSUserDefaults standardUserDefaults] setObject:fontName 
forKey:SKAnchoredNoteFontNameKey];
+}
+
+- (CGFloat)fontSize {
+    if ([type isEqualToString:SKNFreeTextString])
+        return [[NSUserDefaults standardUserDefaults] 
doubleForKey:SKFreeTextNoteFontSizeKey];
+    else if ([type isEqualToString:SKNNoteString])
+        return [[NSUserDefaults standardUserDefaults] 
doubleForKey:SKAnchoredNoteFontSizeKey];
+    return 0.0;
+}
+
+- (void)setFontSize:(CGFloat)fontSize {
+    if ([type isEqualToString:SKNFreeTextString])
+        [[NSUserDefaults standardUserDefaults] setDouble:fontSize 
forKey:SKFreeTextNoteFontSizeKey];
+    else if ([type isEqualToString:SKNNoteString])
+        [[NSUserDefaults standardUserDefaults] setDouble:fontSize 
forKey:SKAnchoredNoteFontSizeKey];
+}
+
+- (NSTextAlignment)scriptingAlignment {
+    if ([type isEqualToString:SKNFreeTextString])
+        return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKFreeTextNoteAlignmentKey];
+    return 0;
+}
+
+- (void)setScriptingAlignment:(NSTextAlignment)alignment {
+    if ([type isEqualToString:SKNFreeTextString])
+        [[NSUserDefaults standardUserDefaults] setInteger:alignment 
forKey:SKFreeTextNoteAlignmentKey];
+}
+
+- (NSColor *)scriptingFontColor {
+    if ([type isEqualToString:SKNFreeTextString])
+        return [[NSUserDefaults standardUserDefaults] 
colorForKey:SKFreeTextNoteFontColorKey];
+    return nil;
+}
+
+- (void)setScriptingFontColor:(NSColor *)color {
+    if ([type isEqualToString:SKNFreeTextString])
+        [[NSUserDefaults standardUserDefaults] setColor:color 
forKey:SKFreeTextNoteFontColorKey];
+}
+
+- (PDFTextAnnotationIconType)scriptingIconType {
+    if ([type isEqualToString:SKNNoteString])
+        [[NSUserDefaults standardUserDefaults] 
integerForKey:SKAnchoredNoteIconTypeKey];
+    return 0;
+}
+
+- (void)setScriptingIconType:(PDFTextAnnotationIconType)iconType {
+    if ([type isEqualToString:SKNNoteString])
+        [[NSUserDefaults standardUserDefaults] setInteger:iconType 
forKey:SKAnchoredNoteIconTypeKey];
+}
+
+- (NSDictionary *)scriptingProperties {
+    return [self dictionaryWithValuesForKeys:[propertyKeys objectForKey:type]];
+}
+
+- (void)setScriptingProperties:(NSDictionary *)scriptingProperties {
+    [self setValuesForKeysWithDictionary:scriptingProperties];
+}
+
+@end

Added: trunk/SKPreferencesCommand.h
===================================================================
--- trunk/SKPreferencesCommand.h                                (rev 0)
+++ trunk/SKPreferencesCommand.h        2021-12-03 17:00:32 UTC (rev 12600)
@@ -0,0 +1,43 @@
+//
+//  SKPreferencesCommand.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 03/12/2021.
+/*
+ This software is Copyright (c) 2021
+ Christiaan Hofman. All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ 
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface SKPreferencesCommand : NSScriptCommand
+@end

Added: trunk/SKPreferencesCommand.m
===================================================================
--- trunk/SKPreferencesCommand.m                                (rev 0)
+++ trunk/SKPreferencesCommand.m        2021-12-03 17:00:32 UTC (rev 12600)
@@ -0,0 +1,51 @@
+//
+//  SKPreferencesCommand.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 03/12/2021.
+/*
+ This software is Copyright (c) 2021
+ Christiaan Hofman. All rights reserved.
+ 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+ 
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKPreferencesCommand.h"
+#import "SKNotePrefs.h"
+
+@implementation SKPreferencesCommand
+
+- (id)performDefaultImplementation {
+    id dPO = [self directParameter];
+    if ([dPO isKindOfClass:[NSString class]])
+        return [[[SKNotePrefs alloc] initWithType:dPO] autorelease];
+    return nil;
+}
+
+@end

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2021-12-03 14:51:49 UTC (rev 12599)
+++ trunk/Skim.sdef     2021-12-03 17:00:32 UTC (rev 12600)
@@ -836,6 +836,18 @@
             </direct-parameter>
         </command>
 
+        <command name="preferences for" code="SKIMPref"
+            description="Get preferences for a note type.">
+            <cocoa class="SKPreferencesCommand"/>
+            <direct-parameter type="note type"
+                description="The note type for which to get the preferences.">
+            </direct-parameter>
+            <result
+                description="The preferences for the note type.">
+                <type type="note preferences"/>
+            </result>
+        </command>
+
         <class-extension extends="item" hidden="yes"
             description="A scriptable object.">
             <cocoa class="NSObject"/>
@@ -856,6 +868,10 @@
                 description="The downloads.">
                 <cocoa key="downloads" insert-at-beginning="no"/>
             </element>
+            <element type="note preferences" access="r"
+                description="Note preferences.">
+                <cocoa key="notePreferences"/>
+            </element>
             <element type="TeX line" access="r" hidden="yes"
                 description="TeX lines.">
                 <cocoa key="texLines"/>
@@ -884,59 +900,15 @@
                 description="The default page background color.">
                 <cocoa key="pageBackgroundColor"/>
             </property>
-            <property name="default note colors" type="note colors" code="DNtC"
-                description="The default colors used for new notes.">
-                <cocoa key="defaultNoteColors"/>
+            <property name="sepia tone" type="real" code="SepT"
+                description="Intensity of a sepia tone effect applied to the 
PDF content.">
+                <cocoa key="sepiaTone"/>
             </property>
-            <property name="default note line widths" type="note line widths" 
code="DNtW"
-                description="The default line width used for new notes.">
-                <cocoa key="defaultLineWidths"/>
-            </property>
-            <property name="default note line styles" type="note line styles" 
code="DNtS"
-                description="The default line styles used for new notes.">
-                <cocoa key="defaultLineStyles"/>
-            </property>
-            <property name="default note dash patterns" type="note dash 
patterns" code="DNtD"
-                description="The default dash patterns used for new notes.">
-                <cocoa key="defaultDashPatterns"/>
-            </property>
-            <property name="default note start line style" type="line ending 
style" code="DNSL"
-                description="The default start line style used for new lines.">
-                <cocoa key="defaultStartLineStyle"/>
-            </property>
-            <property name="default note end line style" type="line ending 
style" code="DNEL"
-                description="The default end line style used for new lines.">
-                <cocoa key="defaultEndLineStyle"/>
-            </property>
-            <property name="default note font names" type="note font names" 
code="DNFN"
-                description="The default font names used for new notes.">
-                <cocoa key="defaultFontNames"/>
-            </property>
-            <property name="default note font sizes" type="note font sizes" 
code="DNFS"
-                description="The default font sizes used for new notes.">
-                <cocoa key="defaultFontSizes"/>
-            </property>
-            <property name="default text note font color" type="RGBA color" 
code="DNFC"
-                description="The default font color used for new text notes.">
-                <cocoa key="defaultTextNoteFontColor"/>
-            </property>
-            <property name="default text note alignment" type="text alignment" 
code="DNAl"
-                description="The default alignment used for new text notes.">
-                <cocoa key="defaultAlignment"/>
-            </property>
-            <property name="default note icon type" type="icon type" 
code="DNtI"
-                description="The default icon type used for new anchored 
notes.">
-                <cocoa key="defaultIconType"/>
-            </property>
             <property name="favorite colors" code="FavC"
                 description="List of favorite colors.">
                 <type type="RGBA color" list="yes"/>
                 <cocoa key="favoriteColors"/>
             </property>
-            <property name="sepia tone" type="real" code="SepT"
-                description="Intensity of a sepia tone effect applied to the 
PDF content.">
-                <cocoa key="sepiaTone"/>
-            </property>
         </class-extension>
 
         <class-extension extends="document"
@@ -1239,7 +1211,16 @@
                 <cocoa method=""/>
             </responds-to>
         </class>
-        
+
+        <class name="note preferences" plural="note preferences" code="NPrf" 
inherits="note"
+            description="An object containing preference values for a note 
type. Inherits its properties from the note class.">
+            <cocoa class="SKNotePrefs"/>
+            <property name="name" code="pnam" type="text" access="r" 
hidden="yes"
+                description="Name of the note preferences.">
+                <cocoa key="type"/>
+            </property>
+        </class>
+
         <class name="outline" plural="outlines" code="Outl"
             description="An outline item in the table of contents.">
             <cocoa class="PDFOutline"/>
@@ -1473,157 +1454,6 @@
             </property>
         </record-type>
 
-        <record-type name="note colors" code="NClr">
-            <property name="text note color" code="CTxt" type="RGBA color"
-                description="Default text note color.">
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="anchored note color" code="CAnc" type="RGBA color"
-                description="Default anchored note color.">
-                <cocoa key="Note"/>
-            </property>
-            <property name="circle note color" code="CCir" type="RGBA color"
-                description="Default circle color.">
-                <cocoa key="Circle"/>
-            </property>
-            <property name="box note color" code="CSqu" type="RGBA color"
-                description="Default box color.">
-                <cocoa key="Square"/>
-            </property>
-            <property name="highlight note color" code="CHil" type="RGBA color"
-                description="Default highlight color.">
-                <cocoa key="Highlight"/>
-            </property>
-            <property name="underline note color" code="CUnd" type="RGBA color"
-                description="Default underline highlight color.">
-                <cocoa key="Underline"/>
-            </property>
-            <property name="strike out note color" code="CStr" type="RGBA 
color"
-                description="Default strike out highlight color.">
-                <cocoa key="StrikeOut"/>
-            </property>
-            <property name="line note color" code="CLin" type="RGBA color"
-                description="Default line color.">
-                <cocoa key="Line"/>
-            </property>
-            <property name="freehand note color" code="CInk" type="RGBA color"
-                description="Default freehand color.">
-                <cocoa key="Ink"/>
-            </property>
-            <property name="circle note interior color" code="CCiI" type="RGBA 
color"
-                description="Default circle fill color.">
-                <cocoa key="CircleInterior"/>
-            </property>
-            <property name="box note interior color" code="CSqI" type="RGBA 
color"
-                description="Default box fill color.">
-                <cocoa key="SquareInterior"/>
-            </property>
-            <property name="line note interior color" code="CLiI" type="RGBA 
color"
-                description="Default line fill color.">
-                <cocoa key="LineInterior"/>
-            </property>
-            <property name="text note font color" code="CTxF" type="RGBA color"
-                description="Default text note font color.">
-                <cocoa key="FreeTextFont"/>
-            </property>
-        </record-type>
-
-        <record-type name="note line widths" code="NLWd">
-            <property name="text note line width" code="WTxt" type="real"
-                description="Default text note line width.">
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="circle note line width" code="WCir" type="real"
-                description="Default circle line width.">
-                <cocoa key="Circle"/>
-            </property>
-            <property name="box note line width" code="WSqu" type="real"
-                description="Default box line width.">
-                <cocoa key="Square"/>
-            </property>
-            <property name="line note line width" code="WLin" type="real"
-                description="Default line line width.">
-                <cocoa key="Line"/>
-            </property>
-            <property name="freehand note line width" code="WInk" type="real"
-                description="Default freehand line width.">
-                <cocoa key="Ink"/>
-            </property>
-        </record-type>
-
-        <record-type name="note line styles" code="NLSt">
-            <property name="text note line style" code="STxt" type="note line 
style"
-                description="Default text note line width.">
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="circle note line style" code="SCir" type="note 
line style"
-                description="Default circle line width.">
-                <cocoa key="Circle"/>
-            </property>
-            <property name="box note line style" code="SSqu" type="note line 
style"
-                description="Default box line width.">
-                <cocoa key="Square"/>
-            </property>
-            <property name="line note line style" code="SLin" type="note line 
style"
-                description="Default line line width.">
-                <cocoa key="Line"/>
-            </property>
-            <property name="freehand note line style" code="SInk" type="note 
line style"
-                description="Default freehand line width.">
-                <cocoa key="Ink"/>
-            </property>
-        </record-type>
-
-        <record-type name="note dash patterns" code="NDsh">
-            <property name="text note dash pattern" code="DTxt"
-                description="Default text note dash pattern.">
-                <type type="real" list="yes"/>
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="circle note dash pattern" code="DCir"
-                description="Default circle dash pattern.">
-                <type type="real" list="yes"/>
-                <cocoa key="Circle"/>
-            </property>
-            <property name="box note dash pattern" code="DSqu"
-                description="Default box dash pattern.">
-                <type type="real" list="yes"/>
-                <cocoa key="Square"/>
-            </property>
-            <property name="line note dash pattern" code="DLin"
-                description="Default line dash pattern.">
-                <type type="real" list="yes"/>
-                <cocoa key="Line"/>
-            </property>
-            <property name="freehand note dash pattern" code="DInk"
-                description="Default freehand dash pattern.">
-                <type type="real" list="yes"/>
-                <cocoa key="Ink"/>
-            </property>
-        </record-type>
-
-        <record-type name="note font names" code="NDFN">
-            <property name="text note font name" code="FNTx" type="text"
-                description="Default text note font name.">
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="anchored note font name" code="FNAn" type="text"
-                description="Default anchored note font name.">
-                <cocoa key="Note"/>
-            </property>
-        </record-type>
-
-        <record-type name="note font sizes" code="NDFS">
-            <property name="text note font size" code="FSTx" type="integer"
-                description="Default text note font size.">
-                <cocoa key="FreeText"/>
-            </property>
-            <property name="anchored note font size" code="FSAn" type="integer"
-                description="Default anchored note font size.">
-                <cocoa key="Note"/>
-            </property>
-        </record-type>
-
         <value-type name="PDF" code="PDF ">
             <cocoa class="NSData"/>
         </value-type>

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2021-12-03 14:51:49 UTC (rev 
12599)
+++ trunk/Skim.xcodeproj/project.pbxproj        2021-12-03 17:00:32 UTC (rev 
12600)
@@ -237,6 +237,8 @@
                CEB402C313EDAD6100851D1B /* SKTemporaryData.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CEB402C213EDAD6100851D1B /* SKTemporaryData.m 
*/; };
                CEB735A20C4A8CD6000350F9 /* TransitionShading.tiff in Resources 
*/ = {isa = PBXBuildFile; fileRef = CEB735A10C4A8CD6000350F9 /* 
TransitionShading.tiff */; };
                CEBD52ED0C9C0AE500FBF6A4 /* SKBookmark.m in Sources */ = {isa = 
PBXBuildFile; fileRef = CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */; };
+               CEC29533275A66A2000F2D4C /* SKNotePrefs.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CEC29532275A66A2000F2D4C /* SKNotePrefs.m */; };
+               CEC29536275A7D58000F2D4C /* SKPreferencesCommand.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CEC29535275A7D58000F2D4C /* 
SKPreferencesCommand.m */; };
                CEC3AD240E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CEC3AD230E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.m */; };
                CECB03D30DC7503A0000B16B /* SKGroupedSearchResult.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CECB03D20DC7503A0000B16B /* 
SKGroupedSearchResult.m */; };
                CECDC4FF0C5966A80026AAEC /* NSImage_SKExtensions.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CECDC4FD0C5966A80026AAEC /* 
NSImage_SKExtensions.m */; };
@@ -1079,6 +1081,10 @@
                CEB735A10C4A8CD6000350F9 /* TransitionShading.tiff */ = {isa = 
PBXFileReference; lastKnownFileType = image.tiff; path = 
TransitionShading.tiff; sourceTree = "<group>"; };
                CEBD52EA0C9C0AE500FBF6A4 /* SKBookmark.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKBookmark.h; sourceTree = "<group>"; };
                CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SKBookmark.m; sourceTree = "<group>"; };
+               CEC29531275A66A2000F2D4C /* SKNotePrefs.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKNotePrefs.h; 
sourceTree = "<group>"; };
+               CEC29532275A66A2000F2D4C /* SKNotePrefs.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SKNotePrefs.m; 
sourceTree = "<group>"; };
+               CEC29534275A7D58000F2D4C /* SKPreferencesCommand.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
SKPreferencesCommand.h; sourceTree = "<group>"; };
+               CEC29535275A7D58000F2D4C /* SKPreferencesCommand.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
SKPreferencesCommand.m; sourceTree = "<group>"; };
                CEC3AD220E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = PDFAnnotationLink_SKExtensions.h; sourceTree = 
"<group>"; };
                CEC3AD230E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = PDFAnnotationLink_SKExtensions.m; sourceTree = 
"<group>"; };
                CEC4C33F0CA90CA200299397 /* es */ = {isa = PBXFileReference; 
lastKnownFileType = text.rtf; name = es; path = es.lproj/Credits.rtf; 
sourceTree = "<group>"; };
@@ -1857,6 +1863,8 @@
                                CEDE68E3201FDCB4000D881A /* SKKeychain.m */,
                                CE099661112577A000EDB88F /* SKNotesPage.h */,
                                CE099662112577A000EDB88F /* SKNotesPage.m */,
+                               CEC29531275A66A2000F2D4C /* SKNotePrefs.h */,
+                               CEC29532275A66A2000F2D4C /* SKNotePrefs.m */,
                                CEAA8F2C0EA2A86200C16FE4 /* SKNoteText.h */,
                                CEAA8F2D0EA2A86200C16FE4 /* SKNoteText.m */,
                                CE5BB0CD10515CCC00161B87 /* SKPDFDocument.h */,
@@ -1937,6 +1945,8 @@
                                CE4643CE0DF6B5A400CFD8D2 /* SKJoinCommand.m */,
                                CE4643D30DF6B60500CFD8D2 /* SKPagesCommand.h */,
                                CE4643D40DF6B60500CFD8D2 /* SKPagesCommand.m */,
+                               CEC29534275A7D58000F2D4C /* 
SKPreferencesCommand.h */,
+                               CEC29535275A7D58000F2D4C /* 
SKPreferencesCommand.m */,
                                CE12A73C134F215F003AED67 /* SKSelectCommand.h 
*/,
                                CE12A73D134F215F003AED67 /* SKSelectCommand.m 
*/,
                                CECE6C3D2188AE9A00F6179D /* 
SKSelectionCommand.h */,
@@ -2706,6 +2716,7 @@
                                CE5BEA190C7C635400EBDCF7 /* 
NSGeometry_SKExtensions.m in Sources */,
                                CE792F74226D12C40005BE9F /* SKLevelIndicator.m 
in Sources */,
                                CE5BF8010C7CBF6300EBDCF7 /* SKTableView.m in 
Sources */,
+                               CEC29533275A66A2000F2D4C /* SKNotePrefs.m in 
Sources */,
                                CE5BF8430C7CC24A00EBDCF7 /* SKOutlineView.m in 
Sources */,
                                CE5FA1680C909886008BE480 /* SKFDFParser.m in 
Sources */,
                                CEA182280C92E3300061A6D4 /* 
NSData_SKExtensions.m in Sources */,
@@ -2755,6 +2766,7 @@
                                CEC3AD240E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.m in Sources */,
                                CE3364310E2761E9005F99E6 /* synctex_parser.m in 
Sources */,
                                CE3366DF0E28BCFA005F99E6 /* SKPDFSyncRecord.m 
in Sources */,
+                               CEC29536275A7D58000F2D4C /* 
SKPreferencesCommand.m in Sources */,
                                CE09FC3C0E3886C100BDF413 /* SKRuntime.m in 
Sources */,
                                CEEE7C520E7D3F2000B7B208 /* 
PDFAnnotationInk_SKExtensions.m in Sources */,
                                CE05A7380E9024ED0060BB07 /* 
SKPresentationOptionsSheetController.m in Sources */,

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to