diff --git a/Packages/Sindresorhus_Preferences/LICENSE b/Packages/Sindresorhus_SSPreferences/LICENSE similarity index 100% rename from Packages/Sindresorhus_Preferences/LICENSE rename to Packages/Sindresorhus_SSPreferences/LICENSE diff --git a/Packages/Sindresorhus_Preferences/Package.swift b/Packages/Sindresorhus_SSPreferences/Package.swift similarity index 67% rename from Packages/Sindresorhus_Preferences/Package.swift rename to Packages/Sindresorhus_SSPreferences/Package.swift index 536a1b2e..b5e9504a 100644 --- a/Packages/Sindresorhus_Preferences/Package.swift +++ b/Packages/Sindresorhus_SSPreferences/Package.swift @@ -2,21 +2,21 @@ import PackageDescription let package = Package( - name: "Preferences", + name: "SSPreferences", platforms: [ .macOS(.v10_11) ], products: [ .library( - name: "Preferences", + name: "SSPreferences", targets: [ - "Preferences" + "SSPreferences" ] ) ], targets: [ .target( - name: "Preferences" + name: "SSPreferences" ) ] ) diff --git a/Packages/Sindresorhus_Preferences/README.md b/Packages/Sindresorhus_SSPreferences/README.md similarity index 61% rename from Packages/Sindresorhus_Preferences/README.md rename to Packages/Sindresorhus_SSPreferences/README.md index 36018a38..a756a4ae 100644 --- a/Packages/Sindresorhus_Preferences/README.md +++ b/Packages/Sindresorhus_SSPreferences/README.md @@ -7,3 +7,5 @@ ``` See its original repository for details: https://github.com/sindresorhus/Preferences/ + +Note: In vChewing IME, this module is renamed to SSPreferences due to potential namespace conflicts with InputMethodKit's own method of implementing system preferences pane. diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Container.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Container.swift similarity index 99% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Container.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Container.swift index c99bce24..1f9a9f2a 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/Container.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Container.swift @@ -5,7 +5,7 @@ import SwiftUI @available(macOS 10.15, *) -extension Preferences { +extension SSPreferences { /** Function builder for `Preferences` components used in order to restrict types of child views to be of type `Section`. */ diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Localization.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Localization.swift similarity index 100% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Localization.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Localization.swift diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Pane.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Pane.swift similarity index 98% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Pane.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Pane.swift index fea2f037..46fec469 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/Pane.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Pane.swift @@ -15,7 +15,7 @@ public protocol PreferencePaneConvertible { } @available(macOS 10.15, *) -extension Preferences { +extension SSPreferences { /** Create a SwiftUI-based preference pane. diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencePane.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencePane.swift similarity index 88% rename from Packages/Sindresorhus_Preferences/Source/Preferences/PreferencePane.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencePane.swift index e1b1166f..c4f34185 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencePane.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencePane.swift @@ -4,7 +4,7 @@ import Cocoa -extension Preferences { +extension SSPreferences { public struct PaneIdentifier: Hashable, RawRepresentable, Codable { public let rawValue: String @@ -15,7 +15,7 @@ extension Preferences { } public protocol PreferencePane: NSViewController { - var preferencePaneIdentifier: Preferences.PaneIdentifier { get } + var preferencePaneIdentifier: SSPreferences.PaneIdentifier { get } var preferencePaneTitle: String { get } var toolbarItemIcon: NSImage { get } } @@ -28,7 +28,7 @@ extension PreferencePane { public var toolbarItemIcon: NSImage { .empty } } -extension Preferences.PaneIdentifier { +extension SSPreferences.PaneIdentifier { public init(_ rawValue: String) { self.init(rawValue: rawValue) } diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyle.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyle.swift similarity index 90% rename from Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyle.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyle.swift index a92f9d1a..adbe49d9 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyle.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyle.swift @@ -4,7 +4,7 @@ import Cocoa -extension Preferences { +extension SSPreferences { public enum Style { case toolbarItems case segmentedControl diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyleController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyleController.swift similarity index 75% rename from Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyleController.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyleController.swift index 882c01d6..31861cd0 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesStyleController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesStyleController.swift @@ -9,11 +9,11 @@ protocol PreferencesStyleController: AnyObject { var isKeepingWindowCentered: Bool { get } func toolbarItemIdentifiers() -> [NSToolbarItem.Identifier] - func toolbarItem(preferenceIdentifier: Preferences.PaneIdentifier) -> NSToolbarItem? + func toolbarItem(preferenceIdentifier: SSPreferences.PaneIdentifier) -> NSToolbarItem? func selectTab(index: Int) } protocol PreferencesStyleControllerDelegate: AnyObject { - func activateTab(preferenceIdentifier: Preferences.PaneIdentifier, animated: Bool) + func activateTab(preferenceIdentifier: SSPreferences.PaneIdentifier, animated: Bool) func activateTab(index: Int, animated: Bool) } diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesTabViewController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift similarity index 96% rename from Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesTabViewController.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift index 45955fbe..3d3361ad 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesTabViewController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift @@ -7,7 +7,7 @@ import Cocoa final class PreferencesTabViewController: NSViewController, PreferencesStyleControllerDelegate { private var activeTab: Int? private var preferencePanes = [PreferencePane]() - private var style: Preferences.Style? + private var style: SSPreferences.Style? internal var preferencePanesCount: Int { preferencePanes.count } private var preferencesStyleController: PreferencesStyleController! private var isKeepingWindowCentered: Bool { preferencesStyleController.isKeepingWindowCentered } @@ -37,7 +37,7 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont view.translatesAutoresizingMaskIntoConstraints = false } - func configure(preferencePanes: [PreferencePane], style: Preferences.Style) { + func configure(preferencePanes: [PreferencePane], style: SSPreferences.Style) { self.preferencePanes = preferencePanes self.style = style children = preferencePanes @@ -68,7 +68,7 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont activateTab(preferenceIdentifier: preferencePane.preferencePaneIdentifier, animated: animated) } - func activateTab(preferenceIdentifier: Preferences.PaneIdentifier, animated: Bool) { + func activateTab(preferenceIdentifier: SSPreferences.PaneIdentifier, animated: Bool) { guard let index = (preferencePanes.firstIndex { $0.preferencePaneIdentifier == preferenceIdentifier }) else { return activateTab(index: 0, animated: animated) } @@ -245,6 +245,6 @@ extension PreferencesTabViewController: NSToolbarDelegate { } return preferencesStyleController.toolbarItem( - preferenceIdentifier: Preferences.PaneIdentifier(fromToolbarItemIdentifier: itemIdentifier)) + preferenceIdentifier: SSPreferences.PaneIdentifier(fromToolbarItemIdentifier: itemIdentifier)) } } diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesWindowController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesWindowController.swift similarity index 94% rename from Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesWindowController.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesWindowController.swift index c3f75eaf..4c7f63e3 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/PreferencesWindowController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesWindowController.swift @@ -32,7 +32,7 @@ public final class PreferencesWindowController: NSWindowController { public init( preferencePanes: [PreferencePane], - style: Preferences.Style = .toolbarItems, + style: SSPreferences.Style = .toolbarItems, animated: Bool = true, hidesToolbarForSingleItem: Bool = true ) { @@ -83,7 +83,7 @@ public final class PreferencesWindowController: NSWindowController { /** Show the preferences window and brings it to front. - If you pass a `Preferences.PaneIdentifier`, the window will activate the corresponding tab. + If you pass a `SSPreferences.PaneIdentifier`, the window will activate the corresponding tab. - Parameter preferencePane: Identifier of the preference pane to display, or `nil` to show the tab that was open when the user last closed the window. @@ -92,7 +92,7 @@ public final class PreferencesWindowController: NSWindowController { - See `close()` to close the window again. - See `showWindow(_:)` to show the window without the convenience of activating the app. */ - public func show(preferencePane preferenceIdentifier: Preferences.PaneIdentifier? = nil) { + public func show(preferencePane preferenceIdentifier: SSPreferences.PaneIdentifier? = nil) { if let preferenceIdentifier = preferenceIdentifier { tabViewController.activateTab(preferenceIdentifier: preferenceIdentifier, animated: false) } else { @@ -156,7 +156,7 @@ extension PreferencesWindowController { */ public convenience init( panes: [PreferencePaneConvertible], - style: Preferences.Style = .toolbarItems, + style: SSPreferences.Style = .toolbarItems, animated: Bool = true, hidesToolbarForSingleItem: Bool = true ) { diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Preferences.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SSPreferences.swift similarity index 86% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Preferences.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SSPreferences.swift index c7a8ce58..4d8e8ade 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/Preferences.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SSPreferences.swift @@ -3,4 +3,4 @@ // This code is released under the MIT license (SPDX-License-Identifier: MIT) /// The namespace for this package. -public enum Preferences {} +public enum SSPreferences {} diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Section.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Section.swift similarity index 99% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Section.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Section.swift index 080c0b8f..09d32ac9 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/Section.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Section.swift @@ -5,7 +5,7 @@ import SwiftUI @available(macOS 10.15, *) -extension Preferences { +extension SSPreferences { /** Represents a section with right-aligned title and optional bottom divider. */ diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/SegmentedControlStyleViewController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SegmentedControlStyleViewController.swift similarity index 98% rename from Packages/Sindresorhus_Preferences/Source/Preferences/SegmentedControlStyleViewController.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SegmentedControlStyleViewController.swift index 13119ad4..4d7422bb 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/SegmentedControlStyleViewController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/SegmentedControlStyleViewController.swift @@ -109,7 +109,7 @@ final class SegmentedControlStyleViewController: NSViewController, PreferencesSt ] } - func toolbarItem(preferenceIdentifier: Preferences.PaneIdentifier) -> NSToolbarItem? { + func toolbarItem(preferenceIdentifier: SSPreferences.PaneIdentifier) -> NSToolbarItem? { let toolbarItemIdentifier = preferenceIdentifier.toolbarItemIdentifier precondition(toolbarItemIdentifier == .toolbarSegmentedControlItem) diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/ToolbarItemStyleViewController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/ToolbarItemStyleViewController.swift similarity index 90% rename from Packages/Sindresorhus_Preferences/Source/Preferences/ToolbarItemStyleViewController.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/ToolbarItemStyleViewController.swift index 558bb0ea..00b991bc 100755 --- a/Packages/Sindresorhus_Preferences/Source/Preferences/ToolbarItemStyleViewController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/ToolbarItemStyleViewController.swift @@ -35,7 +35,7 @@ final class ToolbarItemStyleViewController: NSObject, PreferencesStyleController return toolbarItemIdentifiers } - func toolbarItem(preferenceIdentifier: Preferences.PaneIdentifier) -> NSToolbarItem? { + func toolbarItem(preferenceIdentifier: SSPreferences.PaneIdentifier) -> NSToolbarItem? { guard let preference = (preferencePanes.first { $0.preferencePaneIdentifier == preferenceIdentifier }) else { preconditionFailure() } @@ -50,7 +50,7 @@ final class ToolbarItemStyleViewController: NSObject, PreferencesStyleController @IBAction private func toolbarItemSelected(_ toolbarItem: NSToolbarItem) { delegate?.activateTab( - preferenceIdentifier: Preferences.PaneIdentifier(fromToolbarItemIdentifier: toolbarItem.itemIdentifier), + preferenceIdentifier: SSPreferences.PaneIdentifier(fromToolbarItemIdentifier: toolbarItem.itemIdentifier), animated: true ) } diff --git a/Packages/Sindresorhus_Preferences/Source/Preferences/Utilities.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Utilities.swift similarity index 100% rename from Packages/Sindresorhus_Preferences/Source/Preferences/Utilities.swift rename to Packages/Sindresorhus_SSPreferences/Source/SSPreferences/Utilities.swift diff --git a/Source/Modules/SessionCtl_HandleDisplay.swift b/Source/Modules/SessionCtl_HandleDisplay.swift index bec330ee..e3c267cb 100644 --- a/Source/Modules/SessionCtl_HandleDisplay.swift +++ b/Source/Modules/SessionCtl_HandleDisplay.swift @@ -154,12 +154,12 @@ extension SessionCtl { /// **REASON**: IMKCandidates has bug that it does not respect font attributes attached to the /// results generated from `candidiates() -> [Any]!` function. IMKCandidates is plagued with /// bugs which are not dealt in the recent decade, regardless Radar complaints from input method developers. - /// 1) Make sure the usage of ".languageIdentifier" is disabled in the Dev Zone of the vChewing Preferences. + /// 1) Make sure the usage of ".languageIdentifier" is disabled in the Dev Zone of the vChewing SSPreferences. /// 2) Run "make update" in the project folder to download the latest git-submodule of dictionary file. /// 3) Compile the target "vChewingInstaller", run it. It will install the input method into /// "~/Library/Input Methods/" folder. Remember to ENABLE BOTH "vChewing-CHS" /// and "vChewing-CHT" input sources in System Preferences / Settings. - /// 4) Type Zhuyin "ej3" (ㄍㄨˇ) (or "gu3" in Pinyin if you enabled Pinyin typing in vChewing preferences.) + /// 4) Type Zhuyin "ej3" (ㄍㄨˇ) (or "gu3" in Pinyin if you enabled Pinyin typing in vChewing SSPreferences.) /// using both "vChewing-CHS" and "vChewing-CHT", and check the candidate window by pressing SPACE key. /// 5) Do NOT enable either KangXi conversion mode nor JIS conversion mode. They are disabled by default. /// 6) Expecting the glyph differences of the candidate "骨" between PingFang SC and PingFang TC when rendering diff --git a/Source/Modules/SessionCtl_Menu.swift b/Source/Modules/SessionCtl_Menu.swift index 8237f9e1..53392385 100644 --- a/Source/Modules/SessionCtl_Menu.swift +++ b/Source/Modules/SessionCtl_Menu.swift @@ -7,7 +7,7 @@ // requirements defined in MIT License. import NotifierUI -import Preferences +import SSPreferences import UpdateSputnik extension Bool { @@ -199,7 +199,7 @@ extension SessionCtl { CtlPrefWindow.show() } else { NSApp.setActivationPolicy(.accessory) - CtlPrefUI.shared.controller.show(preferencePane: Preferences.PaneIdentifier(rawValue: "General")) + CtlPrefUI.shared.controller.show(preferencePane: SSPreferences.PaneIdentifier(rawValue: "General")) CtlPrefUI.shared.controller.window?.level = .statusBar NSApp.activate(ignoringOtherApps: true) } diff --git a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift index 1fee164a..4044d1d6 100644 --- a/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift +++ b/Source/Modules/UIModules/PrefUI/CtlPrefUI.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Preferences +import SSPreferences import SwiftUI extension NSImage { @@ -70,36 +70,36 @@ extension NSImage { class CtlPrefUI { var controller = PreferencesWindowController( panes: [ - Preferences.Pane( - identifier: Preferences.PaneIdentifier(rawValue: "General"), + SSPreferences.Pane( + identifier: SSPreferences.PaneIdentifier(rawValue: "General"), title: NSLocalizedString("General", comment: ""), toolbarIcon: .tabImageGeneral ) { VwrPrefPaneGeneral() }, - Preferences.Pane( - identifier: Preferences.PaneIdentifier(rawValue: "Experience"), + SSPreferences.Pane( + identifier: SSPreferences.PaneIdentifier(rawValue: "Experience"), title: NSLocalizedString("Experience", comment: ""), toolbarIcon: .tabImageExperience ) { VwrPrefPaneExperience() }, - Preferences.Pane( - identifier: Preferences.PaneIdentifier(rawValue: "Dictionary"), + SSPreferences.Pane( + identifier: SSPreferences.PaneIdentifier(rawValue: "Dictionary"), title: NSLocalizedString("Dictionary", comment: ""), toolbarIcon: .tabImageDictionary ) { VwrPrefPaneDictionary() }, - Preferences.Pane( - identifier: Preferences.PaneIdentifier(rawValue: "Keyboard"), + SSPreferences.Pane( + identifier: SSPreferences.PaneIdentifier(rawValue: "Keyboard"), title: NSLocalizedString("Keyboard", comment: ""), toolbarIcon: .tabImageKeyboard ) { VwrPrefPaneKeyboard() }, - Preferences.Pane( - identifier: Preferences.PaneIdentifier(rawValue: "DevZone"), + SSPreferences.Pane( + identifier: SSPreferences.PaneIdentifier(rawValue: "DevZone"), title: NSLocalizedString("DevZone", comment: ""), toolbarIcon: .tabImageDevZone ) { diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift index 8a6823ed..61d48cfc 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Preferences +import SSPreferences import Shared import SwiftUI @@ -42,8 +42,8 @@ struct VwrPrefPaneDevZone: View { var body: some View { ScrollView { - Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(title: "", bottomDivider: true) { + SSPreferences.Container(contentWidth: contentWidth) { + SSPreferences.Section(title: "", bottomDivider: true) { Text( LocalizedStringKey( "Warning: This page is for testing future features. \nFeatures listed here may not work as expected.") diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift index 5d463d57..146294ef 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift @@ -7,7 +7,7 @@ // requirements defined in MIT License. import BookmarkManager -import Preferences +import SSPreferences import Shared import SwiftUI diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift index 380f4cd7..dbea7626 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Preferences +import SSPreferences import Shared import SwiftUI @@ -89,8 +89,8 @@ struct VwrPrefPaneExperience: View { .preferenceDescription() .fixedSize(horizontal: false, vertical: true) }.frame(maxWidth: contentWidth) - Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(label: { Text(LocalizedStringKey("Cursor Selection:")) }) { + SSPreferences.Container(contentWidth: contentWidth) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Cursor Selection:")) }) { Picker( "", selection: $selCursorPosition.onChange { @@ -111,7 +111,7 @@ struct VwrPrefPaneExperience: View { } ).controlSize(.small) } - Preferences.Section(label: { Text(LocalizedStringKey("Shift+BackSpace:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Shift+BackSpace:")) }) { Picker( "", selection: $selSpecifyShiftBackSpaceKeyBehavior.onChange { @@ -127,7 +127,7 @@ struct VwrPrefPaneExperience: View { Text(LocalizedStringKey("Disassembling process does not work with non-phonetic reading keys.")) .preferenceDescription() } - Preferences.Section(title: "(Shift+)Tab:") { + SSPreferences.Section(title: "(Shift+)Tab:") { Picker( "", selection: $selKeyBehaviorShiftTab.onChange { @@ -143,7 +143,7 @@ struct VwrPrefPaneExperience: View { Text(LocalizedStringKey("Choose the behavior of (Shift+)Tab key in the candidate window.")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("(Shift+)Space:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("(Shift+)Space:")) }) { Picker( "", selection: $selKeyBehaviorShiftSpace.onChange { @@ -158,7 +158,7 @@ struct VwrPrefPaneExperience: View { Text(LocalizedStringKey("Choose the behavior of (Shift+)Space key with candidates.")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Shift+Letter:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Shift+Letter:")) }) { Picker( "", selection: $selUpperCaseLetterKeyBehavior.onChange { @@ -174,7 +174,7 @@ struct VwrPrefPaneExperience: View { Text(LocalizedStringKey("Choose the behavior of Shift+Letter key with letter inputs.")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Intonation Key:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Intonation Key:")) }) { Picker( "", selection: $selSpecifyIntonationKeyBehavior.onChange { @@ -190,7 +190,7 @@ struct VwrPrefPaneExperience: View { Text(LocalizedStringKey("Specify the behavior of intonation key when syllable composer is empty.")) .preferenceDescription() } - Preferences.Section(title: "Shift:") { + SSPreferences.Section(title: "Shift:") { Toggle( LocalizedStringKey("Completely disable using Shift key to toggle alphanumerical mode"), isOn: $selDisableShiftTogglingAlphanumericalMode.onChange { @@ -204,7 +204,7 @@ struct VwrPrefPaneExperience: View { } ).disabled(PrefMgr.shared.disableShiftTogglingAlphanumericalMode == true) } - Preferences.Section(title: "Caps Lock:") { + SSPreferences.Section(title: "Caps Lock:") { Toggle( LocalizedStringKey("Show notifications when toggling Caps Lock"), isOn: $selShowNotificationsWhenTogglingCapsLock.onChange { @@ -212,7 +212,7 @@ struct VwrPrefPaneExperience: View { } ).disabled(!macOSMontereyOrLaterDetected) } - Preferences.Section(label: { Text(LocalizedStringKey("Misc Settings:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Misc Settings:")) }) { Toggle( LocalizedStringKey("Enable Space key for calling candidate window"), isOn: $selKeyBehaviorSpaceForCallingCandidate.onChange { diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift index 57e749f0..7c06bf1d 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift @@ -6,7 +6,7 @@ // marks, or product names of Contributor, except as required to fulfill notice // requirements defined in MIT License. -import Preferences +import SSPreferences import Shared import SwiftUI @@ -53,8 +53,8 @@ struct VwrPrefPaneGeneral: View { var body: some View { ScrollView { - Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(label: { Text(LocalizedStringKey("Candidate Size:")) }) { + SSPreferences.Container(contentWidth: contentWidth) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Candidate Size:")) }) { Picker( "", selection: $selCandidateUIFontSize.onChange { @@ -82,7 +82,7 @@ struct VwrPrefPaneGeneral: View { Text(LocalizedStringKey("Choose candidate font size for better visual clarity.")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("UI Language:")) }) { Picker( LocalizedStringKey("Follow OS settings"), selection: $selUILanguage.onChange { @@ -114,7 +114,7 @@ struct VwrPrefPaneGeneral: View { Text(LocalizedStringKey("Change user interface language (will reboot the IME).")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Candidate Layout:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Candidate Layout:")) }) { Picker( "", selection: $selEnableHorizontalCandidateLayout.onChange { @@ -130,7 +130,7 @@ struct VwrPrefPaneGeneral: View { Text(LocalizedStringKey("Choose your preferred layout of the candidate window.")) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Output Settings:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Output Settings:")) }) { Toggle( LocalizedStringKey("Auto-convert traditional Chinese glyphs to KangXi characters"), isOn: $selEnableKanjiConvToKangXi.onChange { @@ -165,7 +165,7 @@ struct VwrPrefPaneGeneral: View { } ) } - Preferences.Section(label: { Text(LocalizedStringKey("Misc Settings:")).controlSize(.small) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Misc Settings:")).controlSize(.small) }) { Toggle( LocalizedStringKey("Check for updates automatically"), isOn: $selEnableAutoUpdateCheck.onChange { diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift index 393d5c6a..2697a6a5 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift @@ -7,7 +7,7 @@ // requirements defined in MIT License. import IMKUtils -import Preferences +import SSPreferences import Shared import SwiftUI @@ -50,8 +50,8 @@ struct VwrPrefPaneKeyboard: View { var body: some View { ScrollView { - Preferences.Container(contentWidth: contentWidth) { - Preferences.Section(label: { Text(LocalizedStringKey("Selection Keys:")) }) { + SSPreferences.Container(contentWidth: contentWidth) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Selection Keys:")) }) { ComboBox( items: CandidateKey.suggestions, text: $selSelectionKeys.onChange { @@ -94,7 +94,7 @@ struct VwrPrefPaneKeyboard: View { .preferenceDescription() } } - Preferences.Section(label: { Text(LocalizedStringKey("Quick Setup:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Quick Setup:")) }) { HStack { Button { PrefMgr.shared.keyboardParser = 0 @@ -122,7 +122,7 @@ struct VwrPrefPaneKeyboard: View { } } } - Preferences.Section(label: { Text(LocalizedStringKey("Phonetic Parser:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Phonetic Parser:")) }) { HStack { Picker( "", @@ -168,7 +168,7 @@ struct VwrPrefPaneKeyboard: View { ) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Basic Keyboard Layout:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Basic Keyboard Layout:")) }) { HStack { Picker( "", @@ -197,7 +197,7 @@ struct VwrPrefPaneKeyboard: View { ) .preferenceDescription() } - Preferences.Section(label: { Text(LocalizedStringKey("Alphanumerical Layout:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Alphanumerical Layout:")) }) { HStack { Picker( "", @@ -225,7 +225,7 @@ struct VwrPrefPaneKeyboard: View { Spacer().frame(width: 30) } } - Preferences.Section(label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { + SSPreferences.Section(label: { Text(LocalizedStringKey("Keyboard Shortcuts:")) }) { HStack(alignment: .top, spacing: NSFont.systemFontSize) { VStack(alignment: .leading) { Toggle( diff --git a/Source/Resources/en.lproj/shortcuts.html b/Source/Resources/en.lproj/shortcuts.html index 4eb9ce34..57a0a7b6 100644 --- a/Source/Resources/en.lproj/shortcuts.html +++ b/Source/Resources/en.lproj/shortcuts.html @@ -195,7 +195,7 @@
@@ -436,7 +436,7 @@
Disassembly the previous reading (i.e. the reading at the rear of the cursor) and remove its intonation. Will remove the previous reading if it is not able to be disassembled.
|
- Requiring that ICB is not empty and the IME is not in marking state. Its behavior can be specified in vChewing Preferences.
+ Requiring that ICB is not empty and the IME is not in marking state. Its behavior can be specified in vChewing SSPreferences.
|
- Requiring that ICB is not empty and the IME is not in marking state. Its behavior can be specified in vChewing Preferences.
+ Requiring that ICB is not empty and the IME is not in marking state. Its behavior can be specified in vChewing SSPreferences.
|
|
- Requiring that ICB is not empty and the IME is not in marking state. One can specify whether it dumps Hanyu-Pinyin or Phonabets in vChewing Preferences.
+ Requiring that ICB is not empty and the IME is not in marking state. One can specify whether it dumps Hanyu-Pinyin or Phonabets in vChewing SSPreferences.
|
|
- As above but can be disabled in vChewing Preferences.
+ As above but can be disabled in vChewing SSPreferences.
|
|
- Its behavior (when not in marking state) can be disabled in vChewing Preferences. If so, it will only clear the unfinished pronunciation in the PCB.
+ Its behavior (when not in marking state) can be disabled in vChewing SSPreferences. If so, it will only clear the unfinished pronunciation in the PCB.
|
|
- Can be disabled in vChewing Preferences.
+ Can be disabled in vChewing SSPreferences.
|