Disable add_word submenu from spell checker menu if user dictionary is not open
This commit is contained in:
parent
d404923262
commit
1642dfe4ed
@ -1143,13 +1143,13 @@ int GMenuSChecker::Run(CSpellChecker &schecker, const char *word)
|
|||||||
End();
|
End();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*word)
|
if (*word && schecker.IsUdrOpened())
|
||||||
{
|
{
|
||||||
Item(TAG_ADDWORD, "A Add Word... ");
|
Item(TAG_ADDWORD, "A Add Word... ");
|
||||||
numrows++;
|
numrows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (suggest.size())
|
if (suggest.size() && (numrows > 7))
|
||||||
{
|
{
|
||||||
ItemSep();
|
ItemSep();
|
||||||
numrows++;
|
numrows++;
|
||||||
|
@ -167,6 +167,7 @@ public:
|
|||||||
LIDC GetLangCode() { return mLIDC; }
|
LIDC GetLangCode() { return mLIDC; }
|
||||||
|
|
||||||
bool IsLoaded() { return mLibrary != NULL; }
|
bool IsLoaded() { return mLibrary != NULL; }
|
||||||
|
bool IsUdrOpened() { return mSIB.cUdr != 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -210,7 +211,9 @@ public:
|
|||||||
|
|
||||||
CSpellSuggestV &GetSuggest() { return mSuggest; }
|
CSpellSuggestV &GetSuggest() { return mSuggest; }
|
||||||
CSpellLangV &GetLangs() { return mLangs; }
|
CSpellLangV &GetLangs() { return mLangs; }
|
||||||
|
|
||||||
LIDC GetLangCode() { return IsLoaded() ? mLang->GetLangCode() : 0xFFFF; }
|
LIDC GetLangCode() { return IsLoaded() ? mLang->GetLangCode() : 0xFFFF; }
|
||||||
|
bool IsUdrOpened() { return IsLoaded() ? mLang->IsUdrOpened() : false; }
|
||||||
|
|
||||||
bool IsInited() { return mInited; }
|
bool IsInited() { return mInited; }
|
||||||
bool IsLoaded() { return mLang != NULL; }
|
bool IsLoaded() { return mLang != NULL; }
|
||||||
|
Reference in New Issue
Block a user