Browse Source

【OCToSwift】KMTextFieldSheetController替换为Swift

wanjun 1 year ago
parent
commit
ac354fb252

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

@@ -79,9 +79,6 @@
 		894A00F52976314C0070ED83 /* KMPDFViewPanelSetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 894A00F12976314C0070ED83 /* KMPDFViewPanelSetViewController.xib */; };
 		894A00F62976314C0070ED83 /* KMPDFViewPanelSetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 894A00F12976314C0070ED83 /* KMPDFViewPanelSetViewController.xib */; };
 		894A00F72976314C0070ED83 /* KMPDFViewPanelSetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 894A00F12976314C0070ED83 /* KMPDFViewPanelSetViewController.xib */; };
-		896933D029AEED520055327F /* SKTextFieldSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = 896933CF29AEED510055327F /* SKTextFieldSheetController.m */; };
-		896933D129AEED520055327F /* SKTextFieldSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = 896933CF29AEED510055327F /* SKTextFieldSheetController.m */; };
-		896933D229AEED520055327F /* SKTextFieldSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = 896933CF29AEED510055327F /* SKTextFieldSheetController.m */; };
 		896933D429AEEE3D0055327F /* PageSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 896933D329AEEE3D0055327F /* PageSheet.xib */; };
 		896933D529AEEE3D0055327F /* PageSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 896933D329AEEE3D0055327F /* PageSheet.xib */; };
 		896933D629AEEE3D0055327F /* PageSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 896933D329AEEE3D0055327F /* PageSheet.xib */; };
@@ -1000,6 +997,9 @@
 		9FCFEC882AD0EF9900EAD2CB /* KMPopMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC872AD0EF9900EAD2CB /* KMPopMenuButton.swift */; };
 		9FCFEC892AD0EF9900EAD2CB /* KMPopMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC872AD0EF9900EAD2CB /* KMPopMenuButton.swift */; };
 		9FCFEC8A2AD0EF9900EAD2CB /* KMPopMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC872AD0EF9900EAD2CB /* KMPopMenuButton.swift */; };
+		9FCFEC8C2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC8B2AD10A4400EAD2CB /* KMTextFieldSheetController.swift */; };
+		9FCFEC8D2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC8B2AD10A4400EAD2CB /* KMTextFieldSheetController.swift */; };
+		9FCFEC8E2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC8B2AD10A4400EAD2CB /* KMTextFieldSheetController.swift */; };
 		9FD0FA2929CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
 		9FD0FA2A29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
 		9FD0FA2B29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
@@ -3547,8 +3547,6 @@
 		8942F816292B678100389627 /* KMAnnotationTableCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMAnnotationTableCellView.swift; sourceTree = "<group>"; };
 		894A00F02976314C0070ED83 /* KMPDFViewPanelSetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPDFViewPanelSetViewController.swift; sourceTree = "<group>"; };
 		894A00F12976314C0070ED83 /* KMPDFViewPanelSetViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPDFViewPanelSetViewController.xib; sourceTree = "<group>"; };
-		896933CE29AEED510055327F /* SKTextFieldSheetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKTextFieldSheetController.h; sourceTree = "<group>"; };
-		896933CF29AEED510055327F /* SKTextFieldSheetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKTextFieldSheetController.m; sourceTree = "<group>"; };
 		896933D329AEEE3D0055327F /* PageSheet.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PageSheet.xib; sourceTree = "<group>"; };
 		896DD4532985FB3200ADE514 /* KMPageDisplayThemeCollectionViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageDisplayThemeCollectionViewItem.swift; sourceTree = "<group>"; };
 		896DD4542985FB3200ADE514 /* KMPageDisplayThemeCollectionViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMPageDisplayThemeCollectionViewItem.xib; sourceTree = "<group>"; };
@@ -3934,6 +3932,7 @@
 		9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPopMenuButtonCell.swift; sourceTree = "<group>"; };
 		9FCFEC832AD0EF6700EAD2CB /* KMCustomButtonPopMenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCustomButtonPopMenuViewController.swift; sourceTree = "<group>"; };
 		9FCFEC872AD0EF9900EAD2CB /* KMPopMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPopMenuButton.swift; sourceTree = "<group>"; };
+		9FCFEC8B2AD10A4400EAD2CB /* KMTextFieldSheetController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMTextFieldSheetController.swift; sourceTree = "<group>"; };
 		9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRightSideEmptyVC.swift; sourceTree = "<group>"; };
 		9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMRightSideEmptyVC.xib; sourceTree = "<group>"; };
 		9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMOpacityPanel.swift; sourceTree = "<group>"; };
@@ -5979,8 +5978,7 @@
 				9FDD0F6A294AD12C000C4DAD /* KMMainViewController+UI.swift */,
 				9FDD0F6E294AD13C000C4DAD /* KMMainViewController+Action.swift */,
 				BBE0BDF229A22EF300440583 /* KMMainViewController+MenuAction.swift */,
