Permalink
Browse files

Add hangul_ic_set_option

  • Loading branch information...
dorururu committed Oct 21, 2018
1 parent b585cbe commit 10e55e80740649333a51e0178808c813bd959e1b
Showing with 84 additions and 32 deletions.
  1. +20 −0 OSX/GureumConfiguration.swift
  2. +2 −0 OSX/HangulComposer.swift
  3. +46 −20 Preferences/Base.lproj/Preferences.xib
  4. +15 −11 Preferences/Preferences.swift
  5. +1 −1 libhangul-objc
@@ -31,6 +31,8 @@ enum GureumConfigurationName: String {
case showsInputForHanjaCandidates = "CIMShowsInputForHanjaCandidates"
case skippedVersion = "SkippedVersion"
case hangulWonCurrencySymbolForBackQuote = "HangulWonCurrencySymbolForBackQuote"
case hangulAutoReorder = "HangulAutoReorder"
case hangulNonChoseongCombination = "HangulNonChoseongCombination"
}
@@ -195,6 +197,24 @@ enum GureumConfigurationName: String {
return self.set(newValue, forKey: GureumConfigurationName.hangulWonCurrencySymbolForBackQuote.rawValue)
}
}
public var hangulAutoReorder: Bool {
get {
return self.bool(forKey: GureumConfigurationName.hangulAutoReorder.rawValue)
}
set {
return self.set(newValue, forKey: GureumConfigurationName.hangulAutoReorder.rawValue)
}
}
public var hangulNonChoseongCombination: Bool {
get {
return self.bool(forKey: GureumConfigurationName.hangulNonChoseongCombination.rawValue)
}
set {
return self.set(newValue, forKey: GureumConfigurationName.hangulNonChoseongCombination.rawValue)
}
}
static let _shared = GureumConfiguration()
@@ -45,6 +45,8 @@ class HangulComposerCombination {
return nil
}
self._inputContext = inputContext
self._inputContext.setOption(HANGUL_IC_OPTION_AUTO_REORDER, value: configuration.hangulAutoReorder)
self._inputContext.setOption(HANGUL_IC_OPTION_NON_CHOSEONG_COMBI, value: configuration.hangulNonChoseongCombination)
super.init()
}
Oops, something went wrong.

0 comments on commit 10e55e8

Please sign in to comment.