t-suw****@users*****
t-suw****@users*****
2008年 1月 12日 (土) 12:32:10 JST
Index: AquaSKK/AsciiConversionMode.cpp diff -u AquaSKK/AsciiConversionMode.cpp:1.13 AquaSKK/AsciiConversionMode.cpp:1.14 --- AquaSKK/AsciiConversionMode.cpp:1.13 Sun Nov 11 14:18:52 2007 +++ AquaSKK/AsciiConversionMode.cpp Sat Jan 12 12:32:09 2008 @@ -1,10 +1,10 @@ /* - $Id: AsciiConversionMode.cpp,v 1.13 2007/11/11 05:18:52 t-suwa Exp $ + $Id: AsciiConversionMode.cpp,v 1.14 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -254,10 +254,11 @@ return parent->handleInput(skkchar); } else if(status == STATUS_BLACK_WITH_WINDOW) { - // asdfjklï¼1ãã¬ã¼ã å½ããã®åè£æ°ã7ããå°ãªããã°ãããæ¸ããï¼ã®æåã§ããã° - // ãã®åè£ããã 確å®ããã - // ããã§ãªããã°ç¾å¨ã®åè£ããã 確å®ããã - int cand_index = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame).indexOf(skkchar); + // é¸æãããåè£ã§ç¢ºå®ãã + CppCFString labels(SKKConfig::CandidateLabels().c_str()); + labels = labels.substring(0, candidates_window_cands_per_frame); + + int cand_index = labels.indexOf(std::toupper(skkchar)); if(cand_index != -1) { unsigned new_index = current_candidate_index + cand_index; if(new_index < candidates.size()) { Index: AquaSKK/CandidatesFrame.h diff -u AquaSKK/CandidatesFrame.h:1.3 AquaSKK/CandidatesFrame.h:1.4 --- AquaSKK/CandidatesFrame.h:1.3 Wed Apr 26 22:36:12 2006 +++ AquaSKK/CandidatesFrame.h Sat Jan 12 12:32:09 2008 @@ -1,10 +1,10 @@ /* -*- objc -*- - $Id: CandidatesFrame.h,v 1.3 2006/04/26 13:36:12 t-suwa Exp $ + $Id: CandidatesFrame.h,v 1.4 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ // t[®« @interface FrameAttribute : NSObject { - NSString* labels_; // ANZX¶ + NSString* labels_; // óâx int candidatesCount_; // óâ NSString* entry_; // PêÌóâ NSString* caption_; // [cè nnn] Index: AquaSKK/CandidatesFrame.m diff -u AquaSKK/CandidatesFrame.m:1.5 AquaSKK/CandidatesFrame.m:1.6 --- AquaSKK/CandidatesFrame.m:1.5 Wed Apr 26 22:36:12 2006 +++ AquaSKK/CandidatesFrame.m Sat Jan 12 12:32:09 2008 @@ -1,10 +1,10 @@ /* - $Id: CandidatesFrame.m,v 1.5 2006/04/26 13:36:12 t-suwa Exp $ + $Id: CandidatesFrame.m,v 1.6 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,13 +24,15 @@ #include <AppKit/AppKit.h> #include "CandidatesFrame.h" #include "PreferenceKeys.h" +#include "SKKConfig.h" @implementation FrameAttribute - (id)init { if((self = [super init])) { // x - labels_ = @"ASDFJKL"; + const char* candidate_labels = SKKConfig::CandidateLabels().c_str(); + labels_ = [[NSString alloc] initWithCString:candidate_labels]; // PêÌGg char* data = " A ¿ "; @@ -53,6 +55,13 @@ return self; } +- (void)dealloc { + [labels_ release]; + [entry_ release]; + + [super dealloc]; +} + + (id)sharedFrameAttribute { static FrameAttribute* obj = NULL; Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.57 AquaSKK/ChangeLog:1.58 --- AquaSKK/ChangeLog:1.57 Fri Dec 21 22:11:21 2007 +++ AquaSKK/ChangeLog Sat Jan 12 12:32:09 2008 @@ -1,3 +1,13 @@ +2008-01-12 Tomotaka SUWA <t.suw****@mac*****> + + * CandidatesFrame.*: SKKConfig::CandidateLabels() ã«å¯¾å¿ã + + * KanjiConversionMode.cpp, AsciiConversionMode.cpp: + SKKConfig::CandidateLabels() ã«å¯¾å¿ã + + * SKKConfig.*: åè£ã©ãã«ã®ã«ã¹ã¿ã¤ãã¤ãºç¨ã«ã + SKKConfig::CandidateLabels() ã追å ã + 2007-12-21 Tomotaka SUWA <t.suw****@mac*****> * AquaSKKServer.mm: è¾æ¸ãµã¼ãã¼ã®åã«ã¡ãã»ã¼ã¸ãã³ãã©ãåæåã Index: AquaSKK/Info-AquaSKKInputMethod.plist diff -u AquaSKK/Info-AquaSKKInputMethod.plist:1.24 AquaSKK/Info-AquaSKKInputMethod.plist:1.25 --- AquaSKK/Info-AquaSKKInputMethod.plist:1.24 Fri Dec 21 22:11:21 2007 +++ AquaSKK/Info-AquaSKKInputMethod.plist Sat Jan 12 12:32:09 2008 @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>thng</string> <key>CFBundleShortVersionString</key> - <string>objc-gc 1.3</string> + <string>objc-gc 1.5</string> <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2007-12-21</string> + <string>2008-01-12</string> <key>CSResourcesFileMapped</key> <true/> <key>tsInputMethodIconFileKey</key> Index: AquaSKK/Info-AquaSKKServer.plist diff -u AquaSKK/Info-AquaSKKServer.plist:1.24 AquaSKK/Info-AquaSKKServer.plist:1.25 --- AquaSKK/Info-AquaSKKServer.plist:1.24 Fri Dec 21 22:11:21 2007 +++ AquaSKK/Info-AquaSKKServer.plist Sat Jan 12 12:32:09 2008 @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>objc-gc 1.3</string> + <string>objc-gc 1.5</string> <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2007-12-21</string> + <string>2008-01-12</string> <key>NSMainNibFile</key> <string>Principal</string> <key>NSPrincipalClass</key> Index: AquaSKK/KanjiConversionMode.cpp diff -u AquaSKK/KanjiConversionMode.cpp:1.19 AquaSKK/KanjiConversionMode.cpp:1.20 --- AquaSKK/KanjiConversionMode.cpp:1.19 Sun Nov 11 19:23:16 2007 +++ AquaSKK/KanjiConversionMode.cpp Sat Jan 12 12:32:09 2008 @@ -1,10 +1,10 @@ /* - $Id: KanjiConversionMode.cpp,v 1.19 2007/11/11 10:23:16 t-suwa Exp $ + $Id: KanjiConversionMode.cpp,v 1.20 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -349,9 +349,10 @@ // é¸æãããåè£ã§ç¢ºå®ãã if(status == STATUS_BLACK_WITH_WINDOW) { - CppCFString labels = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame); - int cand_index = labels.indexOf(std::tolower(skkchar)); - + CppCFString labels(SKKConfig::CandidateLabels().c_str()); + labels = labels.substring(0, candidates_window_cands_per_frame); + + int cand_index = labels.indexOf(std::toupper(skkchar)); if(cand_index != -1) { unsigned new_index = current_candidate_index + cand_index; if(new_index < candidates.size()) { Index: AquaSKK/SKKConfig.cpp diff -u AquaSKK/SKKConfig.cpp:1.2 AquaSKK/SKKConfig.cpp:1.3 --- AquaSKK/SKKConfig.cpp:1.2 Sat Jul 1 08:44:30 2006 +++ AquaSKK/SKKConfig.cpp Sat Jan 12 12:32:09 2008 @@ -1,9 +1,9 @@ /* - $Id: SKKConfig.cpp,v 1.2 2006/06/30 23:44:30 t-suwa Exp $ + $Id: SKKConfig.cpp,v 1.3 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,6 +64,8 @@ #define SKK_USE_EISUU_TO_SET_HENKAN_POINT "use-eisuu-to-set-henkan-point" #define SKK_USE_KANA_TO_SET_HENKAN_POINT "use-kana-to-set-henkan-point" +#define SKK_CANDIDATE_LABELS "candidate-labels" + // ÝèÌ^Cv enum ConfigType { TYPE_INVALID, @@ -100,6 +102,8 @@ { SKK_USE_EISUU_TO_SET_HENKAN_POINT, TYPE_BOOLEAN }, { SKK_USE_KANA_TO_SET_HENKAN_POINT, TYPE_BOOLEAN }, + { SKK_CANDIDATE_LABELS, TYPE_STRING }, + { NULL, TYPE_INVALID } }; @@ -449,6 +453,12 @@ return (result.num == 1); } +std::string SKKConfig::CandidateLabels() { + ConfigEntry result = ConfigSettings::theInstance().Get(SKK_CANDIDATE_LABELS); + + return result.str; +} + bool SKKConfig::UseKanaToOkuri() { return OkuriConversionTable::theInstance().Enabled(); } Index: AquaSKK/SKKConfig.h diff -u AquaSKK/SKKConfig.h:1.1 AquaSKK/SKKConfig.h:1.2 --- AquaSKK/SKKConfig.h:1.1 Wed May 17 01:13:10 2006 +++ AquaSKK/SKKConfig.h Sat Jan 12 12:32:09 2008 @@ -1,10 +1,10 @@ /* -*- c++ -*- - $Id: SKKConfig.h,v 1.1 2006/05/16 16:13:10 t-suwa Exp $ + $Id: SKKConfig.h,v 1.2 2008/01/12 03:32:09 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2008 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,6 +67,8 @@ static bool UseEisuuToSetHenkanPoint(); static bool UseKanaToSetHenkanPoint(); + static std::string CandidateLabels(); + static bool UseKanaToOkuri(); static UniChar ConvertKanaToOkuri(UniChar c);