diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-01-19 13:59:37 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-01-19 13:59:37 +0000 |
commit | 867acc8fe919830f4735ccfe8b9d99dc49319c90 (patch) | |
tree | a7020867cbe4054ca3296c1d54dfb7819875e438 /plugins/SpellChecker/src | |
parent | d6d3e7b429b634b0907940f67a3254e799df3c26 (diff) |
- Another portion of _T replacement when it's not needed (from person)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3169 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src')
-rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 38 | ||||
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 12 |
2 files changed, 25 insertions, 25 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 40feda12ef..b6bf37a655 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -32,8 +32,8 @@ DWORD WINAPI LoadThread(LPVOID hd); // Additional languages that i could not find in Windows
TCHAR *aditionalLanguages[] = {
- _T("tl_PH"), _T("Tagalog (Philippines)"),
- _T("de_frami_neu"), _T("German (Germany)")
+ LPGENT("tl_PH"), LPGENT("Tagalog (Philippines)"),
+ LPGENT("de_frami_neu"), LPGENT("German (Germany)")
};
@@ -56,9 +56,9 @@ protected: void loadCustomDict()
{
TCHAR filename[1024];
- mir_sntprintf(filename, SIZEOF(filename), _T("%s\\%s.cdic"), userPath, language);
+ mir_sntprintf(filename, SIZEOF(filename), L"%s\\%s.cdic", userPath, language);
- FILE *file = _tfopen(filename, _T("rb"));
+ FILE *file = _tfopen(filename, L"rb");
if (file != NULL)
{
char tmp[1024];
@@ -91,9 +91,9 @@ protected: CreateDirectoryTreeT(userPath);
TCHAR filename[1024];
- mir_sntprintf(filename, SIZEOF(filename), _T("%s\\%s.cdic"), userPath, language);
+ mir_sntprintf(filename, SIZEOF(filename), L"%s\\%s.cdic", userPath, language);
- FILE *file = _tfopen(filename, _T("ab"));
+ FILE *file = _tfopen(filename, L"ab");
if (file != NULL)
{
char tmp[1024];
@@ -458,7 +458,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, SIZEOF(end));
TCHAR name[64];
- mir_sntprintf(name, SIZEOF(name), _T("%s_%s"), ini, end);
+ mir_sntprintf(name, SIZEOF(name), L"%s_%s", ini, end);
for(int i = 0; i < tmp_dicts->getCount(); i++)
{
@@ -482,7 +482,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) TCHAR name[1024];
if (country[0] != 0)
- mir_sntprintf(name, SIZEOF(name), _T("%s (%s)"), dict->english_name, country);
+ mir_sntprintf(name, SIZEOF(name), L"%s (%s)", dict->english_name, country);
else
lstrcpyn(name, dict->english_name, SIZEOF(name));
@@ -491,7 +491,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) if (dict->localized_name[0] != 0)
{
- mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language);
+ mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), L"%s [%s]", dict->localized_name, dict->language);
}
break;
}
@@ -537,7 +537,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) if (dict->localized_name[0] != _T('\0'))
{
- mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language);
+ mir_sntprintf(dict->full_name, SIZEOF(dict->full_name), L"%s [%s]", dict->localized_name, dict->language);
}
else
{
@@ -552,7 +552,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH {
// Load the language files and create an array with then
TCHAR file[1024];
- mir_sntprintf(file, SIZEOF(file), _T("%s\\*.dic"), path);
+ mir_sntprintf(file, SIZEOF(file), L"%s\\*.dic", path);
BOOL found = FALSE;
@@ -562,7 +562,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH {
do
{
- mir_sntprintf(file, SIZEOF(file), _T("%s\\%s"), path, ffd.cFileName);
+ mir_sntprintf(file, SIZEOF(file), L"%s\\%s", path, ffd.cFileName);
// Check .dic
DWORD attrib = GetFileAttributes(file);
@@ -570,7 +570,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH continue;
// See if .aff exists too
- lstrcpy(&file[lstrlen(file) - 4], _T(".aff"));
+ lstrcpy(&file[lstrlen(file) - 4], L".aff");
attrib = GetFileAttributes(file);
if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY))
continue;
@@ -613,11 +613,11 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (opts.use_other_apps_dicts)
{
- TCHAR *otherHunspellApps[] = { _T("Thunderbird"), _T("thunderbird.exe"),
- _T("Firefox"), _T("firefox.exe") };
+ TCHAR *otherHunspellApps[] = { L"Thunderbird", L"thunderbird.exe",
+ L"Firefox", L"firefox.exe" };
-#define APPPATH _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s")
-#define MUICACHE _T("Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache")
+#define APPPATH L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s"
+#define MUICACHE L"Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache"
// Get other apps dicts
for (int i = 0; i < SIZEOF(otherHunspellApps); i += 2)
@@ -630,7 +630,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE, &hKey))
{
DWORD size = SIZEOF(key);
- lResult = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)key, &size);
+ lResult = RegQueryValueEx(hKey, L"Path", NULL, NULL, (LPBYTE)key, &size);
RegCloseKey(hKey);
}
else
@@ -668,7 +668,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (ERROR_SUCCESS == lResult)
{
TCHAR folder[1024];
- mir_sntprintf(folder, SIZEOF(folder), _T("%s\\Dictionaries"), key);
+ mir_sntprintf(folder, SIZEOF(folder), L"%s\\Dictionaries", key);
GetHunspellDictionariesFromFolder(languages, folder, user_path, otherHunspellApps[i]);
}
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index e4a6ec0855..fa3fee8bad 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -127,17 +127,17 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER); dictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, L"."); 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(".")); + FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, L"."); 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(".")); + FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, L"."); } else { dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); @@ -154,7 +154,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (opts.use_flags) { // Load flags dll TCHAR flag_file[MAX_PATH]; - mir_sntprintf(flag_file, SIZEOF(flag_file), _T("%s\\flags_icons.dll"), flagsDllFolder); + mir_sntprintf(flag_file, SIZEOF(flag_file), L"%s\\flags_icons.dll", flagsDllFolder); HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); TCHAR path[MAX_PATH]; @@ -162,7 +162,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) SKINICONDESC sid = { sizeof(sid) }; sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.ptszSection = _T("Spell Checker/Flags"); + sid.ptszSection = L"Spell Checker/Flags"; // Get language flags for(int i = 0; i < languages.getCount(); i++) { @@ -203,7 +203,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) Dictionary *dict = languages[j]; TCHAR filename[MAX_PATH]; - mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); + mir_sntprintf(filename, MAX_PATH, L"%s\\%s.ar", customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); if (lstrcmp(dict->language, opts.default_language) == 0) |