From 8fd236a0652b0aee27da8286fb77d11d73624323 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Thu, 29 Sep 2022 21:11:20 +0800 Subject: [PATCH] Repo // Removing page button toggle. --- .../Sources/CandidateWindow/CtlCandidate.swift | 1 - .../Sources/Shared/Protocols/CtlCandidateProtocol.swift | 1 - Source/Modules/SessionCtl_HandleDisplay.swift | 1 - Source/Modules/UIModules/CandidateUI/IMKCandidatesImpl.swift | 1 - Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift | 2 -- 5 files changed, 6 deletions(-) diff --git a/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/CtlCandidate.swift b/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/CtlCandidate.swift index 99ab78f6..70fca894 100644 --- a/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/CtlCandidate.swift +++ b/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/CtlCandidate.swift @@ -11,7 +11,6 @@ import Shared open class CtlCandidate: NSWindowController, CtlCandidateProtocol { open var hint: String = "" - open var showPageButtons: Bool = false open var currentLayout: NSUserInterfaceLayoutOrientation = .horizontal open var locale: String = "" open var useLangIdentifier: Bool = false diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift index 358e986a..f739ba39 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift @@ -30,7 +30,6 @@ public protocol CtlCandidateProtocol { var candidateFont: NSFont { get set } var tooltip: String { get set } var useLangIdentifier: Bool { get set } - var showPageButtons: Bool { get set } init(_ layout: NSUserInterfaceLayoutOrientation) func reloadData() diff --git a/Source/Modules/SessionCtl_HandleDisplay.swift b/Source/Modules/SessionCtl_HandleDisplay.swift index a0ff1734..c81dfe8f 100644 --- a/Source/Modules/SessionCtl_HandleDisplay.swift +++ b/Source/Modules/SessionCtl_HandleDisplay.swift @@ -142,7 +142,6 @@ extension SessionCtl { Self.ctlCandidateCurrent.hint = NSLocalizedString("Hold ⇧ to choose associates.", comment: "") } - Self.ctlCandidateCurrent.showPageButtons = PrefMgr.shared.showPageButtonsInCandidateWindow Self.ctlCandidateCurrent.useLangIdentifier = PrefMgr.shared.handleDefaultCandidateFontsByLangIdentifier Self.ctlCandidateCurrent.locale = { switch inputMode { diff --git a/Source/Modules/UIModules/CandidateUI/IMKCandidatesImpl.swift b/Source/Modules/UIModules/CandidateUI/IMKCandidatesImpl.swift index 5257ab85..089f4b55 100644 --- a/Source/Modules/UIModules/CandidateUI/IMKCandidatesImpl.swift +++ b/Source/Modules/UIModules/CandidateUI/IMKCandidatesImpl.swift @@ -12,7 +12,6 @@ import Shared /// 威注音自用的 IMKCandidates 型別。因為有用到 bridging header,所以無法弄成 Swift Package。 public class CtlCandidateIMK: IMKCandidates, CtlCandidateProtocol { public var hint: String = "" - public var showPageButtons: Bool = false public var locale: String = "" public var useLangIdentifier: Bool = false public var currentLayout: NSUserInterfaceLayoutOrientation = .horizontal diff --git a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift index 5a344ed7..379846b0 100644 --- a/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/suiPrefPaneGeneral.swift @@ -23,8 +23,6 @@ struct suiPrefPaneGeneral: View { : ["auto"] @State private var selEnableHorizontalCandidateLayout = UserDefaults.standard.bool( forKey: UserDef.kUseHorizontalCandidateList.rawValue) - @State private var selShowPageButtonsInCandidateUI = UserDefaults.standard.bool( - forKey: UserDef.kShowPageButtonsInCandidateWindow.rawValue) @State private var selEnableKanjiConvToKangXi = UserDefaults.standard.bool( forKey: UserDef.kChineseConversionEnabled.rawValue) @State private var selEnableKanjiConvToJIS = UserDefaults.standard.bool(