Browse Source

【偏好设置】KMDisplayPreferences 调式UI和补充数据源

tangchao 1 year ago
parent
commit
ee16c765cd

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

@@ -2290,6 +2290,9 @@
 		BB46CF432AFB663700281EDF /* AutoSaveManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BB46CF422AFB663700281EDF /* AutoSaveManager.m */; };
 		BB46CF442AFB663700281EDF /* AutoSaveManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BB46CF422AFB663700281EDF /* AutoSaveManager.m */; };
 		BB46CF452AFB663700281EDF /* AutoSaveManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BB46CF422AFB663700281EDF /* AutoSaveManager.m */; };
+		BB46CF482AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB46CF472AFB7E5C00281EDF /* InitialUserDefaults.plist */; };
+		BB46CF492AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB46CF472AFB7E5C00281EDF /* InitialUserDefaults.plist */; };
+		BB46CF4A2AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB46CF472AFB7E5C00281EDF /* InitialUserDefaults.plist */; };
 		BB49ECDD293EED6100C82CA2 /* KMConvertWordWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49ECDB293EED6100C82CA2 /* KMConvertWordWindowController.swift */; };
 		BB49ECDE293EED6100C82CA2 /* KMConvertWordWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49ECDB293EED6100C82CA2 /* KMConvertWordWindowController.swift */; };
 		BB49ECDF293EED6100C82CA2 /* KMConvertWordWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49ECDB293EED6100C82CA2 /* KMConvertWordWindowController.swift */; };
@@ -3407,9 +3410,6 @@
 		F3599173292B62F5000D25DE /* CStringConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599172292B62F5000D25DE /* CStringConstants.m */; };
 		F3599174292B62F5000D25DE /* CStringConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599172292B62F5000D25DE /* CStringConstants.m */; };
 		F3599175292B62F5000D25DE /* CStringConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599172292B62F5000D25DE /* CStringConstants.m */; };
-		F359917B292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = F359917A292B7B8A000D25DE /* InitialUserDefaults.plist */; };
-		F359917C292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = F359917A292B7B8A000D25DE /* InitialUserDefaults.plist */; };
-		F359917D292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = F359917A292B7B8A000D25DE /* InitialUserDefaults.plist */; };
 		F3599222292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599217292CA27A000D25DE /* CPDFListViewRuntime.m */; };
 		F3599223292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599217292CA27A000D25DE /* CPDFListViewRuntime.m */; };
 		F3599224292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = F3599217292CA27A000D25DE /* CPDFListViewRuntime.m */; };
@@ -4484,6 +4484,7 @@
 		BB3EAEAC293E3D6000D92407 /* KMConvertBaseWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMConvertBaseWindowController.xib; sourceTree = "<group>"; };
 		BB46CF412AFB663600281EDF /* AutoSaveManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoSaveManager.h; sourceTree = "<group>"; };
 		BB46CF422AFB663700281EDF /* AutoSaveManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoSaveManager.m; sourceTree = "<group>"; };
+		BB46CF472AFB7E5C00281EDF /* InitialUserDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = InitialUserDefaults.plist; sourceTree = "<group>"; };
 		BB49ECDB293EED6100C82CA2 /* KMConvertWordWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMConvertWordWindowController.swift; sourceTree = "<group>"; };
 		BB49ECDC293EED6100C82CA2 /* KMConvertWordWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMConvertWordWindowController.xib; sourceTree = "<group>"; };
 		BB49ECE4293EF54800C82CA2 /* KMCustomPDFView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCustomPDFView.swift; sourceTree = "<group>"; };
@@ -4912,7 +4913,6 @@
 		F359916829261F0D000D25DE /* CPDFListView+Tool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CPDFListView+Tool.m"; sourceTree = "<group>"; wrapsLines = 0; };
 		F3599171292B62F5000D25DE /* CStringConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CStringConstants.h; sourceTree = "<group>"; };
 		F3599172292B62F5000D25DE /* CStringConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CStringConstants.m; sourceTree = "<group>"; };
-		F359917A292B7B8A000D25DE /* InitialUserDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = InitialUserDefaults.plist; sourceTree = "<group>"; };
 		F3599217292CA27A000D25DE /* CPDFListViewRuntime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPDFListViewRuntime.m; sourceTree = "<group>"; };
 		F359921F292CA27A000D25DE /* CPDFListViewRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPDFListViewRuntime.h; sourceTree = "<group>"; };
 		F35B484929A4903300756255 /* NSPointerArray+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPointerArray+PDFListView.m"; sourceTree = "<group>"; };
@@ -7629,7 +7629,6 @@
 				F37322AD292DF9410013862C /* CPDFKitExtensions */,
 				F3732289292CCA650013862C /* Windows */,
 				F3599215292CA27A000D25DE /* AppKitCategories */,
-				F359917A292B7B8A000D25DE /* InitialUserDefaults.plist */,
 				F3D547B129559E1D00AA3953 /* ComPDFUIKit.h */,
 				9F53D54A2AD6696B00CCF9D8 /* ComPDFUIConfig.swift */,
 				F3732288292CB4030013862C /* CPDFListView+Private.h */,
