ctlIME // Move areWeUsingOurOwnPhraseEditor to IME module.

This commit is contained in:
ShikiSuen 2022-04-04 13:43:08 +08:00
parent f72c7f978d
commit 50c1928aea
3 changed files with 7 additions and 11 deletions

View File

@ -1089,9 +1089,8 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
return NO;
NSArray *readings = [self _currentReadings];
NSString *composingBuffer = (ctlInputMethod.areWeUsingOurOwnPhraseEditor)
? [readings componentsJoinedByString:@"-"]
: [readings componentsJoinedByString:@" "];
NSString *composingBuffer = (IME.areWeUsingOurOwnPhraseEditor) ? [readings componentsJoinedByString:@"-"]
: [readings componentsJoinedByString:@" "];
[self clear];

View File

@ -28,6 +28,9 @@ import Cocoa
static let dlgOpenPath = NSOpenPanel()
// MARK: -
@objc static var areWeUsingOurOwnPhraseEditor: Bool = false
// MARK: - Print debug information to the console.
@objc static func prtDebugIntel(_ strPrint: String) {
if mgrPrefs.isDebugModeEnabled {

View File

@ -271,9 +271,9 @@ class ctlInputMethod: IMKInputController {
if (client as? IMKTextInput)?.bundleIdentifier()
== "org.atelierInmu.vChewing.vChewingPhraseEditor"
{
ctlInputMethod.areWeUsingOurOwnPhraseEditor = true
IME.areWeUsingOurOwnPhraseEditor = true
} else {
ctlInputMethod.areWeUsingOurOwnPhraseEditor = false
IME.areWeUsingOurOwnPhraseEditor = false
}
let input = keyParser(event: event, isVerticalMode: useVerticalMode)
@ -767,12 +767,6 @@ extension ctlInputMethod {
}
}
// MARK: -
@objc extension ctlInputMethod {
@objc static var areWeUsingOurOwnPhraseEditor: Bool = false
}
// MARK: -
extension ctlInputMethod: KeyHandlerDelegate {