diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/SpellChecker/src/spellchecker.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/spellchecker.cpp')
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 7d12a021f5..e6217118c4 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -40,13 +40,13 @@ HINSTANCE hInst; int hLangpack = 0; HANDLE hDictionariesFolder = NULL; -TCHAR *dictionariesFolder; +wchar_t *dictionariesFolder; HANDLE hCustomDictionariesFolder = NULL; -TCHAR *customDictionariesFolder; +wchar_t *customDictionariesFolder; HANDLE hFlagsDllFolder = NULL; -TCHAR *flagsDllFolder; +wchar_t *flagsDllFolder; HBITMAP hCheckedBmp; BITMAP bmpChecked; @@ -79,7 +79,7 @@ static int IconsChanged(WPARAM, LPARAM) for (int i = 0; i < languages.getCount(); i++) { sid.dwId = i; - TCHAR tmp[128]; + wchar_t tmp[128]; mir_sntprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name); sid.tszTooltip = tmp; @@ -108,19 +108,19 @@ static int ModulesLoaded(WPARAM, LPARAM) // Folders plugin support if (hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER)) { - dictionariesFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); + dictionariesFolder = (wchar_t *)mir_alloc(sizeof(wchar_t) * MAX_PATH); FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, L"."); } else dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); if (hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER)) { - customDictionariesFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); + customDictionariesFolder = (wchar_t *)mir_alloc(sizeof(wchar_t) * MAX_PATH); FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, L"."); } else customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); if (hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER)) { - flagsDllFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); + flagsDllFolder = (wchar_t *)mir_alloc(sizeof(wchar_t) * MAX_PATH); FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, L"."); } else flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); @@ -133,21 +133,21 @@ static int ModulesLoaded(WPARAM, LPARAM) if (opts.use_flags) { // Load flags dll - TCHAR flag_file[MAX_PATH]; + wchar_t flag_file[MAX_PATH]; mir_sntprintf(flag_file, L"%s\\flags_icons.dll", flagsDllFolder); HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); - TCHAR path[MAX_PATH]; + wchar_t path[MAX_PATH]; GetModuleFileName(hInst, path, MAX_PATH); SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.section.t = LPGENT("Spell Checker") L"/" LPGENT("Flags"); + sid.section.w = LPGENW("Spell Checker") L"/" LPGENW("Flags"); // Get language flags for (int i = 0; i < languages.getCount(); i++) { Dictionary *p = languages[i]; - sid.description.t = p->full_name; + sid.description.w = p->full_name; char lang[32]; mir_snprintf(lang, "spell_lang_%d", i); @@ -159,13 +159,13 @@ static int ModulesLoaded(WPARAM, LPARAM) if (hFlag != NULL) { sid.hDefaultIcon = hFlag; - sid.defaultFile.t = NULL; + sid.defaultFile.w = NULL; sid.iDefaultIndex = 0; } else { hFlagIcoLib = IcoLib_GetIcon("spellchecker_unknown"); sid.hDefaultIcon = hFlagIcoLib; - sid.defaultFile.t = NULL; + sid.defaultFile.w = NULL; sid.iDefaultIndex = 0; } @@ -183,7 +183,7 @@ static int ModulesLoaded(WPARAM, LPARAM) for (int j = 0; j < languages.getCount(); j++) { Dictionary *dict = languages[j]; - TCHAR filename[MAX_PATH]; + wchar_t filename[MAX_PATH]; mir_sntprintf(filename, L"%s\\%s.ar", customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); @@ -204,7 +204,7 @@ static int ModulesLoaded(WPARAM, LPARAM) for (int i = 0; i < languages.getCount(); i++) { sid.dwId = i; - TCHAR tmp[128]; + wchar_t tmp[128]; mir_sntprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name); sid.tszTooltip = tmp; sid.hIcon = (opts.use_flags) ? IcoLib_GetIconByHandle(languages[i]->hIcolib) : IcoLib_GetIcon("spellchecker_enabled"); |