From b2269a81668efaf157d541f2ffd67e52b89417c6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 1 Mar 2013 21:11:59 +0000 Subject: useless Folders support checks removed git-svn-id: http://svn.miranda-ng.org/main/trunk@3824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SpellChecker/src/spellchecker.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'plugins/SpellChecker/src') diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index c6ec132a74..2b554dfe69 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -119,27 +119,23 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) CallService("DBEditorpp/RegisterSingleModule", (WPARAM) MODULE_NAME, 0); // Folders plugin support - if ( ServiceExists(MS_FOLDERS_REGISTER_PATH)) { - hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER); - + if (hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER)) { dictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); + } + else dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); - hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER); - + if (hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER)) { customDictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, _T(".")); + } + else customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); - hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER); - + if (hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER)) { flagsDllFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, _T(".")); } - else { - dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); - customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); - flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); - } + else flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); InitOptions(); -- cgit v1.2.3