Tomotaka SUWA
t-suw****@users*****
2006年 7月 1日 (土) 08:44:30 JST
Index: AquaSKK/BIM.cpp diff -u AquaSKK/BIM.cpp:1.13 AquaSKK/BIM.cpp:1.14 --- AquaSKK/BIM.cpp:1.13 Wed May 17 01:13:10 2006 +++ AquaSKK/BIM.cpp Sat Jul 1 08:44:30 2006 @@ -1,5 +1,5 @@ /* - $Id: BIM.cpp,v 1.13 2006/05/16 16:13:10 t-suwa Exp $ + $Id: BIM.cpp,v 1.14 2006/06/30 23:44:30 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -381,7 +381,7 @@ } } - switch(event) { + switch(event.CharCode()) { case kNullCharCode: return true; case kBackspaceCharCode: Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.30 AquaSKK/ChangeLog:1.31 --- AquaSKK/ChangeLog:1.30 Thu Jun 15 10:24:32 2006 +++ AquaSKK/ChangeLog Sat Jul 1 08:44:30 2006 @@ -1,3 +1,15 @@ +2006-07-01 Tomotaka SUWA <t.suw****@mac*****> + + * SKKDictionary.cpp: SKK-JISYO.jinmei ª_E[hÅ«È¢sï + ðC³B[U[«Ì static ÏðB + + * SKKConfig.cpp: SKK_BACKSPACE_KEY Æ SKK_INDENT_KEY ðVKÇÁB + + * Resources/config: backspace-key Æ indent-key ðÇÁB + + * BIM.cpp: SKKCHAR ÅÍÈAMacCharCode ð»è·éæ¤ÉC³B±ê + ÉæèACtrl-H ¨ BACKSPACE â Ctrl-I ¨ TAB + 2006-06-15 Tomotaka SUWA <t.suw****@mac*****> * Resources/UserDefaults.plist: lÏ·ÌftHgðÇÁB Index: AquaSKK/NumericConverter.cpp diff -u AquaSKK/NumericConverter.cpp:1.2 AquaSKK/NumericConverter.cpp:1.3 --- AquaSKK/NumericConverter.cpp:1.2 Sat Jun 10 10:51:01 2006 +++ AquaSKK/NumericConverter.cpp Sat Jul 1 08:44:30 2006 @@ -1,5 +1,5 @@ /* - $Id: NumericConverter.cpp,v 1.2 2006/06/10 01:51:01 t-suwa Exp $ + $Id: NumericConverter.cpp,v 1.3 2006/06/30 23:44:30 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <sstream> #include "NumericConverter.h" // ====================================================================== Index: AquaSKK/SKKConfig.cpp diff -u AquaSKK/SKKConfig.cpp:1.1 AquaSKK/SKKConfig.cpp:1.2 --- AquaSKK/SKKConfig.cpp:1.1 Wed May 17 01:13:10 2006 +++ AquaSKK/SKKConfig.cpp Sat Jul 1 08:44:30 2006 @@ -1,5 +1,5 @@ /* - $Id: SKKConfig.cpp,v 1.1 2006/05/16 16:13:10 t-suwa Exp $ + $Id: SKKConfig.cpp,v 1.2 2006/06/30 23:44:30 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -55,9 +55,12 @@ #define SKK_ABBREV_NEXT_KEY "abbrev-next-key" #define SKK_PURGE_FROM_JISYO_KEY "purge-from-jisyo-key" #define SKK_CANCEL_KEY "cancel-key" -#define SKK_FIX_N "fix-n" #define SKK_SET_HENKAN_POINT_KEY "set-henkan-point-key" #define SKK_PASTE_KEY "paste-key" +#define SKK_BACKSPACE_KEY "backspace-key" // Ctrl-H +#define SKK_INDENT_KEY "indent-key" // Ctrl-I + +#define SKK_FIX_N "fix-n" #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" @@ -88,11 +91,15 @@ { SKK_ABBREV_NEXT_KEY, TYPE_KEYCODE }, { SKK_PURGE_FROM_JISYO_KEY, TYPE_KEYCODE }, { SKK_CANCEL_KEY, TYPE_KEYCODE }, - { SKK_FIX_N, TYPE_BOOLEAN }, { SKK_SET_HENKAN_POINT_KEY, TYPE_KEYCODE }, { SKK_PASTE_KEY, TYPE_KEYCODE }, + { SKK_BACKSPACE_KEY, TYPE_KEYCODE }, + { SKK_INDENT_KEY, TYPE_KEYCODE }, + + { SKK_FIX_N, TYPE_BOOLEAN }, { SKK_USE_EISUU_TO_SET_HENKAN_POINT, TYPE_BOOLEAN }, { SKK_USE_KANA_TO_SET_HENKAN_POINT, TYPE_BOOLEAN }, + { NULL, TYPE_INVALID } }; Index: AquaSKK/SKKDictionary.cpp diff -u AquaSKK/SKKDictionary.cpp:1.11 AquaSKK/SKKDictionary.cpp:1.12 --- AquaSKK/SKKDictionary.cpp:1.11 Mon Jun 12 23:14:48 2006 +++ AquaSKK/SKKDictionary.cpp Sat Jul 1 08:44:30 2006 @@ -1,5 +1,5 @@ /* - $Id: SKKDictionary.cpp,v 1.11 2006/06/12 14:14:48 t-suwa Exp $ + $Id: SKKDictionary.cpp,v 1.12 2006/06/30 23:44:30 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -338,9 +338,8 @@ // ÏX³êÄ¢êÎA_E[hµÄ[h·é if(modified) { std::ofstream ofs(obj->path_.c_str()); - while(true) { + while(session.good()) { getline(session, response); - if(response.empty()) break; ofs << response << std::endl; } ofs.close(); @@ -363,7 +362,7 @@ // SKKUserDictionary C^tF[X // ====================================================================== -SKKUserDictionary::SKKUserDictionary() { +SKKUserDictionary::SKKUserDictionary() : updateCount_(0), startOfUpdate_(std::time(0)) { // empty } @@ -528,23 +527,20 @@ // ---------------------------------------------------------------------- void SKKUserDictionary::save(bool force) { - static int updateCount = 0; - static std::time_t startOfUpdate = std::time(0); - // XVJE^[ðñ·(SAVE_LIMIT_COUNT ÜÅ¢Æ 0 Éßé) - updateCount = (updateCount + 1) % skkdic::SAVE_LIMIT_COUNT; + updateCount_ = (updateCount_ + 1) % skkdic::SAVE_LIMIT_COUNT; // XVJn©çoßµ½ÔðZo - std::time_t elaspedTime = std::time(0) - startOfUpdate; + std::time_t elapsedTime = std::time(0) - startOfUpdate_; // Û¶·é^C~OÅÍȯêÎA½àµÈ¢ - if(!force && updateCount != 0 && elaspedTime < skkdic::SAVE_TIMEOUT) { + if(!force && updateCount_ != 0 && elapsedTime < skkdic::SAVE_TIMEOUT) { return; } // Ç¿çÌðàZbg·é - updateCount = 0; - startOfUpdate = std::time(0); + updateCount_ = 0; + startOfUpdate_ = std::time(0); // êt@Cð쬷é std::string tmpPath = path_ + ".tmp"; Index: AquaSKK/SKKDictionary.h diff -u AquaSKK/SKKDictionary.h:1.8 AquaSKK/SKKDictionary.h:1.9 --- AquaSKK/SKKDictionary.h:1.8 Mon Jun 12 23:14:48 2006 +++ AquaSKK/SKKDictionary.h Sat Jul 1 08:44:30 2006 @@ -1,5 +1,5 @@ /* - $Id: SKKDictionary.h,v 1.8 2006/06/12 14:14:48 t-suwa Exp $ + $Id: SKKDictionary.h,v 1.9 2006/06/30 23:44:30 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -85,6 +85,8 @@ std::string path_; EntryContainer okuriAri_; EntryContainer okuriNasi_; + int updateCount_; + std::time_t startOfUpdate_; void save(bool force = false);