Import of widgets from wxKanjiPad, plus the files needed to compile kpengine. Also...
[jben.git] / dictload.cpp
bloba4ba867dfcd5280ce6ed67ed241e895d4c9fe732
1 /*
2 Project: J-Ben
3 Author: Paul Goins
4 License: GNU General Public License (GPL) version 2
5 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
7 File: dictload.cpp
9 This file is part of J-Ben.
11 J-Ben is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License version 2
13 as published by the Free Software Foundation.
15 J-Ben is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>
24 #include "dictload.h"
25 #include "global.h"
26 #include "kanjidic.h"
27 #include "edict.h"
29 #if 0
30 #include "version.h"
31 /* Splash window style constructor */
32 DictionaryLoader::DictionaryLoader() :
33 wxFrame((wxFrame *)NULL, -1, _T("Starting " PROGRAM_NAME), wxPoint(-1,-1),
34 wxSize(), wxDEFAULT_FRAME_STYLE) {
35 /* Do nothing special */
37 #endif
39 DictionaryLoader::DictionaryLoader() {
40 /* Do nothing special */
43 int DictionaryLoader::LoadDictionaries() {
44 int result;
45 jben->kdict = KanjiDic::LoadKanjiDic("kanjidic", result);
46 if(result != KD_SUCCESS) return DL_KANJIDIC_NOT_FOUND;
47 jben->edict = Edict::LoadEdict("edict2", result);
48 if(result != ED_SUCCESS) return DL_EDICT_NOT_FOUND;
50 return DL_SUCCESS;