@@ -7816,6 +7815,14 @@
 			path = Tools;
 			sourceTree = "<group>";
 		};
+		BB46CF462AFB7E5C00281EDF /* Resource */ = {
+			isa = PBXGroup;
+			children = (
+				BB46CF472AFB7E5C00281EDF /* InitialUserDefaults.plist */,
+			);
+			path = Resource;
+			sourceTree = "<group>";
+		};
 		BB49ECE3293EF50800C82CA2 /* View */ = {
 			isa = PBXGroup;
 			children = (
@@ -8002,6 +8009,7 @@
 		BB6CA4C8298BB0B100A13864 /* Preference */ = {
 			isa = PBXGroup;
 			children = (
+				BB46CF462AFB7E5C00281EDF /* Resource */,
 				BB00301B298CB787002DD1A0 /* Tools */,
 				BB003012298CA41D002DD1A0 /* Controller */,
 				BB00300D298CA367002DD1A0 /* View */,
@@ -9519,7 +9527,6 @@
 				ADCFFC0629C04617007D3657 /* BOTA.xcassets in Resources */,
 				89E4E7852967BF5A002DBA6F /* KMCustomizeStampViewController.xib in Resources */,
 				BB1BFF652AE9FBA8003EB179 /* KMBatchOperateWindowController.xib in Resources */,
-				F359917B292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */,
 				BBFDFAA22AF3815C00E08AA2 /* KMTextHintWindowController.xib in Resources */,
 				AD1CA4032A06040B0070541F /* KMAnnotationScreenCollectionView.xib in Resources */,
 				BB8F455A295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.xib in Resources */,
@@ -9581,6 +9588,7 @@
 				BB6347B82AF224E200F5438E /* KMConvertCollectionViewHeader.xib in Resources */,
 				8942F7F32926087200389627 /* KMSearchViewController.xib in Resources */,
 				ADF9ED3329A850D200C4A943 /* KMAccountInfoView.xib in Resources */,
+				BB46CF482AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */,
 				ADD5AE592A64DD2600C14249 /* KMPurchaseAlertView.xib in Resources */,
 				BB7F7C0029AA586800A3E4E7 /* signAdd.png in Resources */,
 				9F0CB46A2967E5CB00007028 /* KMPropertiesPanelSubViewController.xib in Resources */,
@@ -9937,7 +9945,6 @@
 				ADCFFC0729C04617007D3657 /* BOTA.xcassets in Resources */,
 				AD1CA4152A061CCD0070541F /* KMAnnotationScreenColorViewItem.xib in Resources */,
 				ADBC2D3B299F0A5A006280C8 /* KMPrintHelpViewController.xib in Resources */,
-				F359917C292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */,
 				BBFBE74A28DD7DDD008B2335 /* Main.storyboard in Resources */,
 				AD8810B629A846B100178CA1 /* KMVerficationCodeWindowController.xib in Resources */,
 				BB2EDF74296ECE17003BCF58 /* KMPageEditThumbnailItem.xib in Resources */,
@@ -10013,6 +10020,7 @@
 				9F3D818B29A0A9A70087B5AD /* KMDesignButton.xib in Resources */,
 				9F1F82E72934D5240092C4B4 /* KMHomeExtractActionViewController.xib in Resources */,
 				9F0CB49329683DEE00007028 /* KMPropertiesPanelLineSubVC.xib in Resources */,
+				BB46CF492AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */,
 				BB8F454B295A9CDC0037EA22 /* KMHeaderFooterListController.xib in Resources */,
 				AD85D1B12AF09C79000F4D28 /* KMHomeQuickToolsWindowCollectionViewItem.xib in Resources */,
 				BB853CAF2AF8FA67009C20C1 /* KMHeaderFooterManagerWindowController.xib in Resources */,
@@ -10144,6 +10152,7 @@
 				9FDD0FA12952FF4D000C4DAD /* global.json in Resources */,
 				89E4E73A2964148E002DBA6F /* KMAnnotationPropertiesViewController.xib in Resources */,
 				BB003033298D315E002DD1A0 /* KMPreferenceMarkupController.xib in Resources */,
+				BB46CF4A2AFB7E5C00281EDF /* InitialUserDefaults.plist in Resources */,
 				9FD0FA3629CD947000F2AB0D /* KMOpacityPanel.xib in Resources */,
 				9F78EFC028F7C1CC001E66F4 /* KMHomeViewController.xib in Resources */,
 				9F8539E52947126000DF644E /* KMChromiumToolbar.xib in Resources */,
@@ -10241,7 +10250,6 @@
 				AD1CA41E2A061CE10070541F /* KMAnnotationScreenTypeViewItem.xib in Resources */,
 				ADAFDA602AEB455500F084BC /* KMHomeContentView.xib in Resources */,
 				BBA8B7B5293635D80097D183 /* KMPasswordInputWindow.xib in Resources */,
-				F359917D292B7B8A000D25DE /* InitialUserDefaults.plist in Resources */,
 				89752DB22936F505003FF08E /* KMCustomButtonPopMenuViewController.xib in Resources */,
 				BB9DEE862A14A01D00351CC4 /* PDF-Master-DMG-Info.plist in Resources */,
 				BB8F455C295AA1270037EA22 /* KMHeaderFooterPropertyInfoController.xib in Resources */,

+ 3 - 0
PDF Office/PDF Master/Class/Analytics/KMAnalytics.swift

@@ -76,11 +76,14 @@ extension KMAnalytics.Parameter {
     
     // 配置
     static func configure() {
+#if DEBUG
+#else
  #if VERSION_DMG
         AppCenter.start(withAppSecret: "416b8e45-69bd-4a16-8fec-b5206e913c4a", services: [Analytics.self, Crashes.self])
  #else
         AppCenter.start(withAppSecret: "f0d082d0-9581-458c-9069-7aaf0a2b0a8c", services: [Analytics.self, Crashes.self])
  #endif
+#endif
         
         FirebaseApp.configure()
 //        Analytics.logEvent(AnalyticsEventSignUp, parameters: [

+ 17 - 33
PDF Office/PDF Master/Class/Preference/Controller/DisplayPreferences.xib

@@ -9,19 +9,27 @@
         <customObject id="-2" userLabel="File's Owner" customClass="KMDisplayPreferences" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="antiAliasCheckButton" destination="9" id="101"/>
-                <outlet property="colorControls" destination="121" id="133"/>
-                <outlet property="colorLabels" destination="117" id="132"/>
+                <outlet property="colorControl1" destination="16" id="4VH-rQ-aQh"/>
+                <outlet property="colorControl2" destination="15" id="mXT-Tn-DxH"/>
+                <outlet property="colorControl3" destination="17" id="rO8-kH-MIn"/>
+                <outlet property="colorControl4" destination="23" id="u2w-ik-lQX"/>
+                <outlet property="colorControl5" destination="24" id="sAj-v2-oQu"/>
+                <outlet property="discreteSizeCheckbox" destination="6" id="UuS-R3-NWc"/>
                 <outlet property="greekingLabelField" destination="11" id="88"/>
                 <outlet property="greekingTextField" destination="10" id="89"/>
+                <outlet property="normalColorLabel" destination="14" id="daq-AW-7rq"/>
+                <outlet property="pagesLabel" destination="2" id="I9C-bM-UbM"/>
+                <outlet property="pagesSlider" destination="3" id="TP7-Qv-sKL"/>
+                <outlet property="readingbarColorLabel" destination="25" id="sWY-2L-hjx"/>
+                <outlet property="snapshotLabel" destination="4" id="9nB-5o-dYN"/>
+                <outlet property="snapshotSlider" destination="5" id="2lw-as-Icg"/>
                 <outlet property="tableFontComboBox" destination="29" id="90"/>
                 <outlet property="tableFontLabelField" destination="28" id="91"/>
-                <outlet property="thumbnailSizeControls" destination="109" id="115"/>
-                <outlet property="thumbnailSizeLabels" destination="108" id="116"/>
                 <outlet property="view" destination="1" id="81"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="1">
             <rect key="frame" x="0.0" y="0.0" width="339" height="434"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -285,33 +293,9 @@
             <point key="canvasLocation" x="-3" y="154"/>
         </customView>
         <userDefaultsController representsSharedInstance="YES" id="61"/>
-        <customObject id="108" userLabel="Thumbnail Size Labels" customClass="SKIBArray">
-            <connections>
-                <outlet property="object1" destination="2" id="110"/>
-                <outlet property="object2" destination="4" id="111"/>
-            </connections>
-        </customObject>
-        <customObject id="109" userLabel="Thumbnail Size Controls" customClass="SKIBArray">
-            <connections>
-                <outlet property="object1" destination="3" id="112"/>
-                <outlet property="object2" destination="5" id="113"/>
-                <outlet property="object3" destination="6" id="114"/>
-            </connections>
-        </customObject>
-        <customObject id="117" userLabel="Color Labels" customClass="SKIBArray">
-            <connections>
-                <outlet property="object1" destination="14" id="125"/>
-                <outlet property="object2" destination="25" id="126"/>
-            </connections>
-        </customObject>
-        <customObject id="121" userLabel="Color Controls" customClass="SKIBArray">
-            <connections>
-                <outlet property="object1" destination="16" id="127"/>
-                <outlet property="object2" destination="15" id="128"/>
-                <outlet property="object3" destination="17" id="129"/>
-                <outlet property="object4" destination="23" id="130"/>
-                <outlet property="object5" destination="24" id="131"/>
-            </connections>
-        </customObject>
+        <customObject id="108" userLabel="Thumbnail Size Labels" customClass="SKIBArray"/>
+        <customObject id="109" userLabel="Thumbnail Size Controls" customClass="SKIBArray"/>
+        <customObject id="117" userLabel="Color Labels" customClass="SKIBArray"/>
+        <customObject id="121" userLabel="Color Controls" customClass="SKIBArray"/>
     </objects>
 </document>

+ 55 - 62
PDF Office/PDF Master/Class/Preference/Controller/KMDisplayPreferences.swift

@@ -15,20 +15,29 @@ import Cocoa
     @IBOutlet var greekingTextField: NSTextField!
     @IBOutlet var antiAliasCheckButton: NSButton!
     
+    @IBOutlet weak var pagesLabel: NSTextField!
+    @IBOutlet weak var snapshotLabel: NSTextField!
+    var thumbnailSizeLabels: [NSTextField] = []
+    
+    @IBOutlet weak var pagesSlider: NSSlider!
+    @IBOutlet weak var snapshotSlider: NSSlider!
+    @IBOutlet weak var discreteSizeCheckbox: NSButton!
+    var thumbnailSizeControls: [NSControl] = []
+    
+    @IBOutlet weak var normalColorLabel: NSTextField!
+    @IBOutlet weak var readingbarColorLabel: NSTextField!
+    var colorLabels: [NSTextField] = []
+    
+    
+    @IBOutlet weak var colorControl1: NSColorWell!
+    @IBOutlet weak var colorControl2: NSTextField!
+    @IBOutlet weak var colorControl3: NSColorWell!
+    @IBOutlet weak var colorControl4: NSColorWell!
+    @IBOutlet weak var colorControl5: NSButton!
+    var colorControls: [NSControl] = []
     /*
-     @interface SKDisplayPreferences : NSViewController <SKPreferencePane> {
-         NSArray *thumbnailSizeLabels;
-         NSArray *thumbnailSizeControls;
-         NSArray *colorLabels;
-         NSArray *colorControls;
-     }
-
-     @property (nonatomic, retain) IBOutlet NSArray *thumbnailSizeLabels, *thumbnailSizeControls, *colorLabels, *colorControls;
-
      - (NSUInteger)countOfSizes;
      - (NSNumber *)objectInSizesAtIndex:(NSUInteger)anIndex;
-
-     - (IBAction)changeDiscreteThumbnailSizes:(id)sender;
      */
     
     override var nibName: NSNib.Name? {
@@ -38,28 +47,29 @@ import Cocoa
     override func loadView() {
         super.loadView()
         
-        //    SKAutoSizeLabelFields(thumbnailSizeLabels, thumbnailSizeControls, NO);
-        //        [[thumbnailSizeControls lastObject] sizeToFit];
-        //    SKAutoSizeLabelField(tableFontLabelField, tableFontComboBox, NO);
-        //    SKAutoSizeLabelField(greekingLabelField, greekingTextField, NO);
-        antiAliasCheckButton.sizeToFit()
-        //    SKAutoSizeLabelFields(colorLabels, colorControls, NO);
-        //    SKAutoSizeLabelField([colorControls objectAtIndex:1], [colorControls objectAtIndex:2], NO);
-        //        [[colorControls lastObject] sizeToFit];
+        self.thumbnailSizeLabels = [self.pagesLabel, self.snapshotLabel]
+        self.thumbnailSizeControls = [self.pagesSlider, self.snapshotSlider, self.discreteSizeCheckbox]
+        _ = KMAutoSizeLabelFields(self.thumbnailSizeLabels, self.thumbnailSizeControls, false)
+        self.discreteSizeCheckbox.sizeToFit()
+        _ = KMAutoSizeLabelFields([self.tableFontLabelField], [self.tableFontComboBox], false)
+        _ = KMAutoSizeLabelFields([self.greekingLabelField], [self.greekingTextField], false)
+        self.antiAliasCheckButton.sizeToFit()
+        self.colorLabels = [self.normalColorLabel, self.readingbarColorLabel]
+        self.colorControls = [self.colorControl1, self.colorControl2, self.colorControl3, self.colorControl4, self.colorControl5]
+        _ = KMAutoSizeLabelFields(self.colorLabels, self.colorControls, false)
+        _ = KMAutoSizeLabelFields([self.colorControl2], [self.colorControl3], false);
+        self.colorControl5.sizeToFit()
         
         var w = 0.0
         for view in self.view.subviews {
             if view.autoresizingMask.contains(.width) == false {
-                //            if (([view autoresizingMask] & NSViewWidthSizable) == 0) {
                 var x = NSMaxX(view.frame)
                 if view.isKind(of: NSSlider.self) || view.isKind(of: NSButton.self) {
-                    //                if ([view isKindOfClass:[NSSlider class]] || [view isKindOfClass:[NSButton class]])
                     x -= 2.0
                 } else if view.isKind(of: NSComboBox.self) {
-                    //                else if ([view isKindOfClass:[NSComboBox class]])
                     x -= 3.0
-                    w = fmax(w, x)
                 }
+                w = fmax(w, x)
             }
         }
         var size = self.view.frame.size
@@ -81,26 +91,31 @@ import Cocoa
         }
     }
     
+    @IBAction func changeDiscreteThumbnailSizes(_ sender: AnyObject?) {
+        let slider1 = self.pagesSlider
+        let slider2 = self.snapshotSlider
+        let button = sender as? NSButton
+        if let data = button?.state, data == .on {
+            slider1?.numberOfTickMarks = 8
+            slider2?.numberOfTickMarks = 8
+            slider1?.allowsTickMarkValuesOnly = true
+            slider2?.allowsTickMarkValuesOnly = true
+        } else {
+            slider1?.superview?.setNeedsDisplay(slider1!.frame)
+            slider2?.superview?.setNeedsDisplay(slider2!.frame)
+            
+            slider1?.numberOfTickMarks = 0
+            slider2?.numberOfTickMarks = 0
+            slider1?.allowsTickMarkValuesOnly = false
+            slider2?.allowsTickMarkValuesOnly = false
+        }
+        slider1?.sizeToFit()
+        slider2?.sizeToFit()
+    }
+    
     /*
      static CGFloat SKDefaultFontSizes[] = {8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 16.0, 18.0, 20.0, 24.0, 28.0, 32.0, 48.0, 64.0};
 
-     @implementation SKDisplayPreferences
-
-     @synthesize tableFontLabelField, tableFontComboBox, greekingLabelField, greekingTextField, antiAliasCheckButton, thumbnailSizeLabels, thumbnailSizeControls, colorLabels, colorControls;
-
-     - (void)dealloc {
-     //    SKDESTROY(tableFontLabelField);
-     //    SKDESTROY(tableFontComboBox);
-     //    SKDESTROY(greekingLabelField);
-     //    SKDESTROY(greekingTextField);
-     //    SKDESTROY(antiAliasCheckButton);
-     //    SKDESTROY(thumbnailSizeLabels);
-     //    SKDESTROY(thumbnailSizeControls);
-     //    SKDESTROY(colorLabels);
-     //    SKDESTROY(colorControls);
-     //    [super dealloc];
-     }
-
      #pragma mark Accessors
 
 
@@ -111,28 +126,6 @@ import Cocoa
      - (NSNumber *)objectInSizesAtIndex:(NSUInteger)anIndex {
          return [NSNumber numberWithDouble:SKDefaultFontSizes[anIndex]];
      }
-
-     #pragma mark Actions
-
-     - (IBAction)changeDiscreteThumbnailSizes:(id)sender {
-         NSSlider *slider1 = [thumbnailSizeControls objectAtIndex:0];
-         NSSlider *slider2 = [thumbnailSizeControls objectAtIndex:1];
-         if ([(NSButton *)sender state] == NSOnState) {
-             [slider1 setNumberOfTickMarks:8];
-             [slider2 setNumberOfTickMarks:8];
-             [slider1 setAllowsTickMarkValuesOnly:YES];
-             [slider2 setAllowsTickMarkValuesOnly:YES];
-         } else {
-             [[slider1 superview] setNeedsDisplayInRect:[slider1 frame]];
-             [[slider2 superview] setNeedsDisplayInRect:[slider2 frame]];
-             [slider1 setNumberOfTickMarks:0];
-             [slider2 setNumberOfTickMarks:0];
-             [slider1 setAllowsTickMarkValuesOnly:NO];
-             [slider2 setAllowsTickMarkValuesOnly:NO];
-         }
-         [slider1 sizeToFit];
-         [slider2 sizeToFit];
-     }
      */
     
 }

+ 478 - 0
PDF Office/PDF Master/Class/Preference/Resource/InitialUserDefaults.plist

@@ -0,0 +1,478 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>RegisteredDefaults</key>
+	<dict>
+		<key>KMOpenDocumentInTab</key>
+		<integer>0</integer>
+		<key>km_set_homewindow_showlaunches_key</key>
+		<true/>
+		<key>SKBackgroundColor</key>
+		<data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg9njcD+DAOJwP4MM43A/AYY=</data>
+		<key>SKFullScreenBackgroundColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJmZoM+gAAAAYY=</data>
+		<key>SKLastOpenFileNames</key>
+		<array/>
+		<key>SKOpenContentsPaneOnlyForTOC</key>
+		<true/>
+		<key>SKInitialWindowSizeOption</key>
+		<integer>0</integer>
+		<key>SKReopenLastOpenFiles</key>
+		<false/>
+		<key>SKRememberLastPageViewed</key>
+		<true/>
+		<key>SKRememberSnapshots</key>
+		<false/>
+		<key>SKDefaultPDFDisplaySettings</key>
+		<dict>
+			<key>scaleFactor</key>
+			<real>1</real>
+			<key>autoScales</key>
+			<true/>
+			<key>displaysPageBreaks</key>
+			<true/>
+			<key>displaysAsBook</key>
+			<true/>
+			<key>displayMode</key>
+			<integer>1</integer>
+			<key>displayBox</key>
+			<integer>1</integer>
+		</dict>
+		<key>SKDefaultFullScreenPDFDisplaySettings</key>
+		<dict/>
+		<key>SKAutoSaveSkimNotes</key>
+		<false/>
+		<key>SKSnapshotsOnTop</key>
+		<false/>
+		<key>SKSnapshotThumbnailSize</key>
+		<real>128</real>
+		<key>SKThumbnailSize</key>
+		<real>128</real>
+		<key>SKUpdateCheckInterval</key>
+		<integer>1</integer>
+		<key>SKUpdateCheckLastDate</key>
+		<string></string>
+		<key>SKUpdateLatestNotifiedVersion</key>
+		<string></string>
+		<key>SKLastToolMode</key>
+		<integer>0</integer>
+		<key>SKLastAnnotationMode</key>
+		<integer>4</integer>
+		<key>SKTableFontSize</key>
+		<real>12</real>
+		<key>SKGreekingThreshold</key>
+		<real>3</real>
+		<key>SKShouldAntiAlias</key>
+		<true/>
+		<key>SKReadingBarColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQEAAYY=</data>
+		<key>SKReadingBarInvert</key>
+		<false/>
+		<key>SKAnchoredNoteFontName</key>
+		<string>Helvetica</string>
+		<key>SKAnchoredNoteFontSize</key>
+		<real>12</real>
+		<key>SKFreeTextNoteFontName</key>
+		<string>LucidaGrande</string>
+		<key>SKFreeTextNoteFontSize</key>
+		<real>11</real>
+		<key>SKFreeTextNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJmZgAAhg==</data>
+		<key>SKAnchoredNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQGDPwAAAAGG</data>
+		<key>SKCircleNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQAAAYY=</data>
+		<key>SKSquareNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAEAAYY=</data>
+		<key>SKHighlightNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQEAAYY=</data>
+		<key>SKUnderlineNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAIM/AAAAAAGG</data>
+		<key>SKStrikeOutNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQAAAYY=</data>
+		<key>SKLineNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAABAYY=</data>
+		<key>SKInkNoteColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQAAAYY=</data>
+		<key>SKCircleNoteInteriorColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJmZgAAhg==</data>
+		<key>SKSquareNoteInteriorColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJmZgAAhg==</data>
+		<key>SKLineNoteInteriorColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJmZgAAhg==</data>
+		<key>SKFreeTextNoteFontColor</key>
+		<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAAAAYY=</data>
+		<key>SKFreeTextNoteAlignment</key>
+		<integer>0</integer>
+		<key>SKFreeTextNoteLineWidth</key>
+		<integer>0</integer>
+		<key>SKFreeTextNoteLineStyle</key>
+		<integer>0</integer>
+		<key>SKFreeTextNoteDashPattern</key>
+		<array/>
+		<key>SKAnchoredNoteIconType</key>
+		<integer>2</integer>
+		<key>SKCircleNoteLineWidth</key>
+		<real>2</real>
+		<key>SKCircleNoteLineStyle</key>
+		<integer>0</integer>
+		<key>SKCircleNoteDashPattern</key>
+		<array/>
+		<key>SKSquareNoteLineWidth</key>
+		<real>2</real>
+		<key>SKSquareNoteLineStyle</key>
+		<integer>0</integer>
+		<key>SKSquareNoteDashPattern</key>
+		<array/>
+		<key>SKLineNoteLineWidth</key>
+		<real>2</real>
+		<key>SKLineNoteLineStyle</key>
+		<integer>0</integer>
+		<key>SKLineNoteDashPattern</key>
+		<array/>
+		<key>SKLineNoteStartLineStyle</key>
+		<integer>0</integer>
+		<key>SKLineNoteEndLineStyle</key>
+		<integer>4</integer>
+		<key>SKInkNoteLineWidth</key>
+		<real>2</real>
+		<key>SKInkNoteLineStyle</key>
+		<integer>0</integer>
+		<key>SKInkNoteDashPattern</key>
+		<array/>
+		<key>SKAutoCheckFileUpdate</key>
+		<false/>
+		<key>SKTeXEditorPreset</key>
+		<string>TextMate</string>
+		<key>SKTeXEditorCommand</key>
+		<string>mate</string>
+		<key>SKTeXEditorArguments</key>
+		<string>-l %line &quot;%file&quot;</string>
+		<key>SKNoteColumns</key>
+		<array>
+			<string>note</string>
+			<string>type</string>
+			<string>color</string>
+			<string>page</string>
+		</array>
+		<key>SKNoteColumnWidths</key>
+		<dict>
+			<key>author</key>
+			<real>32</real>
+			<key>date</key>
+			<real>32</real>
+		</dict>
+		<key>SKNotesDocumentColumns</key>
+		<array>
+			<string>note</string>
+			<string>type</string>
+			<string>color</string>
+			<string>page</string>
+		</array>
+		<key>SKNotesDocumentColumnWidths</key>
+		<dict>
+			<key>author</key>
+			<real>64</real>
+			<key>date</key>
+			<real>64</real>
+		</dict>
+		<key>SKSwatchColors</key>
+		<array>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQAAAYY=</data>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAYM/AAAAAAGG</data>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQEAAYY=</data>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAEAAYY=</data>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAABAYY=</data>
+			<data>BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQABAYY=</data>
+		</array>
+		<key>SKDefaultNoteWidth</key>
+		<real>128</real>
+		<key>SKDefaultNoteHeight</key>
+		<real>64</real>
+		<key>SKFullScreenNavigationOption</key>
+		<integer>1</integer>
+		<key>SKPresentationNavigationOption</key>
+		<integer>1</integer>
+		<key>SKAutoHidePresentationContents</key>
+		<true/>
+		<key>SKEnableAppleRemote</key>
+		<true/>
+		<key>SKAppleRemoteSwitchIndicationTimeout</key>
+		<real>2</real>
+		<key>SKReadMissingNotesFromSkimFileOption</key>
+		<integer>-1</integer>
+		<key>SKSavePasswordOption</key>
+		<integer>-1</integer>
+		<key>SKBlankAllScreensInFullScreen</key>
+		<false/>
+		<key>SKAutoCropBoxMarginHeight</key>
+		<real>10</real>
+		<key>SKAutoCropBoxMarginWidth</key>
+		<real>10</real>
+		<key>SKSmallMagnificationHeight</key>
+		<real>200</real>
+		<key>SKSmallMagnificationWidth</key>
+		<real>300</real>
+		<key>SKLargeMagnificationHeight</key>
+		<real>400</real>
+		<key>SKLargeMagnificationWidth</key>
+		<real>600</real>
+		<key>SKToolTipWidth</key>
+		<real>400</real>
+		<key>SKToolTipHeight</key>
+		<real>120</real>
+		<key>SKAutoOpenDownloadsWindow</key>
+		<true/>
+		<key>SKAutoRemoveFinishedDownloads</key>
+		<false/>
+		<key>SKAutoCloseDownloadsWindow</key>
+		<true/>
+		<key>SKShouldSetCreatorCode</key>
+		<false/>
+		<key>SKShowStatusBar</key>
+		<true/>
+		<key>SKShowBookmarkStatusBar</key>
+		<false/>
+		<key>SKShowNotesStatusBar</key>
+		<true/>
+		<key>SKCaseInsensitiveSearch</key>
+		<true/>
+		<key>SKWholeWordSearch</key>
+		<false/>
+		<key>SKCaseInsensitiveNoteSearch</key>
+		<true/>
+		<key>SKCaseInsensitiveFind</key>
+		<true/>
+		<key>SKUseToolModeCursors</key>
+		<true/>
+		<key>SKAutoHideToolbarInFullScreen</key>
+		<true/>
+		<key>SKCollapseSidePanesInFullScreen</key>
+		<true/>
+		<key>SKAnnotationChoiceListWidgetFontNameKey</key>
+		<string>Helvetica</string>
+		<key>SKAnnotationTextWidgetFontNameKey</key>
+		<string>Helvetica</string>
+		<key>SKAnnotationChoiceWidgetFontNameKey</key>
+		<string>Helvetica</string>
+		<key>KMOCRPlanNumber</key>
+		<integer>0</integer>
+	</dict>
+	<key>ResettableKeys</key>
+	<dict>
+		<key>GeneralPreferences</key>
+		<array>
+			<string>KMOpenDocumentInTab</string>
+			<string>km_set_homewindow_showlaunches_key</string>
+			<string>SKReopenLastOpenFiles</string>
+			<string>SKInitialWindowSizeOption</string>
+			<string>SKOpenContentsPaneOnlyForTOC</string>
+			<string>SKRememberLastPageViewed</string>
+			<string>SKRememberSnapshots</string>
+			<string>SKDefaultPDFDisplaySettings</string>
+			<string>SKDefaultFullScreenPDFDisplaySettings</string>
+			<string>SKAutoSaveSkimNotes</string>
+			<string>SKSnapshotsOnTop</string>
+			<string>SKSavePasswordOption</string>
+		</array>
+		<key>DisplayPreferences</key>
+		<array>
+			<string>SKThumbnailSize</string>
+			<string>SKSnapshotThumbnailSize</string>
+			<string>SKTableFontSize</string>
+			<string>SKShouldAntiAlias</string>
+			<string>SKGreekingThreshold</string>
+			<string>SKBackgroundColor</string>
+			<string>SKFullScreenBackgroundColor</string>
+			<string>SKReadingBarColor</string>
+			<string>SKReadingBarInvert</string>
+		</array>
+		<key>NotesPreferences</key>
+		<array>
+			<string>SKFreeTextNoteColor</string>
+			<string>SKAnchoredNoteColor</string>
+			<string>SKCircleNoteColor</string>
+			<string>SKSquareNoteColor</string>
+			<string>SKHighlightNoteColor</string>
+			<string>SKUnderlineNoteColor</string>
+			<string>SKStrikeOutNoteColor</string>
+			<string>SKLineNoteColor</string>
+			<string>SKInkNoteColor</string>
+			<string>SKCircleNoteInteriorColor</string>
+			<string>SKSquareNoteInteriorColor</string>
+			<string>SKLineNoteInteriorColor</string>
+			<string>SKFreeTextNoteFontColor</string>
+			<string>SKFreeTextNoteFontName</string>
+			<string>SKFreeTextNoteFontSize</string>
+			<string>SKAnchoredNoteFontName</string>
+			<string>SKAnchoredNoteFontSize</string>
+			<string>SKFreeTextNoteLineWidth</string>
+			<string>SKFreeTextNoteLineStyle</string>
+			<string>SKFreeTextNoteDashPattern</string>
+			<string>SKFreeTextNoteAlignment</string>
+			<string>SKAnchoredNoteIconType</string>
+			<string>SKCircleNoteLineWidth</string>
+			<string>SKCircleNoteLineStyle</string>
+			<string>SKCircleNoteDashPattern</string>
+			<string>SKSquareNoteLineWidth</string>
+			<string>SKSquareNoteLineStyle</string>
+			<string>SKSquareNoteDashPattern</string>
+			<string>SKLineNoteLineWidth</string>
+			<string>SKLineNoteLineStyle</string>
+			<string>SKLineNoteDashPattern</string>
+			<string>SKLineNoteStartLineStyle</string>
+			<string>SKLineNoteEndLineStyle</string>
+			<string>SKInkNoteLineWidth</string>
+			<string>SKInkNoteLineStyle</string>
+			<string>SKInkNoteDashPattern</string>
+		</array>
+		<key>SyncPreferences</key>
+		<array>
+			<string>SKAutoCheckFileUpdate</string>
+			<string>SKTeXEditorPreset</string>
+			<string>SKTeXEditorCommand</string>
+			<string>SKTeXEditorArguments</string>
+		</array>
+		<key>OtherPreferences</key>
+		<array>
+			<string>SKLastOpenFileNames</string>
+			<string>SKLastToolMode</string>
+			<string>SKLastAnnotationMode</string>
+			<string>SKBlankAllScreensInFullScreen</string>
+			<string>SKActivateFullScreenNavigationAtBottom</string>
+			<string>SKActivatePresentationNavigationAtBottom</string>
+			<string>SKReadMissingNotesFromSkimFileOption</string>
+			<string>SKEnableAppleRemote</string>
+			<string>SKAppleRemoteSwitchIndicationTimeout</string>
+		</array>
+		<key>KMOCRPreferences</key>
+		<array>
+			<string>KMOCRPlanNumber</string>
+		</array>
+	</dict>
+	<key>TeXEditors</key>
+	<array>
+		<dict>
+			<key>name</key>
+			<string>TextMate</string>
+			<key>command</key>
+			<string>mate</string>
+			<key>arguments</key>
+			<string>-l %line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>BBEdit</string>
+			<key>command</key>
+			<string>bbedit_tool</string>
+			<key>arguments</key>
+			<string>+%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>TextWrangler</string>
+			<key>command</key>
+			<string>edit</string>
+			<key>arguments</key>
+			<string>+%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Aquamacs</string>
+			<key>command</key>
+			<string>emacsclient</string>
+			<key>arguments</key>
+			<string>--no-wait +%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Aquamacs Emacs</string>
+			<key>command</key>
+			<string>emacsclient</string>
+			<key>arguments</key>
+			<string>--no-wait +%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Emacs</string>
+			<key>command</key>
+			<string>emacsclient</string>
+			<key>arguments</key>
+			<string>--no-wait +%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>LyX</string>
+			<key>command</key>
+			<string>lyxeditor</string>
+			<key>arguments</key>
+			<string>&quot;%file&quot; %line</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>TeXMaker</string>
+			<key>command</key>
+			<string>texmaker</string>
+			<key>arguments</key>
+			<string>&quot;%file&quot; -line %line</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>AlphaCocoa</string>
+			<key>command</key>
+			<string>alphac</string>
+			<key>arguments</key>
+			<string>+%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>AlphaX</string>
+			<key>command</key>
+			<string>alphac</string>
+			<key>arguments</key>
+			<string>+%line &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>MacVim</string>
+			<key>command</key>
+			<string>mvim</string>
+			<key>arguments</key>
+			<string>--remote-silent +&quot;%line&quot; &quot;%file&quot;</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Sublime Text</string>
+			<key>command</key>
+			<string>subl</string>
+			<key>arguments</key>
+			<string>&quot;%file&quot;:%line</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Sublime Text 2</string>
+			<key>command</key>
+			<string>subl</string>
+			<key>arguments</key>
+			<string>&quot;%file&quot;:%line</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Atom</string>
+			<key>command</key>
+			<string>atom</string>
+			<key>arguments</key>
+			<string>&quot;%file&quot;:%line</string>
+		</dict>
+		<dict>
+			<key>name</key>
+			<string>Visual Studio Code</string>
+			<key>command</key>
+			<string>open</string>
+			<key>arguments</key>
+			<string>vscode://file&quot;%file&quot;:%line</string>
+		</dict>
+	</array>
+</dict>
+</plist>