(self)
| 69 | self.enumerateServices() |
| 70 | |
| 71 | def enumerateServices(self): |
| 72 | # To enumerate currently installed Input Method |
| 73 | currentDir = os.path.dirname(os.path.abspath(__file__)) |
| 74 | input_methods_dir = os.path.join(currentDir, "input_methods") |
| 75 | for subdir in os.listdir(input_methods_dir): |
| 76 | filename = os.path.join(input_methods_dir, subdir, "ime.json") |
| 77 | if os.path.exists(filename): |
| 78 | info = TextServiceInfo() |
| 79 | info.loadFromJson(filename) |
| 80 | print(info.guid) |
| 81 | if info.guid: |
| 82 | self.services[info.guid] = info |
| 83 | |
| 84 | def createService(self, client, guid): |
| 85 | guid = guid.lower() |
no test coverage detected