ctlIME // Move areWeUsingOurOwnPhraseEditor to IME module.

This commit is contained in:
ShikiSuen 2022-04-04 13:43:08 +08:00
parent 30e734d0fa
commit 3240ec1567
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; return NO;
NSArray *readings = [self _currentReadings]; NSArray *readings = [self _currentReadings];
NSString *composingBuffer = (ctlInputMethod.areWeUsingOurOwnPhraseEditor) NSString *composingBuffer = (IME.areWeUsingOurOwnPhraseEditor) ? [readings componentsJoinedByString:@"-"]
? [readings componentsJoinedByString:@"-"] : [readings componentsJoinedByString:@" "];
: [readings componentsJoinedByString:@" "];
[self clear]; [self clear];

View File

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

View File

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