diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
commit | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (patch) | |
tree | 96b0db981b4f5054f24d484902b597ba7da1c1a5 /plugins/SpellChecker/src | |
parent | 9b35784c5042984fbb60785f0a4a41a64af545f6 (diff) |
end of ME_OPT_INITIALISE related zoo in another plugins
Diffstat (limited to 'plugins/SpellChecker/src')
-rw-r--r-- | plugins/SpellChecker/src/options.cpp | 7 | ||||
-rw-r--r-- | plugins/SpellChecker/src/options.h | 3 | ||||
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 5 |
3 files changed, 4 insertions, 11 deletions
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 7fafa944e8..8188bad73a 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -73,13 +73,6 @@ int InitOptionsCallback(WPARAM wParam, LPARAM) return 0;
}
-void InitOptions()
-{
- LoadOptions();
-
- HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
-}
-
void LoadOptions()
{
LoadOpts(optionsControls, _countof(optionsControls), MODULENAME);
diff --git a/plugins/SpellChecker/src/options.h b/plugins/SpellChecker/src/options.h index 8d699d4adf..5577c8fb3a 100644 --- a/plugins/SpellChecker/src/options.h +++ b/plugins/SpellChecker/src/options.h @@ -50,8 +50,7 @@ struct Options extern Options opts;
-// Initializations needed by options
-void InitOptions();
+int InitOptionsCallback(WPARAM, LPARAM);
// Loads the options from DB
// It don't need to be called, except in some rare cases
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index f5ce69d0a7..348946325e 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -118,8 +118,6 @@ static int ModulesLoaded(WPARAM, LPARAM) } else flagsDllFolder = Utils_ReplaceVarsW(FLAGS_DLL_FOLDER); - InitOptions(); - GetAvaibleDictionaries(languages, dictionariesFolder, customDictionariesFolder); LoadOptions(); @@ -231,6 +229,9 @@ int CMPlugin::Load() // hooks HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); + HookEvent(ME_OPT_INITIALISE, InitOptionsCallback); + + LoadOptions(); CreateServiceFunction(MS_SPELLCHECKER_ADD_RICHEDIT, AddContactTextBoxService); CreateServiceFunction(MS_SPELLCHECKER_REMOVE_RICHEDIT, RemoveContactTextBoxService); |