diff --git a/golded3/gemnus.cpp b/golded3/gemnus.cpp index 8a6f4cc..193ad8d 100644 --- a/golded3/gemnus.cpp +++ b/golded3/gemnus.cpp @@ -1143,13 +1143,13 @@ int GMenuSChecker::Run(CSpellChecker &schecker, const char *word) End(); } - if (*word) + if (*word && schecker.IsUdrOpened()) { Item(TAG_ADDWORD, "A Add Word... "); numrows++; } - if (suggest.size()) + if (suggest.size() && (numrows > 7)) { ItemSep(); numrows++; diff --git a/goldlib/gall/gespell.h b/goldlib/gall/gespell.h index b10fe94..3a487d6 100644 --- a/goldlib/gall/gespell.h +++ b/goldlib/gall/gespell.h @@ -167,6 +167,7 @@ public: LIDC GetLangCode() { return mLIDC; } bool IsLoaded() { return mLibrary != NULL; } + bool IsUdrOpened() { return mSIB.cUdr != 0; } }; @@ -210,7 +211,9 @@ public: CSpellSuggestV &GetSuggest() { return mSuggest; } CSpellLangV &GetLangs() { return mLangs; } + LIDC GetLangCode() { return IsLoaded() ? mLang->GetLangCode() : 0xFFFF; } + bool IsUdrOpened() { return IsLoaded() ? mLang->IsUdrOpened() : false; } bool IsInited() { return mInited; } bool IsLoaded() { return mLang != NULL; }