SCheckerDefLang now may be used in random system groups

This commit is contained in:
Ianos Gnatiuc 2006-04-05 15:56:53 +00:00
parent f5971f8c6e
commit 15e8cdd990
7 changed files with 40 additions and 18 deletions

View File

@ -2101,6 +2101,7 @@ ENDGROUP
// QuoteBufFile
// QuoteChars
// QuoteString
// SCheckerDefLang
// SearchFor
// StyleCodes
// Tagline

View File

@ -2456,6 +2456,7 @@ EndGroup
// QuoteBufFile
// QuoteChars
// QuoteString
// SCheckerDefLang
// SearchFor
// StyleCodes
// Tagline

View File

@ -232,7 +232,10 @@ void CfgScheckerenabled()
void CfgScheckerdeflang()
{
strcpy(CFG->scheckerdeflang, val);
if(cfgingroup)
CFG->grp.AddItm(GRP_SCHECKERDEFLANG, val, strlen(val)+1);
else
strcpy(CFG->scheckerdeflang, val);
}
// ------------------------------------------------------------------

View File

@ -2642,11 +2642,26 @@ int IEclass::handlekey(gkey __key) {
int rc = true;
if (drawlines &&
(__key != KK_EditGoRight) && (__key != KK_EditGoLeft) &&
(__key != KK_EditGoUp) && (__key != KK_EditGoDown))
if (drawlines)
{
drawflag = true;
switch (__key)
{
case KK_EditBlockRight:
case KK_EditBlockLeft:
case KK_EditBlockUp:
case KK_EditBlockDown:
DrawLines(__key);
case KK_EditBlockHome:
case KK_EditBlockEnd:
case KK_EditBlockPgDn:
case KK_EditBlockPgUp:
case KK_EditBlockWordRight:
case KK_EditBlockWordLeft:
undo_ready = NO;
return rc;
default:
drawflag = true;
}
}
switch(__key)
@ -2692,18 +2707,6 @@ int IEclass::handlekey(gkey __key) {
undo_ready = NO;
return rc;
case KK_EditGoRight:
case KK_EditGoLeft:
case KK_EditGoUp:
case KK_EditGoDown:
if (drawlines && !selecting)
{
DrawLines(__key);
undo_ready = NO;
return rc;
}
// fall through
default:
rc = PlayMacro(__key, KT_E);
if(rc == true)
@ -2842,7 +2845,7 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) {
if (CFG->scheckerenabled)
{
schecker.Init(CFG->xlatlocalset, CFG->scheckerdicpath);
schecker.Load(CFG->scheckerdeflang, CFG->scheckeruserdic);
schecker.Load(AA->adat->scheckerdeflang, CFG->scheckeruserdic);
}
#endif

View File

@ -165,6 +165,9 @@ void Area::InitData() {
strcpy(adat->quotestops, CFG->quotestops);
adat->quotewraphard = CFG->quotewraphard;
adat->replyre = EDIT->ReplyRe();
#if defined(GCFG_SPELL_INCLUDED)
strcpy(adat->scheckerdeflang, CFG->scheckerdeflang);
#endif
if(*CFG->searchfor)
strcpy(adat->searchfor, CFG->searchfor);
strcpy(adat->tagline, CFG->tagline.empty() ? "" : CFG->tagline[CFG->taglineno].c_str());
@ -337,6 +340,11 @@ void Area::RandomizeData(int mode) {
FileToGPlay(&adat->play, buf);
}
#if defined(GCFG_SPELL_INCLUDED)
if (CFG->grp.GetItm(GRP_SCHECKERDEFLANG, buf, sizeof(buf)))
strxcpy(adat->scheckerdeflang, buf, sizeof(adat->scheckerdeflang));
#endif
CFG->grp.GetItm(GRP_SEARCHFOR, adat->searchfor, sizeof(adat->searchfor));
if(CFG->grp.GetItm(GRP_TAGLINE, buf, sizeof(buf)))

View File

@ -303,6 +303,9 @@ struct AreaData {
bool quotewraphard;
GPlay play;
int replyre;
#if defined(GCFG_SPELL_INCLUDED)
char scheckerdeflang[100];
#endif
char tagline[76];
char taglinechar;
bool taglinesupport;

View File

@ -88,6 +88,9 @@ enum {
GRP_QUOTESTRING,
GRP_QUOTESTOPS,
GRP_QUOTEWRAPHARD,
#if defined(GCFG_SPELL_INCLUDED)
GRP_SCHECKERDEFLANG,
#endif
GRP_SEARCHFOR,
GRP_STRIPHTML,
GRP_TAGLINE,