diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/CtlSettingsUI.swift similarity index 75% rename from Source/Modules/UIModules/PrefUI/CtlPrefUI.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/CtlSettingsUI.swift index 98d203bb..4a6962d1 100644 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/CtlSettingsUI.swift @@ -8,7 +8,6 @@ import BookmarkManager import IMKUtils -import MainAssembly import Shared import SwiftUI @@ -17,17 +16,17 @@ private let kWindowTitleHeight: Double = 78 // InputMethodServerPreferencesWindowControllerClass 非必需。 @available(macOS 13, *) -class CtlPrefUI: NSWindowController, NSWindowDelegate { - public static var shared: CtlPrefUI? +public class CtlSettingsUI: NSWindowController, NSWindowDelegate { + public static var shared: CtlSettingsUI? - static func show() { + public static func show() { if shared == nil { let newWindow = NSWindow( contentRect: CGRect(x: 401, y: 295, width: 577, height: 568), styleMask: [.titled, .closable, .miniaturizable], backing: .buffered, defer: true ) - let newInstance = CtlPrefUI(window: newWindow) + let newInstance = CtlSettingsUI(window: newWindow) shared = newInstance } guard let shared = shared, let sharedWindow = shared.window else { return } @@ -44,7 +43,7 @@ class CtlPrefUI: NSWindowController, NSWindowDelegate { private var currentLanguageSelectItem: NSMenuItem? - override func windowDidLoad() { + override public func windowDidLoad() { super.windowDidLoad() window?.setPosition(vertical: .top, horizontal: .right, padding: 20) window?.contentView = NSHostingView( @@ -70,24 +69,24 @@ class CtlPrefUI: NSWindowController, NSWindowDelegate { // MARK: - NSToolbarDelegate. @available(macOS 13, *) -extension CtlPrefUI: NSToolbarDelegate { - var toolbarIdentifiers: [NSToolbarItem.Identifier] { +extension CtlSettingsUI: NSToolbarDelegate { + public var toolbarIdentifiers: [NSToolbarItem.Identifier] { [.init("Collapse or Expand Sidebar")] } - func toolbarDefaultItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { + public func toolbarDefaultItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { toolbarIdentifiers } - func toolbarAllowedItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { + public func toolbarAllowedItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { toolbarIdentifiers } - func toolbarSelectableItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { + public func toolbarSelectableItemIdentifiers(_: NSToolbar) -> [NSToolbarItem.Identifier] { [] } - func toolbar( + public func toolbar( _: NSToolbar, itemForItemIdentifier itemIdentifier: NSToolbarItem.Identifier, willBeInsertedIntoToolbar _: Bool ) -> NSToolbarItem? { @@ -104,7 +103,7 @@ extension CtlPrefUI: NSToolbarDelegate { // MARK: - Shared Static Variables and Constants @available(macOS 13, *) -extension CtlPrefUI { +public extension CtlSettingsUI { static let sentenceSeparator: String = { switch PrefMgr.shared.appleLanguages[0] { case "ja": @@ -137,3 +136,21 @@ extension CtlPrefUI { PrefMgr.shared.appleLanguages[0].contains("zh-Han") || PrefMgr.shared.appleLanguages[0] == "ja" } } + +@available(macOS 10.15, *) +public extension View { + func settingsDescription(maxWidth: CGFloat? = .infinity) -> some View { + controlSize(.small) + .frame(maxWidth: maxWidth, alignment: .leading) + // TODO: Use `.foregroundStyle` when targeting macOS 12. + .foregroundColor(.secondary) + } +} + +@available(macOS 10.15, *) +public extension View { + func formStyled() -> some View { + if #available(macOS 13, *) { return self.formStyle(.grouped) } + return padding() + } +} diff --git a/Source/Modules/UIModules/PrefUITabs.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/PrefUITabs.swift similarity index 84% rename from Source/Modules/UIModules/PrefUITabs.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/PrefUITabs.swift index fb22bf91..cb56fdbb 100644 --- a/Source/Modules/UIModules/PrefUITabs.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/PrefUITabs.swift @@ -7,11 +7,11 @@ // requirements defined in MIT License. import AppKit -import MainAssembly import Shared +import SwiftUI -enum PrefUITabs: String, CaseIterable, Identifiable, Hashable { - var id: ObjectIdentifier { .init(rawValue as NSString) } +public enum PrefUITabs: String, CaseIterable, Identifiable, Hashable { + public var id: ObjectIdentifier { .init(rawValue as NSString) } case tabGeneral = "General" case tabCandidates = "Candidates" case tabBehavior = "Behavior" @@ -23,7 +23,7 @@ enum PrefUITabs: String, CaseIterable, Identifiable, Hashable { case tabDevZone = "DevZone" } -extension PrefUITabs { +public extension PrefUITabs { private static let i18nTable: [String: (Hans: String, Hant: String, Ja: String)] = [ "General": (Hans: "一般设定", Hant: "一般設定", Ja: "一般設定"), "Candidates": (Hans: "选字设定", Hant: "選字設定", Ja: "候補設定"), @@ -65,6 +65,22 @@ extension PrefUITabs { } } + @available(macOS 13, *) + @ViewBuilder + var suiView: some View { + switch self { + case .tabGeneral: VwrSettingsPaneGeneral() + case .tabCandidates: VwrSettingsPaneCandidates() + case .tabBehavior: VwrSettingsPaneBehavior() + case .tabOutput: VwrSettingsPaneOutput() + case .tabDictionary: VwrSettingsPaneDictionary() + case .tabPhrases: VwrSettingsPanePhrases() + case .tabCassette: VwrSettingsPaneCassette() + case .tabKeyboard: VwrSettingsPaneKeyboard() + case .tabDevZone: VwrSettingsPaneDevZone() + } + } + var toolbarIdentifier: NSToolbarItem.Identifier { .init(rawValue: rawValue) } var i18nTitle: String { diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneBehavior.swift similarity index 96% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneBehavior.swift index 77b305d3..1c32acf5 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneBehavior.swift @@ -6,13 +6,12 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneBehavior: View { +public struct VwrSettingsPaneBehavior: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: true, UserDef.kChooseCandidateUsingSpace.rawValue) @@ -64,7 +63,7 @@ struct VwrPrefPaneBehavior: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { Section { @@ -211,7 +210,7 @@ struct VwrPrefPaneBehavior: View { ) Spacer() Text( - "This feature requires macOS 10.15 and above.".localized + CtlPrefUI.sentenceSeparator + "This feature requires macOS 10.15 and above.".localized + CtlSettingsUI.sentenceSeparator + "This feature only needs to parse consecutive NSEvents passed by macOS built-in InputMethodKit framework, hence no necessity of asking end-users for extra privileges of monitoring global keyboard inputs. You are free to investigate our codebase or reverse-engineer this input method to see whether the above statement is trustable.".localized ) .settingsDescription() @@ -245,15 +244,15 @@ struct VwrPrefPaneBehavior: View { .settingsDescription() } } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneBehavior_Previews: PreviewProvider { +struct VwrSettingsPaneBehavior_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneBehavior() + VwrSettingsPaneBehavior() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCandidates.swift similarity index 95% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCandidates.swift index 47327996..aa8eec10 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCandidates.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCandidates.swift @@ -6,13 +6,12 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneCandidates: View { +public struct VwrSettingsPaneCandidates: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: 16, UserDef.kCandidateListTextSize.rawValue) @@ -50,7 +49,7 @@ struct VwrPrefPaneCandidates: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { Section { @@ -77,7 +76,7 @@ struct VwrPrefPaneCandidates: View { } } Section { - VStack(alignment: .leading) { VwrPrefPaneCandidates_SelectionKeys() } + VStack(alignment: .leading) { VwrSettingsPaneCandidates_SelectionKeys() } VStack(alignment: .leading) { Picker( "Candidate Layout:", @@ -176,7 +175,7 @@ struct VwrPrefPaneCandidates: View { // MARK: (header: Text("Experimental:")) let imkEOSNoticeButton = Button("Where's IMK Candidate Window?") { - if let window = CtlPrefUI.shared?.window { + if let window = CtlSettingsUI.shared?.window { let title = "The End of Support for IMK Candidate Window" let explanation = "1) Only macOS has IMKCandidates. Since it relies on a dedicated ObjC Bridging Header to expose necessary internal APIs to work, it hinders vChewing from completely modularized for multi-platform support.\n\n2) IMKCandidates is buggy. It is not likely to be completely fixed by Apple, and its devs are not allowed to talk about it to non-Apple individuals. That's why we have had enough with IMKCandidates. It is likely the reason why Apple had never used IMKCandidates in their official InputMethodKit sample projects (as of August 2023)." window.callAlert(title: title.localized, text: explanation.localized) @@ -189,23 +188,23 @@ struct VwrPrefPaneCandidates: View { isOn: $enableMouseScrollingForTDKCandidatesCocoa ) } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneCandidates_Previews: PreviewProvider { +struct VwrSettingsPaneCandidates_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneCandidates() + VwrSettingsPaneCandidates() } } // MARK: - Selection Key Preferences (View) @available(macOS 13, *) -private struct VwrPrefPaneCandidates_SelectionKeys: View { +private struct VwrSettingsPaneCandidates_SelectionKeys: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: PrefMgr.kDefaultCandidateKeys, UserDef.kCandidateKeys.rawValue) @@ -224,7 +223,7 @@ private struct VwrPrefPaneCandidates_SelectionKeys: View { let keys = value.trimmingCharacters(in: .whitespacesAndNewlines).lowercased().deduplicated // Start Error Handling. if let errorResult = CandidateKey.validate(keys: keys) { - if let window = CtlPrefUI.shared?.window, !keys.isEmpty { + if let window = CtlSettingsUI.shared?.window, !keys.isEmpty { IMEApp.buzz() let alert = NSAlert(error: NSLocalizedString("Invalid Selection Keys.", comment: "")) alert.informativeText = errorResult diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCassette.swift similarity index 94% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCassette.swift index 255ea73f..41456de4 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneCassette.swift @@ -7,13 +7,12 @@ // requirements defined in MIT License. import BookmarkManager -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneCassette: View { +public struct VwrSettingsPaneCassette: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: "", UserDef.kCassettePath.rawValue) @@ -35,7 +34,7 @@ struct VwrPrefPaneCassette: View { private static let dlgOpenFile = NSOpenPanel() - var body: some View { + public var body: some View { ScrollView { Form { // MARK: - Cassette Data Path Management @@ -84,7 +83,7 @@ struct VwrPrefPaneCassette: View { let bolPreviousPathValidity = LMMgr.checkCassettePathValidity( cassettePath.expandingTildeInPath) - if let window = CtlPrefUI.shared?.window { + if let window = CtlSettingsUI.shared?.window { Self.dlgOpenFile.beginSheetModal(for: window) { result in if result == NSApplication.ModalResponse.OK { guard let url = Self.dlgOpenFile.url else { return } @@ -127,7 +126,7 @@ struct VwrPrefPaneCassette: View { LocalizedStringKey("Enable cassette mode, suppressing phonabet input"), isOn: $cassetteEnabled.onChange { if cassetteEnabled, !LMMgr.checkCassettePathValidity(cassettePath) { - if let window = CtlPrefUI.shared?.window { + if let window = CtlSettingsUI.shared?.window { IMEApp.buzz() let alert = NSAlert(error: NSLocalizedString("Path invalid or file access error.", comment: "")) alert.informativeText = NSLocalizedString( @@ -184,15 +183,15 @@ struct VwrPrefPaneCassette: View { .settingsDescription() } } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneCassette_Previews: PreviewProvider { +struct VwrSettingsPaneCassette_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneDictionary() + VwrSettingsPaneDictionary() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDevZone.swift similarity index 88% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDevZone.swift index a5cc03c8..7b92f29d 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDevZone.swift @@ -11,7 +11,7 @@ import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneDevZone: View { +public struct VwrSettingsPaneDevZone: View { // MARK: - AppStorage Variables @AppStorage( @@ -28,7 +28,7 @@ struct VwrPrefPaneDevZone: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { Section(header: Text( @@ -55,15 +55,15 @@ struct VwrPrefPaneDevZone: View { .settingsDescription() } } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneDevZone_Previews: PreviewProvider { +struct VwrSettingsPaneDevZone_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneDevZone() + VwrSettingsPaneDevZone() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDictionary.swift similarity index 96% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDictionary.swift index 8a2ad8e3..0f1942ac 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneDictionary.swift @@ -8,13 +8,12 @@ import BookmarkManager import CocoaExtension -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneDictionary: View { +public struct VwrSettingsPaneDictionary: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: "", UserDef.kUserDataFolderSpecified.rawValue) @@ -51,7 +50,7 @@ struct VwrPrefPaneDictionary: View { private static let dlgOpenPath = NSOpenPanel() private static let dlgOpenFile = NSOpenPanel() - var body: some View { + public var body: some View { ScrollView { Form { // MARK: - User Data Folder Path Management @@ -105,7 +104,7 @@ struct VwrPrefPaneDictionary: View { let bolPreviousFolderValidity = LMMgr.checkIfSpecifiedUserDataFolderValid( userDataFolderSpecified.expandingTildeInPath) - if let window = CtlPrefUI.shared?.window { + if let window = CtlSettingsUI.shared?.window { Self.dlgOpenPath.beginSheetModal(for: window) { result in if result == NSApplication.ModalResponse.OK { guard let url = Self.dlgOpenPath.url else { return } @@ -231,15 +230,15 @@ struct VwrPrefPaneDictionary: View { .settingsDescription() } } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneDictionary_Previews: PreviewProvider { +struct VwrSettingsPaneDictionary_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneDictionary() + VwrSettingsPaneDictionary() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneGeneral.swift similarity index 94% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneGeneral.swift index e6a7b81d..44abba9f 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneGeneral.swift @@ -6,16 +6,15 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneGeneral: View { +public struct VwrSettingsPaneGeneral: View { @Binding var appleLanguageTag: String - init() { + public init() { _appleLanguageTag = .init( get: { let loadedValue = (UserDefaults.standard.array(forKey: UserDef.kAppleLanguages.rawValue) as? [String] ?? ["auto"]).joined() @@ -64,7 +63,7 @@ struct VwrPrefPaneGeneral: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { VStack(alignment: .leading) { @@ -137,7 +136,7 @@ struct VwrPrefPaneGeneral: View { button.hasDestructiveAction = true } alert.addButton(withTitle: NSLocalizedString("Leave it checked", comment: "")) - if let window = CtlPrefUI.shared?.window, !shouldNotFartInLieuOfBeep { + if let window = CtlSettingsUI.shared?.window, !shouldNotFartInLieuOfBeep { shouldNotFartInLieuOfBeep = true alert.beginSheetModal(for: window) { result in switch result { @@ -169,15 +168,15 @@ struct VwrPrefPaneGeneral: View { isOn: $isDebugModeEnabled ) } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneGeneral_Previews: PreviewProvider { +struct VwrSettingsPaneGeneral_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneGeneral() + VwrSettingsPaneGeneral() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneKeyboard.swift similarity index 94% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneKeyboard.swift index d4f10adf..670abd7a 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneKeyboard.swift @@ -7,13 +7,12 @@ // requirements defined in MIT License. import IMKUtils -import MainAssembly import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneKeyboard: View { +public struct VwrSettingsPaneKeyboard: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: 0, UserDef.kKeyboardParser.rawValue) @@ -33,7 +32,7 @@ struct VwrPrefPaneKeyboard: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { Section { @@ -122,16 +121,16 @@ struct VwrPrefPaneKeyboard: View { } } Section(header: Text("Keyboard Shortcuts:")) { - VwrPrefPaneKeyboard_KeyboardShortcuts() + VwrSettingsPaneKeyboard_KeyboardShortcuts() } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -private struct VwrPrefPaneKeyboard_KeyboardShortcuts: View { +private struct VwrSettingsPaneKeyboard_KeyboardShortcuts: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: true, UserDef.kUsingHotKeySCPC.rawValue) @@ -218,8 +217,8 @@ private struct VwrPrefPaneKeyboard_KeyboardShortcuts: View { } @available(macOS 13, *) -struct VwrPrefPaneKeyboard_Previews: PreviewProvider { +struct VwrSettingsPaneKeyboard_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneKeyboard() + VwrSettingsPaneKeyboard() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneOutput.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneOutput.swift similarity index 90% rename from Source/Modules/UIModules/PrefUI/VwrPrefPaneOutput.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneOutput.swift index 6fa4b880..cb944891 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneOutput.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPaneOutput.swift @@ -11,7 +11,7 @@ import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPaneOutput: View { +public struct VwrSettingsPaneOutput: View { // MARK: - AppStorage Variables @AppStorage(wrappedValue: false, UserDef.kChineseConversionEnabled.rawValue) @@ -31,7 +31,7 @@ struct VwrPrefPaneOutput: View { // MARK: - Main View - var body: some View { + public var body: some View { ScrollView { Form { Section { @@ -72,15 +72,15 @@ struct VwrPrefPaneOutput: View { .settingsDescription() } } - }.formStyled().frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + }.formStyled().frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPaneOutput_Previews: PreviewProvider { +struct VwrSettingsPaneOutput_Previews: PreviewProvider { static var previews: some View { - VwrPrefPaneOutput() + VwrSettingsPaneOutput() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPanePhrases.swift similarity index 66% rename from Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPanePhrases.swift index 0489832c..6b4c5394 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsPanePhrases.swift @@ -6,19 +6,18 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import MainAssembly import PhraseEditorUI import Shared import SwiftExtension import SwiftUI @available(macOS 13, *) -struct VwrPrefPanePhrases: View { - var body: some View { +public struct VwrSettingsPanePhrases: View { + public var body: some View { ScrollView { VStack { GroupBox { - VwrPhraseEditorUI(delegate: LMMgr.shared, window: CtlPrefUI.shared?.window) + VwrPhraseEditorUI(delegate: LMMgr.shared, window: CtlSettingsUI.shared?.window) .padding(4) .frame(maxWidth: .infinity) .frame(height: 440) @@ -26,15 +25,15 @@ struct VwrPrefPanePhrases: View { } .padding(4) .padding() - .frame(minWidth: CtlPrefUI.formWidth, maxWidth: ceil(CtlPrefUI.formWidth * 1.2)) + .frame(minWidth: CtlSettingsUI.formWidth, maxWidth: ceil(CtlSettingsUI.formWidth * 1.2)) } - .frame(maxHeight: CtlPrefUI.contentMaxHeight) + .frame(maxHeight: CtlSettingsUI.contentMaxHeight) } } @available(macOS 13, *) -struct VwrPrefPanePhrases_Previews: PreviewProvider { +struct VwrSettingsPanePhrases_Previews: PreviewProvider { static var previews: some View { - VwrPrefPanePhrases() + VwrSettingsPanePhrases() } } diff --git a/Source/Modules/UIModules/PrefUI/VwrSettingsUI.swift b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsUI.swift similarity index 89% rename from Source/Modules/UIModules/PrefUI/VwrSettingsUI.swift rename to Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsUI.swift index 14a3c0dd..2910171f 100644 --- a/Source/Modules/UIModules/PrefUI/VwrSettingsUI.swift +++ b/Packages/vChewing_MainAssembly/Sources/MainAssembly/SettingsUI/VwrSettingsUI.swift @@ -6,7 +6,6 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import MainAssembly import SwiftUI @available(macOS 13, *) @@ -47,6 +46,13 @@ public struct VwrSettingsUI: View { .frame(minWidth: 128, idealWidth: 128, maxWidth: 128) PrefUITabs.tabGeneral.suiView } - .frame(width: CtlPrefUI.formWidth + 140, height: CtlPrefUI.contentMaxHeight) + .frame(width: CtlSettingsUI.formWidth + 140, height: CtlSettingsUI.contentMaxHeight) + } +} + +@available(macOS 13, *) +struct VwrSettingsUI_Previews: PreviewProvider { + static var previews: some View { + VwrSettingsUI() } } diff --git a/Source/Modules/SessionCtl_Menu.swift b/Source/Modules/SessionCtl_Menu.swift index 8ddb18a5..a8311332 100644 --- a/Source/Modules/SessionCtl_Menu.swift +++ b/Source/Modules/SessionCtl_Menu.swift @@ -222,7 +222,7 @@ public extension SessionCtl { osCheck: if #available(macOS 13, *) { switch NSEvent.keyModifierFlags { case .option: break osCheck - default: CtlPrefUI.show() + default: CtlSettingsUI.show() } NSApp.popup() return diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUIShared.swift b/Source/Modules/UIModules/PrefUI/CtlPrefUIShared.swift deleted file mode 100644 index a5de9131..00000000 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUIShared.swift +++ /dev/null @@ -1,47 +0,0 @@ -// (c) 2021 and onwards The vChewing Project (MIT-NTL License). -// ==================== -// This code is released under the MIT license (SPDX-License-Identifier: MIT) -// ... with NTL restriction stating that: -// No trademark license is granted to use the trade names, trademarks, service -// marks, or product names of Contributor, except as required to fulfill notice -// requirements defined in MIT License. - -import MainAssembly -import SwiftExtension -import SwiftUI - -@available(macOS 13, *) -extension PrefUITabs { - @ViewBuilder - var suiView: some View { - switch self { - case .tabGeneral: VwrPrefPaneGeneral() - case .tabCandidates: VwrPrefPaneCandidates() - case .tabBehavior: VwrPrefPaneBehavior() - case .tabOutput: VwrPrefPaneOutput() - case .tabDictionary: VwrPrefPaneDictionary() - case .tabPhrases: VwrPrefPanePhrases() - case .tabCassette: VwrPrefPaneCassette() - case .tabKeyboard: VwrPrefPaneKeyboard() - case .tabDevZone: VwrPrefPaneDevZone() - } - } -} - -@available(macOS 10.15, *) -public extension View { - func settingsDescription(maxWidth: CGFloat? = .infinity) -> some View { - controlSize(.small) - .frame(maxWidth: maxWidth, alignment: .leading) - // TODO: Use `.foregroundStyle` when targeting macOS 12. - .foregroundColor(.secondary) - } -} - -@available(macOS 10.15, *) -public extension View { - func formStyled() -> some View { - if #available(macOS 13, *) { return self.formStyle(.grouped) } - return padding() - } -} diff --git a/vChewing.xcodeproj/project.pbxproj b/vChewing.xcodeproj/project.pbxproj index 2c50e9ff..dc376fab 100644 --- a/vChewing.xcodeproj/project.pbxproj +++ b/vChewing.xcodeproj/project.pbxproj @@ -20,14 +20,11 @@ 5B253E812945AF6700680C67 /* data-bpmf-reverse-lookup-CNS6.json in Resources */ = {isa = PBXBuildFile; fileRef = 5B253E7B2945AF6700680C67 /* data-bpmf-reverse-lookup-CNS6.json */; }; 5B253E822945AF6700680C67 /* data-bpmf-reverse-lookup-CNS4.json in Resources */ = {isa = PBXBuildFile; fileRef = 5B253E7C2945AF6700680C67 /* data-bpmf-reverse-lookup-CNS4.json */; }; 5B253E832945AF6700680C67 /* data-bpmf-reverse-lookup-CNS5.json in Resources */ = {isa = PBXBuildFile; fileRef = 5B253E7D2945AF6700680C67 /* data-bpmf-reverse-lookup-CNS5.json */; }; - 5B2E009428FD1E8100E78D6E /* VwrPrefPaneCassette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B2E009328FD1E8100E78D6E /* VwrPrefPaneCassette.swift */; }; 5B30BF282944867800BD87A9 /* CtlRevLookupWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B30BF272944867800BD87A9 /* CtlRevLookupWindow.swift */; }; 5B40113928D7050D00A9D4CB /* Shared in Frameworks */ = {isa = PBXBuildFile; productRef = 5B40113828D7050D00A9D4CB /* Shared */; }; 5B40113C28D71C0100A9D4CB /* Uninstaller in Frameworks */ = {isa = PBXBuildFile; productRef = 5B40113B28D71C0100A9D4CB /* Uninstaller */; }; - 5B4C59AE2ABCB18700098626 /* VwrSettingsUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B4C59AD2ABCB18700098626 /* VwrSettingsUI.swift */; }; 5B62A33D27AE7CC100A19448 /* CtlAboutWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B62A33C27AE7CC100A19448 /* CtlAboutWindow.swift */; }; 5B65FB342A9518DA007EEFB0 /* MainAssembly in Frameworks */ = {isa = PBXBuildFile; productRef = 5B65FB332A9518DA007EEFB0 /* MainAssembly */; }; - 5B69938C293B811F0057CB8E /* VwrPrefPanePhrases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B69938B293B811F0057CB8E /* VwrPrefPanePhrases.swift */; }; 5B70F4E92A0BE900005EA8C4 /* MenuIcon-TCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B70F4E52A0BE900005EA8C4 /* MenuIcon-TCVIM.png */; }; 5B70F4EA2A0BE900005EA8C4 /* MenuIcon-SCVIM.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B70F4E62A0BE900005EA8C4 /* MenuIcon-SCVIM.png */; }; 5B70F4EB2A0BE900005EA8C4 /* MenuIcon-SCVIM@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B70F4E72A0BE900005EA8C4 /* MenuIcon-SCVIM@2x.png */; }; @@ -35,7 +32,6 @@ 5B72D55C2AB98B8300FB88CE /* Preferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B72D55A2AB98B8300FB88CE /* Preferences.h */; }; 5B72D55D2AB98B8300FB88CE /* Preferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B72D55B2AB98B8300FB88CE /* Preferences.m */; }; 5B765F09293A253C00122315 /* PhraseEditorUI in Frameworks */ = {isa = PBXBuildFile; productRef = 5B765F08293A253C00122315 /* PhraseEditorUI */; }; - 5B78EE0D28A562B4009456C1 /* VwrPrefPaneDevZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B78EE0C28A562B4009456C1 /* VwrPrefPaneDevZone.swift */; }; 5B7BC4B027AFFBE800F66C24 /* frmPrefWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B7BC4AE27AFFBE800F66C24 /* frmPrefWindow.xib */; }; 5B7DA80328BF6BC600D7B2AD /* fixinstall.sh in Resources */ = {isa = PBXBuildFile; fileRef = 5B7DA80228BF6BBA00D7B2AD /* fixinstall.sh */; }; 5B84579E2871AD2200C93B01 /* convdict.json in Resources */ = {isa = PBXBuildFile; fileRef = 5B84579C2871AD2200C93B01 /* convdict.json */; }; @@ -45,12 +41,7 @@ 5B9A62D9295BEA3400F79F3C /* SwiftExtension in Frameworks */ = {isa = PBXBuildFile; productRef = 5B9A62D8295BEA3400F79F3C /* SwiftExtension */; }; 5B9A62DB295BEA4500F79F3C /* CocoaExtension in Frameworks */ = {isa = PBXBuildFile; productRef = 5B9A62DA295BEA4500F79F3C /* CocoaExtension */; }; 5BA8C30328DF0360004C5CC4 /* CandidateWindow in Frameworks */ = {isa = PBXBuildFile; productRef = 5BA8C30228DF0360004C5CC4 /* CandidateWindow */; }; - 5BA9FD0F27FEDB6B002DE248 /* VwrPrefPaneGeneral.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA9FD0A27FEDB6B002DE248 /* VwrPrefPaneGeneral.swift */; }; - 5BA9FD1027FEDB6B002DE248 /* VwrPrefPaneKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA9FD0B27FEDB6B002DE248 /* VwrPrefPaneKeyboard.swift */; }; - 5BA9FD1127FEDB6B002DE248 /* CtlPrefUIShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA9FD0C27FEDB6B002DE248 /* CtlPrefUIShared.swift */; }; - 5BA9FD1327FEDB6B002DE248 /* VwrPrefPaneDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA9FD0E27FEDB6B002DE248 /* VwrPrefPaneDictionary.swift */; }; 5BAD0CD527D701F6003D127F /* vChewingKeyLayout.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */; }; - 5BB1D7F42999027200EA8D2C /* PrefUITabs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB1D7F32999027200EA8D2C /* PrefUITabs.swift */; }; 5BB802DA27FABA8300CF1C19 /* SessionCtl_Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB802D927FABA8300CF1C19 /* SessionCtl_Menu.swift */; }; 5BBBB75F27AED54C0023B93A /* Beep.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB75D27AED54C0023B93A /* Beep.m4a */; }; 5BBBB76027AED54C0023B93A /* Fart.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 5BBBB75E27AED54C0023B93A /* Fart.m4a */; }; @@ -78,10 +69,6 @@ 5BEDB723283B4C250078EB25 /* data-cht.json in Resources */ = {isa = PBXBuildFile; fileRef = 5BEDB720283B4AEA0078EB25 /* data-cht.json */; }; 5BEDB724283B4C250078EB25 /* data-symbols.json in Resources */ = {isa = PBXBuildFile; fileRef = 5BEDB71E283B4AEA0078EB25 /* data-symbols.json */; }; 5BEDB725283B4C250078EB25 /* data-chs.json in Resources */ = {isa = PBXBuildFile; fileRef = 5BEDB71C283B4AEA0078EB25 /* data-chs.json */; }; - 5BF018F9299923BD00248CDD /* VwrPrefPaneBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF018F8299923BD00248CDD /* VwrPrefPaneBehavior.swift */; }; - 5BF018FB299923C000248CDD /* VwrPrefPaneOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF018FA299923C000248CDD /* VwrPrefPaneOutput.swift */; }; - 5BF018FD299923C200248CDD /* VwrPrefPaneCandidates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF018FC299923C100248CDD /* VwrPrefPaneCandidates.swift */; }; - 5BF7548929B2F04F00FA50DA /* CtlPrefUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF7548829B2F04F00FA50DA /* CtlPrefUI.swift */; }; 5BF9DA2728840E6200DBD48E /* template-usersymbolphrases.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5BF9DA2228840E6200DBD48E /* template-usersymbolphrases.txt */; }; 5BF9DA2828840E6200DBD48E /* template-exclusions.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5BF9DA2328840E6200DBD48E /* template-exclusions.txt */; }; 5BF9DA2928840E6200DBD48E /* template-associatedPhrases-chs.txt in Resources */ = {isa = PBXBuildFile; fileRef = 5BF9DA2428840E6200DBD48E /* template-associatedPhrases-chs.txt */; }; @@ -182,16 +169,13 @@ 5B253E7C2945AF6700680C67 /* data-bpmf-reverse-lookup-CNS4.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "data-bpmf-reverse-lookup-CNS4.json"; path = "Data/data-bpmf-reverse-lookup-CNS4.json"; sourceTree = ""; }; 5B253E7D2945AF6700680C67 /* data-bpmf-reverse-lookup-CNS5.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "data-bpmf-reverse-lookup-CNS5.json"; path = "Data/data-bpmf-reverse-lookup-CNS5.json"; sourceTree = ""; }; 5B2DB17127AF8771006D874E /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = Data/Makefile; sourceTree = ""; }; - 5B2E009328FD1E8100E78D6E /* VwrPrefPaneCassette.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VwrPrefPaneCassette.swift; sourceTree = ""; }; 5B30BF272944867800BD87A9 /* CtlRevLookupWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CtlRevLookupWindow.swift; sourceTree = ""; }; 5B30F11227BA568800484E24 /* vChewingKeyLayout.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = vChewingKeyLayout.bundle; sourceTree = ""; }; 5B312684287800DE001AA720 /* FAQ.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = FAQ.md; sourceTree = ""; }; 5B40113A28D71B8700A9D4CB /* vChewing_Uninstaller */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_Uninstaller; path = Packages/vChewing_Uninstaller; sourceTree = ""; }; - 5B4C59AD2ABCB18700098626 /* VwrSettingsUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrSettingsUI.swift; sourceTree = ""; }; 5B62A33C27AE7CC100A19448 /* CtlAboutWindow.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = CtlAboutWindow.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5B65B919284D0185007C558B /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 5B65FB322A9518C9007EEFB0 /* vChewing_MainAssembly */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_MainAssembly; path = Packages/vChewing_MainAssembly; sourceTree = ""; }; - 5B69938B293B811F0057CB8E /* VwrPrefPanePhrases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrPrefPanePhrases.swift; sourceTree = ""; }; 5B70F4E52A0BE900005EA8C4 /* MenuIcon-TCVIM.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MenuIcon-TCVIM.png"; sourceTree = ""; }; 5B70F4E62A0BE900005EA8C4 /* MenuIcon-SCVIM.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MenuIcon-SCVIM.png"; sourceTree = ""; }; 5B70F4E72A0BE900005EA8C4 /* MenuIcon-SCVIM@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MenuIcon-SCVIM@2x.png"; sourceTree = ""; }; @@ -199,7 +183,6 @@ 5B72D55A2AB98B8300FB88CE /* Preferences.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Preferences.h; sourceTree = ""; }; 5B72D55B2AB98B8300FB88CE /* Preferences.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Preferences.m; sourceTree = ""; }; 5B765F07293A250000122315 /* vChewing_PhraseEditorUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_PhraseEditorUI; path = Packages/vChewing_PhraseEditorUI; sourceTree = ""; }; - 5B78EE0C28A562B4009456C1 /* VwrPrefPaneDevZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrPrefPaneDevZone.swift; sourceTree = ""; }; 5B7BC4AF27AFFBE800F66C24 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/frmPrefWindow.xib; sourceTree = ""; }; 5B7BC4B227AFFC0B00F66C24 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/frmPrefWindow.strings; sourceTree = ""; }; 5B7DA80228BF6BBA00D7B2AD /* fixinstall.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = fixinstall.sh; sourceTree = ""; }; @@ -209,11 +192,6 @@ 5B963CA128D5C22D00DCEE88 /* vChewing_SwiftExtension */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_SwiftExtension; path = Packages/vChewing_SwiftExtension; sourceTree = ""; }; 5B98114628D6198000CBC605 /* vChewing_PinyinPhonaConverter */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_PinyinPhonaConverter; path = Packages/vChewing_PinyinPhonaConverter; sourceTree = ""; }; 5BA8C30128DEFE4F004C5CC4 /* vChewing_CandidateWindow */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = vChewing_CandidateWindow; path = Packages/vChewing_CandidateWindow; sourceTree = ""; }; - 5BA9FD0A27FEDB6B002DE248 /* VwrPrefPaneGeneral.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = VwrPrefPaneGeneral.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 5BA9FD0B27FEDB6B002DE248 /* VwrPrefPaneKeyboard.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = VwrPrefPaneKeyboard.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 5BA9FD0C27FEDB6B002DE248 /* CtlPrefUIShared.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = CtlPrefUIShared.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 5BA9FD0E27FEDB6B002DE248 /* VwrPrefPaneDictionary.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = VwrPrefPaneDictionary.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; - 5BB1D7F32999027200EA8D2C /* PrefUITabs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrefUITabs.swift; sourceTree = ""; }; 5BB802D927FABA8300CF1C19 /* SessionCtl_Menu.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; indentWidth = 2; lineEnding = 0; path = SessionCtl_Menu.swift; sourceTree = ""; tabWidth = 2; usesTabs = 0; }; 5BBBB75D27AED54C0023B93A /* Beep.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = Beep.m4a; sourceTree = ""; }; 5BBBB75E27AED54C0023B93A /* Fart.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = Fart.m4a; sourceTree = ""; }; @@ -251,12 +229,8 @@ 5BEDB71E283B4AEA0078EB25 /* data-symbols.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "data-symbols.json"; path = "Data/data-symbols.json"; sourceTree = ""; }; 5BEDB71F283B4AEA0078EB25 /* data-zhuyinwen.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "data-zhuyinwen.json"; path = "Data/data-zhuyinwen.json"; sourceTree = ""; }; 5BEDB720283B4AEA0078EB25 /* data-cht.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "data-cht.json"; path = "Data/data-cht.json"; sourceTree = ""; }; - 5BF018F8299923BD00248CDD /* VwrPrefPaneBehavior.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrPrefPaneBehavior.swift; sourceTree = ""; }; - 5BF018FA299923C000248CDD /* VwrPrefPaneOutput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrPrefPaneOutput.swift; sourceTree = ""; }; - 5BF018FC299923C100248CDD /* VwrPrefPaneCandidates.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VwrPrefPaneCandidates.swift; sourceTree = ""; }; 5BF255CD28B2694E003ECB60 /* vChewing-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vChewing-Bridging-Header.h"; sourceTree = ""; }; 5BF4A44628E5820C002AF9C5 /* vChewingInstaller.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = vChewingInstaller.entitlements; sourceTree = ""; }; - 5BF7548829B2F04F00FA50DA /* CtlPrefUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CtlPrefUI.swift; sourceTree = ""; }; 5BF9DA2228840E6200DBD48E /* template-usersymbolphrases.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = "template-usersymbolphrases.txt"; sourceTree = ""; usesTabs = 0; }; 5BF9DA2328840E6200DBD48E /* template-exclusions.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = "template-exclusions.txt"; sourceTree = ""; usesTabs = 0; }; 5BF9DA2428840E6200DBD48E /* template-associatedPhrases-chs.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = "template-associatedPhrases-chs.txt"; path = "../Data/components/chs/template-associatedPhrases-chs.txt"; sourceTree = ""; usesTabs = 0; }; @@ -408,15 +382,6 @@ path = Resources; sourceTree = ""; }; - 5B62A33927AE7C6700A19448 /* UIModules */ = { - isa = PBXGroup; - children = ( - 5BA9FD0927FED9F3002DE248 /* PrefUI */, - 5BB1D7F32999027200EA8D2C /* PrefUITabs.swift */, - ); - path = UIModules; - sourceTree = ""; - }; 5B62A33A27AE7C7500A19448 /* WindowControllers */ = { isa = PBXGroup; children = ( @@ -460,25 +425,6 @@ name = Data; sourceTree = ""; }; - 5BA9FD0927FED9F3002DE248 /* PrefUI */ = { - isa = PBXGroup; - children = ( - 5BA9FD0C27FEDB6B002DE248 /* CtlPrefUIShared.swift */, - 5BF7548829B2F04F00FA50DA /* CtlPrefUI.swift */, - 5BA9FD0A27FEDB6B002DE248 /* VwrPrefPaneGeneral.swift */, - 5BF018FC299923C100248CDD /* VwrPrefPaneCandidates.swift */, - 5BF018F8299923BD00248CDD /* VwrPrefPaneBehavior.swift */, - 5BF018FA299923C000248CDD /* VwrPrefPaneOutput.swift */, - 5BA9FD0E27FEDB6B002DE248 /* VwrPrefPaneDictionary.swift */, - 5B69938B293B811F0057CB8E /* VwrPrefPanePhrases.swift */, - 5B2E009328FD1E8100E78D6E /* VwrPrefPaneCassette.swift */, - 5BA9FD0B27FEDB6B002DE248 /* VwrPrefPaneKeyboard.swift */, - 5B78EE0C28A562B4009456C1 /* VwrPrefPaneDevZone.swift */, - 5B4C59AD2ABCB18700098626 /* VwrSettingsUI.swift */, - ); - path = PrefUI; - sourceTree = ""; - }; 5BBBB75C27AED54C0023B93A /* SoundFiles */ = { isa = PBXGroup; children = ( @@ -608,7 +554,6 @@ 6A0D4F1215FC0EB100ABF4B3 /* Modules */ = { isa = PBXGroup; children = ( - 5B62A33927AE7C6700A19448 /* UIModules */, 5B62A33A27AE7C7500A19448 /* WindowControllers */, D427F76B278CA1BA004A2160 /* AppDelegateImpl.swift */, D47B92BF27972AC800458394 /* main.swift */, @@ -966,27 +911,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5BF018FD299923C200248CDD /* VwrPrefPaneCandidates.swift in Sources */, D427F76C278CA2B0004A2160 /* AppDelegateImpl.swift in Sources */, 5B62A33D27AE7CC100A19448 /* CtlAboutWindow.swift in Sources */, D47B92C027972AD100458394 /* main.swift in Sources */, 5B0EF55F28CDBF8E00F8F7CE /* CtlClientListMgr.swift in Sources */, - 5BA9FD1027FEDB6B002DE248 /* VwrPrefPaneKeyboard.swift in Sources */, - 5B78EE0D28A562B4009456C1 /* VwrPrefPaneDevZone.swift in Sources */, D47F7DCE278BFB57002F9DD7 /* CtlPrefWindow.swift in Sources */, 5B30BF282944867800BD87A9 /* CtlRevLookupWindow.swift in Sources */, - 5BB1D7F42999027200EA8D2C /* PrefUITabs.swift in Sources */, - 5B69938C293B811F0057CB8E /* VwrPrefPanePhrases.swift in Sources */, 5BCC631629407BBB00A2D84F /* CtlPrefWindow_PhraseEditor.swift in Sources */, - 5BA9FD0F27FEDB6B002DE248 /* VwrPrefPaneGeneral.swift in Sources */, - 5BA9FD1127FEDB6B002DE248 /* CtlPrefUIShared.swift in Sources */, - 5BA9FD1327FEDB6B002DE248 /* VwrPrefPaneDictionary.swift in Sources */, - 5BF7548929B2F04F00FA50DA /* CtlPrefUI.swift in Sources */, - 5B4C59AE2ABCB18700098626 /* VwrSettingsUI.swift in Sources */, - 5BF018F9299923BD00248CDD /* VwrPrefPaneBehavior.swift in Sources */, 5BB802DA27FABA8300CF1C19 /* SessionCtl_Menu.swift in Sources */, - 5B2E009428FD1E8100E78D6E /* VwrPrefPaneCassette.swift in Sources */, - 5BF018FB299923C000248CDD /* VwrPrefPaneOutput.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };