cosmetic change and change the location of the user dictionary
This commit is contained in:
parent
da5d323082
commit
373c631036
|
@ -796,7 +796,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
<object class="NSButtonCell" key="NSCell" id="1041607992">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents">Use spce key to choose candidates</string>
|
||||
<string key="NSContents">Use space key to choose candidates</string>
|
||||
<reference key="NSSupport" ref="113866199"/>
|
||||
<string key="NSCellIdentifier">_NS:239</string>
|
||||
<reference key="NSControlView" ref="11182933"/>
|
||||
|
|
|
@ -286,6 +286,7 @@ public:
|
|||
[_composingBuffer setString:@""];
|
||||
}
|
||||
|
||||
// TODO: bug #28 is more likely to live in this method.
|
||||
- (void)updateClientComposingBuffer:(id)client
|
||||
{
|
||||
// "updating the composing buffer" means to request the client to "refresh" the text input buffer
|
||||
|
@ -520,6 +521,7 @@ public:
|
|||
if (![[NSUserDefaults standardUserDefaults] boolForKey:kDisableUserCandidateSelectionLearning]) {
|
||||
NSString *trigram = [self neighborTrigramString];
|
||||
|
||||
// Lookup from the user dict to see if the trigram fit or not
|
||||
NSString *overrideCandidateString = [TLCandidateLearningDictionary objectForKey:trigram];
|
||||
if (overrideCandidateString) {
|
||||
[self candidateSelected:(NSAttributedString *)overrideCandidateString];
|
||||
|
@ -537,6 +539,7 @@ public:
|
|||
// keyCode 125 = Down, charCode 32 = Space
|
||||
if (_bpmfReadingBuffer->isEmpty() && [_composingBuffer length] > 0 && (keyCode == downKey || charCode == 32)) {
|
||||
if (charCode == 32) {
|
||||
// if the spacebar is NOT set to be a selection key
|
||||
if (![[NSUserDefaults standardUserDefaults] boolForKey:kChooseCandidateUsingSpaceKey]) {
|
||||
if (_builder->cursorIndex() >= _builder->length()) {
|
||||
[_composingBuffer appendString:@" "];
|
||||
|
@ -572,6 +575,8 @@ public:
|
|||
|
||||
[self updateClientComposingBuffer:client];
|
||||
return YES;
|
||||
//可能的行為包括 1. 取消組字, 把字吃掉 2. 取消 candidate 選擇, 恢復原來的
|
||||
//3. 取消組字,現出注音
|
||||
}
|
||||
|
||||
// The Right key, note we use keyCode here
|
||||
|
@ -1005,8 +1010,7 @@ void LTLoadLanguageModel()
|
|||
|
||||
NSString *appSupportPath = [paths objectAtIndex:0];
|
||||
|
||||
// TODO: Change this
|
||||
NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"Lettuce"];
|
||||
NSString *userDictPath = [appSupportPath stringByAppendingPathComponent:@"McBopomofo"];
|
||||
|
||||
BOOL isDir = NO;
|
||||
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:userDictPath isDirectory:&isDir];
|
||||
|
|
Loading…
Reference in New Issue