t-suw****@users*****
t-suw****@users*****
2007年 9月 16日 (日) 09:21:45 JST
Index: AquaSKK/src/keybindings/SKKPreProcessor.cpp diff -u AquaSKK/src/keybindings/SKKPreProcessor.cpp:1.1.2.1 AquaSKK/src/keybindings/SKKPreProcessor.cpp:1.1.2.2 --- AquaSKK/src/keybindings/SKKPreProcessor.cpp:1.1.2.1 Sun Aug 26 01:34:45 2007 +++ AquaSKK/src/keybindings/SKKPreProcessor.cpp Sun Sep 16 09:21:45 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKPreProcessor.cpp,v 1.1.2.1 2007/08/25 16:34:45 t-suwa Exp $ + $Id: SKKPreProcessor.cpp,v 1.1.2.2 2007/09/16 00:21:45 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <fstream> #include "SKKConfig.h" #include "SKKPreProcessor.h" @@ -32,8 +33,14 @@ } void SKKPreProcessor::Initialize() { - keymap_.Initialize(SKKConfig::ResourceDirectory() + "keymap.conf"); - keymap_.Initialize(SKKConfig::LibraryDirectory() + "keymap.conf"); + std::string path(SKKConfig::LibraryDirectory() + "keymap.conf"); + std::ifstream ifs(path.c_str()); + + if(ifs) { + keymap_.Initialize(path); + } else { + keymap_.Initialize(SKKConfig::ResourceDirectory() + "keymap.conf"); + } } SKKEventParam SKKPreProcessor::Execute(const EventRef event) {