Browse Source

【偏好设置】SKNotesPreferences OC转Swift

tangchao 1 year ago
parent
commit
cbd83d963b

+ 8 - 10
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -2441,9 +2441,6 @@
 		BB65A0542AF8B90F003A27A0 /* KMDisplayPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0532AF8B90F003A27A0 /* KMDisplayPreferences.swift */; };
 		BB65A0552AF8B90F003A27A0 /* KMDisplayPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0532AF8B90F003A27A0 /* KMDisplayPreferences.swift */; };
 		BB65A0562AF8B90F003A27A0 /* KMDisplayPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0532AF8B90F003A27A0 /* KMDisplayPreferences.swift */; };
-		BB65A0592AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0582AF8BEEB003A27A0 /* SKNotesPreferences.m */; };
-		BB65A05A2AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0582AF8BEEB003A27A0 /* SKNotesPreferences.m */; };
-		BB65A05B2AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0582AF8BEEB003A27A0 /* SKNotesPreferences.m */; };
 		BB65A05D2AF8BF2A003A27A0 /* NotesPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB65A05C2AF8BF2A003A27A0 /* NotesPreferences.xib */; };
 		BB65A05E2AF8BF2A003A27A0 /* NotesPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB65A05C2AF8BF2A003A27A0 /* NotesPreferences.xib */; };
 		BB65A05F2AF8BF2A003A27A0 /* NotesPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB65A05C2AF8BF2A003A27A0 /* NotesPreferences.xib */; };
@@ -2453,6 +2450,9 @@
 		BB65A0672AF8C2BF003A27A0 /* SKFontWell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0662AF8C2BF003A27A0 /* SKFontWell.m */; };
 		BB65A0682AF8C2BF003A27A0 /* SKFontWell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0662AF8C2BF003A27A0 /* SKFontWell.m */; };
 		BB65A0692AF8C2BF003A27A0 /* SKFontWell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB65A0662AF8C2BF003A27A0 /* SKFontWell.m */; };
+		BB65A06B2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A06A2AF8D8A1003A27A0 /* KMNotesPreferences.swift */; };
+		BB65A06C2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A06A2AF8D8A1003A27A0 /* KMNotesPreferences.swift */; };
+		BB65A06D2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB65A06A2AF8D8A1003A27A0 /* KMNotesPreferences.swift */; };
 		BB6719E52AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
 		BB6719E62AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
 		BB6719E72AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */; };
@@ -4469,13 +4469,12 @@
 		BB65A0462AF893DD003A27A0 /* SKGeneralPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SKGeneralPreferences.swift; sourceTree = "<group>"; };
 		BB65A04F2AF8B64B003A27A0 /* DisplayPreferences.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DisplayPreferences.xib; sourceTree = "<group>"; };
 		BB65A0532AF8B90F003A27A0 /* KMDisplayPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMDisplayPreferences.swift; sourceTree = "<group>"; };
-		BB65A0572AF8BEE8003A27A0 /* SKNotesPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKNotesPreferences.h; sourceTree = "<group>"; };
-		BB65A0582AF8BEEB003A27A0 /* SKNotesPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKNotesPreferences.m; sourceTree = "<group>"; };
 		BB65A05C2AF8BF2A003A27A0 /* NotesPreferences.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NotesPreferences.xib; sourceTree = "<group>"; };
 		BB65A0602AF8C27B003A27A0 /* SKLineWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKLineWell.m; sourceTree = "<group>"; };
 		BB65A0612AF8C27B003A27A0 /* SKLineWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKLineWell.h; sourceTree = "<group>"; };
 		BB65A0652AF8C2BE003A27A0 /* SKFontWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKFontWell.h; sourceTree = "<group>"; };
 		BB65A0662AF8C2BF003A27A0 /* SKFontWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKFontWell.m; sourceTree = "<group>"; };
+		BB65A06A2AF8D8A1003A27A0 /* KMNotesPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMNotesPreferences.swift; sourceTree = "<group>"; };
 		BB6719E42AD28527003D44D5 /* CPDFLineAnnotation+PDFListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFLineAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
 		BB6719E82AD2A57C003D44D5 /* CPDFLinkAnnotation+PDFListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFLinkAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
 		BB6719F42AD2C949003D44D5 /* CPDFRedactAnnotation+PDFListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CPDFRedactAnnotation+PDFListView.swift"; sourceTree = "<group>"; };
@@ -7134,8 +7133,7 @@
 			isa = PBXGroup;
 			children = (
 				BB65A05C2AF8BF2A003A27A0 /* NotesPreferences.xib */,
