SessionCtl // Remove useless delegate symbols.

This commit is contained in:
ShikiSuen 2022-10-08 23:22:30 +08:00
parent b5abb2db4e
commit 4c44cf09c9
2 changed files with 0 additions and 13 deletions

View File

@ -10,10 +10,8 @@ import Cocoa
public protocol CtlCandidateDelegate: AnyObject { public protocol CtlCandidateDelegate: AnyObject {
func candidatePairs(conv: Bool) -> [(String, String)] func candidatePairs(conv: Bool) -> [(String, String)]
func candidatePairAt(_ index: Int) -> (String, String)
func candidatePairSelected(at index: Int) func candidatePairSelected(at index: Int)
func candidates(_ sender: Any!) -> [Any]! func candidates(_ sender: Any!) -> [Any]!
func buzz()
var selectionKeys: String { get } var selectionKeys: String { get }
} }

View File

@ -57,10 +57,6 @@ extension SessionCtl: CtlCandidateDelegate {
PrefMgr.shared.useIMKCandidateWindow ? "123456789" : PrefMgr.shared.candidateKeys PrefMgr.shared.useIMKCandidateWindow ? "123456789" : PrefMgr.shared.candidateKeys
} }
func buzz() {
IMEApp.buzz()
}
func candidatePairs(conv: Bool = false) -> [(String, String)] { func candidatePairs(conv: Bool = false) -> [(String, String)] {
if !state.isCandidateContainer || state.candidates.isEmpty { return [] } if !state.isCandidateContainer || state.candidates.isEmpty { return [] }
if !conv || PrefMgr.shared.cns11643Enabled || state.candidates[0].0.contains("_punctuation") { if !conv || PrefMgr.shared.cns11643Enabled || state.candidates[0].0.contains("_punctuation") {
@ -75,13 +71,6 @@ extension SessionCtl: CtlCandidateDelegate {
return convertedCandidates return convertedCandidates
} }
func candidatePairAt(_ index: Int) -> (String, String) {
if state.isCandidateContainer, state.candidates.count > index {
return state.candidates[index]
}
return ("", "")
}
func candidatePairSelected(at index: Int) { func candidatePairSelected(at index: Int) {
if state.type == .ofSymbolTable, (0..<state.node.members.count).contains(index) { if state.type == .ofSymbolTable, (0..<state.node.members.count).contains(index) {
let node = state.node.members[index] let node = state.node.members[index]