NVDA with Japanese branch
Revisión | f20463358acbc368a99c4f6c83240e32ffeb733d (tree) |
---|---|
Tiempo | 2013-05-11 10:56:42 |
Autor | Takuya Nishimoto <nishimotz@gmai...> |
Commiter | Takuya Nishimoto |
work around ImmGetCandiateList. ti31317
@@ -326,7 +326,19 @@ static bool handleCandidates(HWND hwnd) { | ||
326 | 326 | } |
327 | 327 | |
328 | 328 | /* Concatenate currently shown candidates into a string */ |
329 | +#if 0 | |
329 | 330 | WCHAR* cand_str = (WCHAR*)malloc(len); |
331 | +#else | |
332 | + size_t buflen = 1; // make sure len != 0 | |
333 | + for (DWORD n = list->dwPageStart; n < pageEnd; ++n) { | |
334 | + DWORD offset = list->dwOffset[n]; | |
335 | + WCHAR* cand = (WCHAR*)(((char*)list) + offset); | |
336 | + size_t clen = wcslen(cand); | |
337 | + buflen += (clen + 1) * sizeof(WCHAR); | |
338 | + } | |
339 | + WCHAR* cand_str = (WCHAR*)malloc(buflen); | |
340 | + cand_str[0] = '\0'; | |
341 | +#endif | |
330 | 342 | WCHAR* ptr = cand_str; |
331 | 343 | for (DWORD n = list->dwPageStart, count = 0; n < pageEnd; ++n) { |
332 | 344 | DWORD offset = list->dwOffset[n]; |
@@ -239,6 +239,7 @@ def nvdaControllerInternal_inputCompositionUpdate(compositionString,selectionSta | ||
239 | 239 | return 0 |
240 | 240 | |
241 | 241 | def handleInputCandidateListUpdate(candidatesString,selectionIndex,inputMethod): |
242 | + log.info(u"(%s) (%s) (%s)" % (unicode(candidatesString).replace('\n','|'),str(selectionIndex),unicode(inputMethod))) | |
242 | 243 | candidateStrings=candidatesString.split('\n') |
243 | 244 | import speech |
244 | 245 | from NVDAObjects.inputComposition import InputComposition, CandidateList, CandidateItem |