-				BB65A0572AF8BEE8003A27A0 /* SKNotesPreferences.h */,
-				BB65A0582AF8BEEB003A27A0 /* SKNotesPreferences.m */,
+				BB65A06A2AF8D8A1003A27A0 /* KMNotesPreferences.swift */,
 				BB65A04F2AF8B64B003A27A0 /* DisplayPreferences.xib */,
 				BB65A0532AF8B90F003A27A0 /* KMDisplayPreferences.swift */,
 				BB65A03D2AF8863E003A27A0 /* GeneralPreferences.xib */,
@@ -10604,7 +10602,6 @@
 				89752E042939DB42003FF08E /* KMToolbarViewController.swift in Sources */,
 				BB146FD5299DC0D100784A6A /* GTLRObject.m in Sources */,
 				8942F7F02926087200389627 /* KMSearchViewController.swift in Sources */,
-				BB65A0592AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */,
 				BB32BF232A5EA05900D11348 /* KMAnalytics.swift in Sources */,
 				ADE787A22AA5A833002EC85A /* KMAccountExceptionWindowController.swift in Sources */,
 				9F1FE4AE29406E4700E952CA /* CTPresentationModeController.m in Sources */,
@@ -10970,6 +10967,7 @@
 				F3599173292B62F5000D25DE /* CStringConstants.m in Sources */,
 				9F0CB4D92986553600007028 /* KMDesignToken+VerticalPadding.swift in Sources */,
 				9FF94F1929A770B500B1EF69 /* KMFillSignShapePanel.swift in Sources */,
+				BB65A06B2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */,
 				89752DF229389F82003FF08E /* KMToolbarItem.m in Sources */,
 				BB35C49F2975362900D46EE2 /* KMRedactTopToolBar.swift in Sources */,
 				BB49ECE9293F32A400C82CA2 /* KMConvertWordSettingView.swift in Sources */,
@@ -11403,6 +11401,7 @@
 				BBC3481D295593F0008D2CD1 /* KMBackgroundListController.swift in Sources */,
 				9F5664882988B16F00020985 /* KMTextfieldVC.swift in Sources */,
 				89D2D2FC294C806000BFF5FE /* KMPDFThumbnailItem.swift in Sources */,
+				BB65A06C2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */,
 				9F0CB4EA2986559400007028 /* KMDesignToken+PaddingBottom.swift in Sources */,
 				9F1FE4AF29406E4700E952CA /* CTPresentationModeController.m in Sources */,
 				9F0CB4FA298655E500007028 /* KMDesignToken+Border.swift in Sources */,
@@ -11653,7 +11652,6 @@
 				ADE3C1AC29A4779E00793B13 /* KMPrintAccessoryController.swift in Sources */,
 				BBD7FE082A13241C00F96075 /* KMOutlineEditViewController.swift in Sources */,
 				BB8F4558295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.swift in Sources */,
-				BB65A05A2AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */,
 				AD88108E29A760D100178CA1 /* KMRegisterPresenter.swift in Sources */,
 				BB146FB5299DC0D100784A6A /* GTLRUtilities.m in Sources */,
 				BBC745F8296178BD0072C2ED /* KMCropTools.swift in Sources */,