-				896933CE29AEED510055327F /* SKTextFieldSheetController.h */,
-				896933CF29AEED510055327F /* SKTextFieldSheetController.m */,
+				9FCFEC8B2AD10A4400EAD2CB /* KMTextFieldSheetController.swift */,
 				896933D329AEEE3D0055327F /* PageSheet.xib */,
 			);
 			path = ViewController;
@@ -10651,7 +10649,6 @@
 				ADC63E372A49813E00854E02 /* KMSubscribeSuccessWindowController.swift in Sources */,
 				BB8F4586295B19AC0037EA22 /* KMHeaderFooterDateInfoView.swift in Sources */,
 				ADF9ED2F29A8507400C4A943 /* KMAccountInfoView.swift in Sources */,
-				896933D029AEED520055327F /* SKTextFieldSheetController.m in Sources */,
 				F3B69895298B7F7500E0EB4D /* KMDocumentAIManager.m in Sources */,
 				ADB1FE8629752F4C00ED072D /* KMBatchWatermarkView.swift in Sources */,
 				F3B7DF9A2948565000333201 /* CPDFListHoverAnnotationViewController.m in Sources */,
@@ -11079,6 +11076,7 @@
 				F3732302292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */,
 				BB6DD81C29348F31001F0544 /* KMSecureTextFiled.swift in Sources */,
 				BB8F4572295ACE380037EA22 /* KMHeaderFooterAdjectiveListCell.swift in Sources */,
+				9FCFEC8C2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */,
 				BB00300F298CA383002DD1A0 /* KMPreferenceSegementControl.swift in Sources */,
 				ADD1B7062946CBB600C3FFF7 /* KMBaseTextFormatter.swift in Sources */,
 				89D2D2C129495D2100BFF5FE /* KMFormModel.swift in Sources */,
@@ -11459,7 +11457,6 @@
 				BBB7B4922A03AD2A00B58A5A /* KMPDFEditToolbar.swift in Sources */,
 				BB8F4587295B19AC0037EA22 /* KMHeaderFooterDateInfoView.swift in Sources */,
 				ADF9ED3029A8507400C4A943 /* KMAccountInfoView.swift in Sources */,
-				896933D129AEED520055327F /* SKTextFieldSheetController.m in Sources */,
 				F3B69896298B7F7500E0EB4D /* KMDocumentAIManager.m in Sources */,
 				ADB1FE8729752F4C00ED072D /* KMBatchWatermarkView.swift in Sources */,
 				ADCB98C62924730000B51A03 /* KMBatchProcessingTableViewModel.swift in Sources */,
@@ -11632,6 +11629,7 @@
 				BB146FCD299DC0D100784A6A /* GTMSessionUploadFetcher.m in Sources */,
 				BB14701E299DC0D100784A6A /* OIDIDToken.m in Sources */,
 				F386CEFD29361E2D00C44524 /* CPDFListViewConfig.m in Sources */,
+				9FCFEC8D2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */,
 				BB49ECF2293F40F500C82CA2 /* KMConvertPageRangeSettingItemView.swift in Sources */,
 				9F1FE4F429406E4700E952CA /* FastResizeView.m in Sources */,
 				9F1FE4FD29406E4700E952CA /* CTTabStripController.m in Sources */,
@@ -12207,6 +12205,7 @@
 				F37322F5292DF9410013862C /* CSelfSignAnnotationFreeText.m in Sources */,
 				BB147034299DC0D200784A6A /* OIDTokenResponse.m in Sources */,
 				BBB14A592978E75D00936EDB /* KMRedactMutilPageFlagWindowController.swift in Sources */,
+				9FCFEC8E2AD10A4400EAD2CB /* KMTextFieldSheetController.swift in Sources */,
 				899700E128F3A9F2009AF911 /* KMHomeWindowController.swift in Sources */,
 				BB9DCCA12A0A2B0A0024A6F1 /* KMConvertSettingView.swift in Sources */,
 				BB8F4578295AFA2D0037EA22 /* KMHeaderFooterAdjectiveInfoBaseView.swift in Sources */,
