Use swmgr's module type constants intead of magic strings.
This commit is contained in:
parent
90bb1d499c
commit
8bf642a8a9
14
scabbard.cpp
14
scabbard.cpp
|
@ -41,15 +41,17 @@ scabbard::scabbard() {
|
|||
}
|
||||
|
||||
void scabbard::constructModlist() {
|
||||
int tmpnum = 4;
|
||||
modtype tmpmods[4];
|
||||
strcpy(tmpmods[0].label, "Generic Books");
|
||||
int tmpnum = 5;
|
||||
modtype tmpmods[5];
|
||||
strcpy(tmpmods[0].label, sword::SWMgr::MODTYPE_GENBOOKS);
|
||||
tmpmods[0].keytype = 1;
|
||||
strcpy(tmpmods[1].label, "Biblical Texts");
|
||||
strcpy(tmpmods[1].label, sword::SWMgr::MODTYPE_BIBLES);
|
||||
tmpmods[1].keytype = 0;
|
||||
strcpy(tmpmods[2].label, "Lexicons / Dictionaries");
|
||||
strcpy(tmpmods[2].label, sword::SWMgr::MODTYPE_LEXDICTS);
|
||||
tmpmods[2].keytype = 2;
|
||||
strcpy(tmpmods[3].label, "Commentaries");
|
||||
strcpy(tmpmods[3].label, sword::SWMgr::MODTYPE_COMMENTARIES);
|
||||
tmpmods[3].keytype = 0;
|
||||
strcpy(tmpmods[4].label, sword::SWMgr::MODTYPE_DAILYDEVOS);
|
||||
tmpmods[3].keytype = 0;
|
||||
|
||||
// need some throwaway ints
|
||||
|
|
|
@ -93,7 +93,7 @@ class scabbard {
|
|||
|
||||
/*! Struct to hold listing of different modules - each modtype corresponds
|
||||
* to a different type of module - see comments for modtype */
|
||||
modtype modules[4];
|
||||
modtype modules[5];
|
||||
|
||||
/*! Get all module types loaded in and accessible by Sword.
|
||||
* \returns the module types loaded into an array */
|
||||
|
|
Loading…
Reference in New Issue