@@ -11835,6 +11833,7 @@
 			files = (
 				BBC745F9296178BD0072C2ED /* KMCropTools.swift in Sources */,
 				ADBC2D21299CDA29006280C8 /* NSView+Layer.swift in Sources */,
+				BB65A06D2AF8D8A1003A27A0 /* KMNotesPreferences.swift in Sources */,
 				BB003028298CF7EC002DD1A0 /* KMPreferenceDisplayController.swift in Sources */,
 				9F0CB48929683DC400007028 /* KMPropertiesPanelPresetColorSubVC.swift in Sources */,
 				BB99ACC4292DE22E0048AFD9 /* KMMergeViewController.swift in Sources */,
@@ -11997,7 +11996,6 @@
 				BBA8B7AC2935DC120097D183 /* KMRemovePasswordResultTipView.swift in Sources */,
 				BB146FDD299DC0D100784A6A /* GTLRDriveService.m in Sources */,
 				AD8810AB29A8463600178CA1 /* KMAccountInfoWindowController.swift in Sources */,
-				BB65A05B2AF8BEEC003A27A0 /* SKNotesPreferences.m in Sources */,
 				BBC3480E29558DC1008D2CD1 /* KMBackgroundController.swift in Sources */,
 				9F0CB4F7298655D500007028 /* KMDesignToken+Fill.swift in Sources */,
 				BB49ED1F293F4FB200C82CA2 /* KMConvertPPTsSettingView.swift in Sources */,

+ 151 - 0
PDF Office/PDF Master/Class/Preference/Controller/KMNotesPreferences.swift

@@ -0,0 +1,151 @@
+//
+//  KMNotesPreferences.swift
+//  PDF Master
+//
+//  Created by tangchao on 2023/11/6.
+//
+
+import Cocoa
+
+class KMNotesPreferences: NSViewController {
+
+   /*
+    @interface SKNotesPreferences : NSViewController <SKPreferencePane> {
+        NSArray *labels1;
+        NSArray *colorLabels2;
+        NSArray *colorLabels3;
+        NSArray *lineLabels2;
+        NSArray *colorWells1;
+        NSArray *colorWells2;
+        NSArray *colorWells3;
+    //    NSArray *fontWells;
+        NSArray *lineWells1;
+        NSArray *lineWells2;
+    }
+
+    // fontWells
+    @property (nonatomic, retain) IBOutlet NSArray *labels1, *colorLabels2, *colorLabels3, *lineLabels2, *colorWells1, *colorWells2, *colorWells3, *lineWells1, *lineWells2;
+
+    */
+    
+    @IBOutlet var fontWell1: SKFontWell!
+    @IBOutlet var fontWell2: SKFontWell!
+    
+    override var nibName: NSNib.Name? {
+        return "NotesPreferences"
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+    }
+    
+    override var title: String? {
+        set {
+            super.title = newValue
+        }
+        get {
+            return KMLocalizedString("Annotate", "Preference pane label")
+        }
+    }
+    
+    override func loadView() {
+        super.loadView()
+        
+//        NSMutableArray * = [NSMutableArray array];
+        var controls: [NSView] = []
+//        CGFloat , dw1, dw2;
+        var dw: CGFloat = 0
+        var dw1: CGFloat = 0
+        var dw2: CGFloat = 0
+        
+//        [controls addObjectsFromArray:colorWells3];
+    //    dw = SKAutoSizeLabelFields(colorLabels3, controls, NO);
+        
+//        [controls addObjectsFromArray:colorWells2];
+//        [controls addObjectsFromArray:colorLabels3];
+    //    dw += SKAutoSizeLabelFields(colorLabels2, controls, NO);
+        
+//        [controls addObjectsFromArray:colorWells1];
+//        [controls addObjectsFromArray:colorLabels2];
+    //    [controls addObjectsFromArray:fontWells];
+//    [controls addObject:self.fontWell1];
+//    [controls addObject:self.fontWell2];
+//        [controls addObjectsFromArray:lineWells1];
+    //    dw += dw1 = SKAutoSizeLabelFields(labels1, controls, NO);
+        
+    //    dw2 = SKAutoSizeLabelFields(lineLabels2, lineWells2, NO);
+        
+    //    SKShiftAndResizeViews(fontWells, 0.0, dw - dw1);
+        
+    //    SKShiftAndResizeViews([lineLabels2 arrayByAddingObjectsFromArray:lineWells2], dw - dw2, 0.0);
+        
+    //    SKShiftAndResizeView([self view], 0.0, dw);
+        
+//        NSUserDefaultsController *sudc = [NSUserDefaultsController sharedUserDefaultsController];
+        
+//        SKLineWell *lineWell = [lineWells1 objectAtIndex:0];
+//        [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteLineWidthKey) options:nil];
+//        [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteDashPatternKey) options:nil];
+//        [lineWell setDisplayStyle:SKLineWellDisplayStyleRectangle];
+//
+//        lineWell = [lineWells2 objectAtIndex:0];
+//        [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteLineWidthKey) options:nil];
+//        [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteDashPatternKey) options:nil];
+//        [lineWell setDisplayStyle:SKLineWellDisplayStyleOval];
+//
+//        lineWell = [lineWells2 objectAtIndex:1];
+//        [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteLineWidthKey) options:nil];
+//        [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteDashPatternKey) options:nil];
+//        [lineWell setDisplayStyle:SKLineWellDisplayStyleRectangle];
+//
+//        lineWell = [lineWells1 objectAtIndex:1];
+//        [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteLineWidthKey) options:nil];
+//        [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteDashPatternKey) options:nil];
+//        [lineWell bind:SKLineWellStartLineStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteStartLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellEndLineStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteEndLineStyleKey) options:nil];
+//
+//        lineWell = [lineWells1 objectAtIndex:2];
+//        [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteLineWidthKey) options:nil];
+//        [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteLineStyleKey) options:nil];
+//        [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteDashPatternKey) options:nil];
+//        [lineWell setDisplayStyle:SKLineWellDisplayStyleSimpleLine];
+        
+//    let fontWell = self.fontWell1
+//        NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:NSUnarchiveFromDataTransformerName, NSValueTransformerNameBindingOption, nil];
+//        [fontWell setHasTextColor:YES];
+//        [fontWell bind:@"textColor" toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteFontColorKey) options:options];
+    }
+    
+    /*
+     @implementation SKNotesPreferences
+
+     @synthesize labels1, colorLabels2, colorLabels3, lineLabels2, colorWells1, colorWells2, colorWells3, lineWells1, lineWells2;
+
+     - (void)dealloc {
+     //    SKDESTROY(labels1);
+     //    SKDESTROY(colorLabels2);
+     //    SKDESTROY(colorLabels3);
+     //    SKDESTROY(lineLabels2);
+     //    SKDESTROY(colorWells1);
+     //    SKDESTROY(colorWells2);
+     //    SKDESTROY(colorWells3);
+     //    SKDESTROY(fontWells);
+     //    SKDESTROY(lineWells1);
+     //    SKDESTROY(lineWells2);
+     //    [super dealloc];
+     }
+
+     - (NSString *)nibName {
+         return @"";
+     }
+
+
+
+     */
+    
+}

+ 1 - 1
PDF Office/PDF Master/Class/Preference/Controller/NotesPreferences.xib

@@ -6,7 +6,7 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="SKNotesPreferences">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMNotesPreferences" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="colorLabels2" destination="170" id="174"/>
                 <outlet property="colorLabels3" destination="171" id="175"/>

+ 0 - 65
PDF Office/PDF Master/Class/Preference/Controller/SKNotesPreferences.h

@@ -1,65 +0,0 @@
-//
-//  SKNotesPreferences.h
-//  Skim
-//
-//  Created by Christiaan Hofman on 3/14/10.
-/*
- This software is Copyright (c) 2010-2018
- 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 "SKPreferenceController.h"
-//#import "SKViewController.h"
-
-@class SKFontWell;
-@interface SKNotesPreferences : NSViewController <SKPreferencePane> {
-    NSArray *labels1;
-    NSArray *colorLabels2;
-    NSArray *colorLabels3;
-    NSArray *lineLabels2;
-    NSArray *colorWells1;
-    NSArray *colorWells2;
-    NSArray *colorWells3;
-//    NSArray *fontWells;
-    NSArray *lineWells1;
-    NSArray *lineWells2;
-}
-
-// fontWells
-@property (nonatomic, retain) IBOutlet NSArray *labels1, *colorLabels2, *colorLabels3, *lineLabels2, *colorWells1, *colorWells2, *colorWells3, *lineWells1, *lineWells2;
-
-
-@property (weak) IBOutlet SKFontWell *fontWell1;
-@property (weak) IBOutlet SKFontWell *fontWell2;
-
-
-@end

+ 0 - 149
PDF Office/PDF Master/Class/Preference/Controller/SKNotesPreferences.m

@@ -1,149 +0,0 @@
-//
-//  SKNotesPreferences.m
-//  Skim
-//
-//  Created by Christiaan Hofman on 3/14/10.
-/*
- This software is Copyright (c) 2010-2018
- 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 "SKNotesPreferences.h"
-#import "SKPreferenceController.h"
-//#import "SKStringConstants.h"
-#import "SKLineWell.h"
-#import "SKFontWell.h"
-//#import "NSGraphics_SKExtensions.h"
-#import "NSImage_SKExtensions.h"
-//#import "NSShadow_SKExtensions.h"
-#import <PDF_Master-Swift.h>
-
-#define VALUES_KEY_PATH(key) [@"values." stringByAppendingString:key]
-
-@interface SKNotesPreferences ()
-
-@end
-
-@implementation SKNotesPreferences
-
-@synthesize labels1, colorLabels2, colorLabels3, lineLabels2, colorWells1, colorWells2, colorWells3, lineWells1, lineWells2;
-
-- (void)dealloc {
-//    SKDESTROY(labels1);
-//    SKDESTROY(colorLabels2);
-//    SKDESTROY(colorLabels3);
-//    SKDESTROY(lineLabels2);
-//    SKDESTROY(colorWells1);
-//    SKDESTROY(colorWells2);
-//    SKDESTROY(colorWells3);
-//    SKDESTROY(fontWells);
-//    SKDESTROY(lineWells1);
-//    SKDESTROY(lineWells2);
-//    [super dealloc];
-}
-
-- (NSString *)nibName {
-    return @"NotesPreferences";
-}
-
-- (void)loadView {
-    [super loadView];
-    
-    NSMutableArray *controls = [NSMutableArray array];
-    CGFloat dw, dw1, dw2;
-    
-    [controls addObjectsFromArray:colorWells3];
-//    dw = SKAutoSizeLabelFields(colorLabels3, controls, NO);
-    
-    [controls addObjectsFromArray:colorWells2];
-    [controls addObjectsFromArray:colorLabels3];
-//    dw += SKAutoSizeLabelFields(colorLabels2, controls, NO);
-    
-    [controls addObjectsFromArray:colorWells1];
-    [controls addObjectsFromArray:colorLabels2];
-//    [controls addObjectsFromArray:fontWells];
-[controls addObject:self.fontWell1];
-[controls addObject:self.fontWell2];
-    [controls addObjectsFromArray:lineWells1];
-//    dw += dw1 = SKAutoSizeLabelFields(labels1, controls, NO);
-    
-//    dw2 = SKAutoSizeLabelFields(lineLabels2, lineWells2, NO);
-    
-//    SKShiftAndResizeViews(fontWells, 0.0, dw - dw1);
-    
-//    SKShiftAndResizeViews([lineLabels2 arrayByAddingObjectsFromArray:lineWells2], dw - dw2, 0.0);
-    
-//    SKShiftAndResizeView([self view], 0.0, dw);
-    
-    NSUserDefaultsController *sudc = [NSUserDefaultsController sharedUserDefaultsController];
-    
-    SKLineWell *lineWell = [lineWells1 objectAtIndex:0];
-    [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteLineWidthKey) options:nil];
-    [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteDashPatternKey) options:nil];
-    [lineWell setDisplayStyle:SKLineWellDisplayStyleRectangle];
-    
-    lineWell = [lineWells2 objectAtIndex:0];
-    [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteLineWidthKey) options:nil];
-    [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.circleNoteDashPatternKey) options:nil];
-    [lineWell setDisplayStyle:SKLineWellDisplayStyleOval];
-    
-    lineWell = [lineWells2 objectAtIndex:1];
-    [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteLineWidthKey) options:nil];
-    [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.squareNoteDashPatternKey) options:nil];
-    [lineWell setDisplayStyle:SKLineWellDisplayStyleRectangle];
-    
-    lineWell = [lineWells1 objectAtIndex:1];
-    [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteLineWidthKey) options:nil];
-    [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteDashPatternKey) options:nil];
-    [lineWell bind:SKLineWellStartLineStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteStartLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellEndLineStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.lineNoteEndLineStyleKey) options:nil];
-    
-    lineWell = [lineWells1 objectAtIndex:2];
-    [lineWell bind:SKLineWellLineWidthKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteLineWidthKey) options:nil];
-    [lineWell bind:SKLineWellStyleKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteLineStyleKey) options:nil];
-    [lineWell bind:SKLineWellDashPatternKey toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.inkNoteDashPatternKey) options:nil];
-    [lineWell setDisplayStyle:SKLineWellDisplayStyleSimpleLine];
-    
-SKFontWell *fontWell = self.fontWell1;
-    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:NSUnarchiveFromDataTransformerName, NSValueTransformerNameBindingOption, nil];
-    [fontWell setHasTextColor:YES];
-    [fontWell bind:@"textColor" toObject:sudc withKeyPath:VALUES_KEY_PATH(SKStringConstants.freeTextNoteFontColorKey) options:options];
-}
-
-#pragma mark Accessors
-
-- (NSString *)title { return NSLocalizedString(@"Annotate", @"Preference pane label"); }
-
-@end

+ 2 - 2
PDF Office/PDF Master/Class/Preference/Window/SKPreferenceController.m

@@ -39,7 +39,7 @@
 #import "SKPreferenceController.h"
 //#import "SKGeneralPreferences.h"
 //#import "SKDisplayPreferences.h"
-#import "SKNotesPreferences.h"
+//#import "SKNotesPreferences.h"
 //#import "SKSyncPreferences.h"
 //#import "NSUserDefaultsController_SKExtensions.h"
 //#import "SKFontWell.h"
@@ -94,7 +94,7 @@ static SKPreferenceController *sharedPrefenceController = nil;
             preferencePanes = [[NSArray alloc] initWithObjects:
                 [[SKGeneralPreferences alloc] init],
                 [[KMDisplayPreferences alloc] init],
-                [[SKNotesPreferences alloc] init],
+                [[KMNotesPreferences alloc] init],
 //                [[[SKSyncPreferences alloc] init] autorelease],
                                
 //                [[[DropboxPreferences alloc] init] autorelease],

+ 3 - 0
PDF Office/PDF Master/PDF_Master-Bridging-Header.h

@@ -56,3 +56,6 @@
 
 #import "KMConvertURLToPDF.h"
 #import "SKPreferenceController.h"
+
+#import "SKFontWell.h"
+#import "SKLineWell.h"