mgrPref // +InlineDumpPinyinInLieuOfZhuyin.
This commit is contained in:
parent
94fcf061d2
commit
878c53ab44
|
@ -54,6 +54,7 @@ struct UserDef {
|
|||
static let kMaxCandidateLength = "MaxCandidateLength"
|
||||
static let kShouldNotFartInLieuOfBeep = "ShouldNotFartInLieuOfBeep"
|
||||
static let kShowHanyuPinyinInCompositionBuffer = "ShowHanyuPinyinInCompositionBuffer"
|
||||
static let kInlineDumpPinyinInLieuOfZhuyin = "InlineDumpPinyinInLieuOfZhuyin"
|
||||
|
||||
static let kCandidateTextFontName = "CandidateTextFontName"
|
||||
static let kCandidateKeyLabelFontName = "CandidateKeyLabelFontName"
|
||||
|
@ -232,6 +233,7 @@ public class mgrPrefs: NSObject {
|
|||
UserDef.kMaxCandidateLength,
|
||||
UserDef.kShouldNotFartInLieuOfBeep,
|
||||
UserDef.kShowHanyuPinyinInCompositionBuffer,
|
||||
UserDef.kInlineDumpPinyinInLieuOfZhuyin,
|
||||
UserDef.kAssociatedPhrasesEnabled,
|
||||
]
|
||||
}
|
||||
|
@ -277,6 +279,8 @@ public class mgrPrefs: NSObject {
|
|||
UserDefaults.standard.setDefault(mgrPrefs.shouldNotFartInLieuOfBeep, forKey: UserDef.kShouldNotFartInLieuOfBeep)
|
||||
UserDefaults.standard.setDefault(
|
||||
mgrPrefs.showHanyuPinyinInCompositionBuffer, forKey: UserDef.kShowHanyuPinyinInCompositionBuffer)
|
||||
UserDefaults.standard.setDefault(
|
||||
mgrPrefs.inlineDumpPinyinInLieuOfZhuyin, forKey: UserDef.kInlineDumpPinyinInLieuOfZhuyin)
|
||||
|
||||
UserDefaults.standard.synchronize()
|
||||
}
|
||||
|
@ -359,6 +363,9 @@ public class mgrPrefs: NSObject {
|
|||
@UserDefault(key: UserDef.kShowHanyuPinyinInCompositionBuffer, defaultValue: false)
|
||||
static var showHanyuPinyinInCompositionBuffer: Bool
|
||||
|
||||
@UserDefault(key: UserDef.kInlineDumpPinyinInLieuOfZhuyin, defaultValue: false)
|
||||
static var inlineDumpPinyinInLieuOfZhuyin: Bool
|
||||
|
||||
static func toggleShouldNotFartInLieuOfBeep() -> Bool {
|
||||
shouldNotFartInLieuOfBeep = !shouldNotFartInLieuOfBeep
|
||||
UserDefaults.standard.set(shouldNotFartInLieuOfBeep, forKey: UserDef.kShouldNotFartInLieuOfBeep)
|
||||
|
|
Loading…
Reference in New Issue