@@ -12827,7 +12826,6 @@
 				89752DA12936EC50003FF08E /* KMToolbar.m in Sources */,
 				ADAC0DE72AC2B04900FD4F52 /* KMNoteTypeImageView.swift in Sources */,
 				9F1FE4F229406E4700E952CA /* BackgroundGradientView.m in Sources */,
-				896933D229AEED520055327F /* SKTextFieldSheetController.m in Sources */,
 				89316824296D73CC0073EA59 /* KMSignatureAnnotationViewController.m in Sources */,
 				ADC075EC2987A38C006C752F /* KMBatchConverPDFCSVView.swift in Sources */,
 				9F1FE4A429406E4700E952CA /* CTToolbarController.m in Sources */,

+ 0 - 16
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanwj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -404,21 +404,5 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "1BD97102-B5D6-4018-8329-4E5677852CDE"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/Toolbar/KMCustomButtonPopMenuViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "39"
-            endingLineNumber = "39"
-            landmarkName = "viewDidLoad()"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -598,7 +598,7 @@ extension KMMainViewController {
     }
     
     @IBAction func menuItemAction_gotoPage(_ sender: Any) {
-        let sheet = SKTextFieldSheetController.init(windowNibName: "PageSheet")
+        let sheet = KMTextFieldSheetController.init(windowNibName: "PageSheet")
         var pages : [String] = []
         for i in 0 ..< self.listView.document.pageCount {
             pages.append("\(i)")
@@ -607,7 +607,7 @@ extension KMMainViewController {
             if (stringValue == nil) {
                 return
             }
-            guard let index = Int(stringValue!) else {
+            guard let index = Int(stringValue) else {
                 return
             }
             if (self?.listView == nil) {

+ 58 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMTextFieldSheetController.swift

@@ -0,0 +1,58 @@
+//
+//  KMTextFieldSheetController.swift
+//  PDF Master
+//
+//  Created by wanjun on 2023/10/7.
+//
+
+import Cocoa
+
+class KMTextFieldSheetController: NSWindowController {
+    
+    @IBOutlet weak var textField: NSTextField!
+    @IBOutlet weak var okButton: NSButton!
+    @IBOutlet weak var cancelButton: NSButton!
+    @IBOutlet weak var pageBox: NSComboBox!
+    @IBOutlet weak var pageLabel: NSTextField!
+    
+    var _stringValue: String?
+    var callback: ((String) -> Void)?
+    
+    static var windowController: KMTextFieldSheetController?
+        
+    deinit {
+        print(#function)
+    }
+    
+    override func windowDidLoad() {
+        super.windowDidLoad()
+        
+        KMTextFieldSheetController.windowController = self
+        pageLabel.stringValue = NSLocalizedString("Page:", comment: "")
+    }
+    
+    var stringValue: String {
+        get {
+            return self.pageBox.stringValue
+        }
+        set {
+            self.pageBox.stringValue = newValue
+        }
+    }
+    
+    
+    @IBAction func okAction(_ sender: Any) {
+        if let callback = callback, let sender = sender as? NSButton, sender == okButton {
+            callback(stringValue)
+        }
+        
+        if #available(macOS 10.13, *) {
+            NSApp.endSheet(window!, returnCode: (sender as AnyObject).tag)
+        } else {
+            NSApp.endSheet(window!)
+        }
+        window!.orderOut(self)
+        KMTextFieldSheetController.windowController = nil
+    }
+
+}

+ 8 - 8
PDF Office/PDF Master/Class/PDFWindowController/ViewController/PageSheet.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment version="1070" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22154"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="SKTextFieldSheetController">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMTextFieldSheetController" customModule="PDF_Master" customModuleProvider="target">
             <connections>
                 <outlet property="cancelButton" destination="42" id="jBr-SZ-blj"/>
                 <outlet property="okButton" destination="41" id="s37-U2-eAE"/>
@@ -21,12 +21,12 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="416" y="377" width="192" height="107"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
             <view key="contentView" id="38">
                 <rect key="frame" x="0.0" y="0.0" width="192" height="107"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="39">
+                    <textField focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="39">
                         <rect key="frame" x="17" y="69" width="38" height="17"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Page:" id="49">
@@ -35,7 +35,7 @@
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                         </textFieldCell>
                     </textField>
-                    <button verticalHuggingPriority="750" fixedFrame="YES" tag="1" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="41">
+                    <button tag="1" imageHugsTitle="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="41">
                         <rect key="frame" x="96" y="12" width="82" height="32"/>
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" borderStyle="border" tag="1" inset="2" id="51">
@@ -49,7 +49,7 @@ DQ
                             <action selector="okAction:" target="-2" id="bIN-ey-RaB"/>
                         </connections>
                     </button>
-                    <button verticalHuggingPriority="750" fixedFrame="YES" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="42">
+                    <button imageHugsTitle="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="42">
                         <rect key="frame" x="14" y="12" width="82" height="32"/>
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="52">
@@ -63,7 +63,7 @@ Gw
                             <action selector="okAction:" target="-2" id="1nO-nc-C0Z"/>
                         </connections>
                     </button>
-                    <comboBox verticalHuggingPriority="750" fixedFrame="YES" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="40">
+                    <comboBox focusRingType="none" verticalHuggingPriority="750" fixedFrame="YES" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="40">
                         <rect key="frame" x="60" y="65" width="115" height="26"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
                         <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="50">

+ 0 - 52
PDF Office/PDF Master/Class/PDFWindowController/ViewController/SKTextFieldSheetController.h

@@ -1,52 +0,0 @@
-//
-//  SKTextFieldSheetController.h
-//  Skim
-//
-//  Created by Christiaan Hofman on 9/29/08.
-/*
- This software is Copyright (c) 2008-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>
-
-@interface SKTextFieldSheetController : NSWindowController
-
-@property (nonatomic, retain) IBOutlet NSTextField *textField;
-@property (weak) IBOutlet NSButton *okButton;
-@property (weak) IBOutlet NSButton *cancelButton;
-@property (weak) IBOutlet NSComboBox *pageBox;
-@property (weak) IBOutlet NSTextField *pageLabel;
-
-@property (nonatomic, retain) NSString *stringValue;
-@property (nonatomic,copy) void (^callback)(NSString* stringVaule);
-
-@end

+ 0 - 79
PDF Office/PDF Master/Class/PDFWindowController/ViewController/SKTextFieldSheetController.m

@@ -1,79 +0,0 @@
-//
-//  SKTextFieldSheetController.m
-//  Skim
-//
-//  Created by Christiaan Hofman on 9/29/08.
-/*
- This software is Copyright (c) 2008-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 "SKTextFieldSheetController.h"
-
-static SKTextFieldSheetController *windowController = nil;
-
-@implementation SKTextFieldSheetController
-
-- (void)dealloc {
-    NSLog(@"%s", __func__);
-}
-
-
-- (void)windowDidLoad {
-    [super windowDidLoad];
-    
-    windowController = self;
-    self.pageLabel.stringValue = NSLocalizedString(@"Page:", nil);
-}
-
-- (NSString *)stringValue {
-    return [[self pageBox] stringValue];
-}
-
-- (void)setStringValue:(NSString *)string {
-    [[self pageBox] setStringValue:string];
-}
-
-- (IBAction)okAction:(id)sender {
-    if(self.callback && sender == self.okButton) {
-        self.callback(self.stringValue);
-    }
-    
-    if (@available(macOS 10.13, *)) {
-        [NSApp endSheet:[self window] returnCode:[sender tag]];
-    } else {
-        [NSApp endSheet:[self window]];
-    }
-    [[self window] orderOut:self];
-    windowController = nil;
-}
-
-@end

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

@@ -56,7 +56,6 @@
 
 #import "KMCellEmptyView.h"
 #import "KMSelfSignAnnotation.h"
-#import "SKTextFieldSheetController.h"
 #import "KMConvertPDFManagerOC.h"
 #import "GBDeviceInfo.h"
 #import "KMEmailSubWindowController.h"

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

@@ -38,7 +38,6 @@
 
 #import "CStringConstants.h"
 #import "NSUserDefaults+PDFListView.h"
-#import "SKTextFieldSheetController.h"
 #import "GBDeviceInfo.h"
 #import "KMEmailSubWindowController.h"
 #import "SKInfoWindowController.h"

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

@@ -55,7 +55,6 @@
 
 #import "KMCellEmptyView.h"
 #import "KMSelfSignAnnotation.h"
-#import "SKTextFieldSheetController.h"
 #import "KMConvertPDFManagerOC.h"
 #import "GBDeviceInfo.h"
 #import "KMEmailSubWindowController.h"