MCPcopy Create free account
hub / github.com/EasyIME/PIME / applyConfig

Method applyConfig

python/cinbase/__init__.py:3073–3183  ·  view source on GitHub ↗
(self, cbTS)

Source from the content-addressed store, hash-verified

3071
3072
3073 def applyConfig(self, cbTS):
3074 cfg = cbTS.cfg # 所有 TextService 共享一份設定物件
3075 cbTS.configVersion = cfg.getVersion()
3076
3077 # 每列顯示幾個候選字
3078 cbTS.candPerRow = cfg.candPerRow
3079
3080 # 如果程式為 UiLess 模式就取代設定
3081 if cbTS.client.isUiLess:
3082 cbTS.candPerRow = 1
3083
3084 # 每頁顯示幾個候選字
3085 cbTS.candPerPage = cfg.candPerPage
3086
3087 # 設定 UI 外觀
3088 cbTS.customizeUI(candFontSize = cfg.fontSize,
3089 candFontName = 'MingLiu',
3090 candPerRow = cfg.candPerRow,
3091 candUseCursor = cfg.cursorCandList)
3092
3093 # 設定選字按鍵 (123456..., asdf.... 等)
3094 # if cbTS.cin.getSelection():
3095 # cbTS.setSelKeys(cbTS.cin.getSelection())
3096
3097 # 押住 Shift 輸出英文時預設小寫?
3098 cbTS.outputSmallLetterWithShift = cfg.outputSmallLetterWithShift
3099
3100 # 使用空白鍵作為候選清單換頁鍵?
3101 cbTS.switchPageWithSpace = cfg.switchPageWithSpace
3102
3103 # 轉換輸出成簡體中文?
3104 self.setOutputSimplifiedChinese(cbTS, cfg.outputSimpChinese)
3105
3106 # 使用 Ctrl+F12 切換繁體/簡體?
3107 cbTS.enableSwitchTCSC = cfg.enableSwitchTCSC
3108
3109 # Shift 輸入全形標點?
3110 cbTS.fullShapeSymbols = cfg.fullShapeSymbols
3111
3112 # 直接輸出全形標點首個候選符號?
3113 cbTS.directOutFSymbols = cfg.directOutFSymbols
3114
3115 # Shift 快速輸入符號?
3116 cbTS.easySymbolsWithShift = cfg.easySymbolsWithShift
3117
3118 # 提示訊息顯示時間?
3119 cbTS.messageDurationTime = cfg.messageDurationTime
3120
3121 # 隱藏提示訊息?
3122 cbTS.hidePromptMessages = cfg.hidePromptMessages
3123
3124 # 輸出字串後顯示聯想字詞?
3125 cbTS.showPhrase = cfg.showPhrase
3126
3127 # 優先以聯想字詞排序候選清單?
3128 cbTS.sortByPhrase = cfg.sortByPhrase
3129
3130 # 拆錯字碼時自動清除輸入字串?

Callers 2

initCinBaseContextMethod · 0.95
checkConfigChangeMethod · 0.95

Calls 3

customizeUIMethod · 0.80
getVersionMethod · 0.45

Tested by

no test coverage detected