(self, client)
| 31 | compositionChar = '' |
| 32 | |
| 33 | def __init__(self, client): |
| 34 | TextService.__init__(self, client) |
| 35 | |
| 36 | # 輸入法模組自訂區域 |
| 37 | self.imeDirName = "chearray" |
| 38 | self.maxCharLength = 4 # 輸入法最大編碼字元數量 |
| 39 | self.cinFileList = ["tharray.json", "array30.json", "ar30-big.json", "array40.json"] |
| 40 | |
| 41 | self.cinbase = CinBase |
| 42 | self.curdir = os.path.abspath(os.path.dirname(__file__)) |
| 43 | |
| 44 | # 初始化輸入行為設定 |
| 45 | self.cinbase.initTextService(self, TextService) |
| 46 | |
| 47 | # 載入用戶設定值 |
| 48 | CinBaseConfig.__init__() |
| 49 | self.configVersion = CinBaseConfig.getVersion() |
| 50 | self.cfg = copy.deepcopy(CinBaseConfig) |
| 51 | self.cfg.imeDirName = self.imeDirName |
| 52 | self.cfg.cinFileList = self.cinFileList |
| 53 | self.cfg.load() |
| 54 | self.jsondir = self.cfg.getJsonDir() |
| 55 | self.cindir = self.cfg.getCinDir() |
| 56 | self.ignorePrivateUseArea = self.cfg.ignorePrivateUseArea |
| 57 | self.cinbase.initCinBaseContext(self) |
| 58 | |
| 59 | # 載入輸入法碼表 |
| 60 | if not CinTable.curCinType == self.cfg.selCinType and not CinTable.loading: |
| 61 | loadCinFile = LoadCinTable(self, CinTable) |
| 62 | loadCinFile.start() |
| 63 | else: |
| 64 | while CinTable.loading: |
| 65 | continue |
| 66 | self.cin = CinTable.cin |
| 67 | |
| 68 | |
| 69 | # 檢查設定檔是否有被更改,是否需要套用新設定 |
nothing calls this directly
no test coverage detected