diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
commit | 428bf0cbd77813a43094cb5c984436deff251936 (patch) | |
tree | d7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/SpellChecker/src | |
parent | 82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff) |
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src')
-rw-r--r-- | plugins/SpellChecker/src/autoreplace.cpp | 2 | ||||
-rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 8 | ||||
-rw-r--r-- | plugins/SpellChecker/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/SpellChecker/src/spellchecker.cpp | 6 | ||||
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 20 |
5 files changed, 20 insertions, 20 deletions
diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp index de4350eed3..5eb276939b 100644 --- a/plugins/SpellChecker/src/autoreplace.cpp +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -91,7 +91,7 @@ void AutoReplaceMap::writeAutoReplaceMap() wchar_t *p = wcsrchr(m_filename, '\\');
if (p != NULL) {
*p = 0;
- CreateDirectoryTreeT(m_filename);
+ CreateDirectoryTreeW(m_filename);
*p = '\\';
}
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 10f03b5c92..b5efcd4b29 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -390,7 +390,7 @@ protected: void appendToCustomDict(const wchar_t *word) { - CreateDirectoryTreeT(userPath); + CreateDirectoryTreeW(userPath); wchar_t filename[1024]; mir_snwprintf(filename, L"%s\\%s.cdic", userPath, language); @@ -756,7 +756,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) else mir_wstrncpy(localName, dict->english_name, _countof(localName)); - mir_wstrncpy(dict->localized_name, TranslateTS(localName), _countof(dict->localized_name)); + mir_wstrncpy(dict->localized_name, TranslateW(localName), _countof(dict->localized_name)); } if (dict->localized_name[0] != 0) { @@ -783,7 +783,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) char lang[128]; WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL); - if (!db_get_ts(NULL, MODULE_NAME, lang, &dbv)) { + if (!db_get_ws(NULL, MODULE_NAME, lang, &dbv)) { mir_wstrncpy(dict->localized_name, dbv.ptszVal, _countof(dict->localized_name)); db_free(&dbv); } @@ -791,7 +791,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) if (dict->localized_name[0] == '\0') { for (size_t j = 0; j < _countof(aditionalLanguages); j++) { if (!mir_wstrcmp(aditionalLanguages[j].language, dict->language)) { - mir_wstrncpy(dict->localized_name, TranslateTS(aditionalLanguages[j].localized_name), _countof(dict->localized_name)); + mir_wstrncpy(dict->localized_name, TranslateW(aditionalLanguages[j].localized_name), _countof(dict->localized_name)); break; } } diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 21309b391a..8f57cb2ed1 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -93,7 +93,7 @@ void LoadOptions() }
DBVARIANT dbv;
- if (!db_get_ts(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) {
+ if (!db_get_ws(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) {
mir_wstrncpy(opts.default_language, dbv.ptszVal, _countof(opts.default_language));
db_free(&dbv);
}
@@ -212,7 +212,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0);
if (sel >= languages.getCount())
sel = 0;
- db_set_ts(NULL, MODULE_NAME, "DefaultLanguage",
+ db_set_ws(NULL, MODULE_NAME, "DefaultLanguage",
(wchar_t *)languages[sel]->language);
mir_wstrcpy(opts.default_language, languages[sel]->language);
}
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index f40a0a6ee3..48cc788d8f 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -74,7 +74,7 @@ static int IconsChanged(WPARAM, LPARAM) StatusIconData sid = { sizeof(sid) }; sid.szModule = MODULE_NAME; sid.hIconDisabled = IcoLib_GetIcon("spellchecker_disabled"); - sid.flags = MBF_HIDDEN | MBF_TCHAR; + sid.flags = MBF_HIDDEN | MBF_UNICODE; for (int i = 0; i < languages.getCount(); i++) { sid.dwId = i; @@ -141,7 +141,7 @@ static int ModulesLoaded(WPARAM, LPARAM) GetModuleFileName(hInst, path, MAX_PATH); SKINICONDESC sid = { 0 }; - sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; + sid.flags = SIDF_ALL_UNICODE | SIDF_SORTED; sid.section.w = LPGENW("Spell Checker") L"/" LPGENW("Flags"); // Get language flags @@ -199,7 +199,7 @@ static int ModulesLoaded(WPARAM, LPARAM) StatusIconData sid = { sizeof(sid) }; sid.szModule = MODULE_NAME; sid.hIconDisabled = IcoLib_GetIcon("spellchecker_disabled"); - sid.flags = MBF_TCHAR | MBF_HIDDEN; + sid.flags = MBF_UNICODE | MBF_HIDDEN; for (int i = 0; i < languages.getCount(); i++) { sid.dwId = i; diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index a3cab0e333..3c5a4a65e8 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -717,7 +717,7 @@ int GetClosestLanguage(wchar_t *lang_name) void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, char *setting, BOOL isProtocol = TRUE)
{
DBVARIANT dbv = { 0 };
- dbv.type = DBVT_TCHAR;
+ dbv.type = DBVT_WCHAR;
int caps = (isProtocol ? CallProtoService(group, PS_GETCAPS, PFLAGNUM_4, 0) : 0);
if (caps & PF4_INFOSETTINGSVC) {
@@ -729,11 +729,11 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch return;
}
else {
- if (db_get_ts(hContact, group, setting, &dbv))
+ if (db_get_ws(hContact, group, setting, &dbv))
return;
}
- if (dbv.type == DBVT_TCHAR && dbv.ptszVal != NULL) {
+ if (dbv.type == DBVT_WCHAR && dbv.ptszVal != NULL) {
wchar_t *lang = dbv.ptszVal;
for (int i = 0; i < languages.getCount(); i++) {
@@ -781,18 +781,18 @@ void GetContactLanguage(Dialog *dlg) dlg->lang_name[0] = '\0';
if (dlg->hContact == NULL) {
- if (!db_get_ts(NULL, MODULE_NAME, dlg->name, &dbv)) {
+ if (!db_get_ws(NULL, MODULE_NAME, dlg->name, &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
}
else {
- if (!db_get_ts(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) {
+ if (!db_get_ws(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
- if (dlg->lang_name[0] == '\0' && !db_get_ts(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) {
+ if (dlg->lang_name[0] == '\0' && !db_get_ws(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
@@ -801,12 +801,12 @@ void GetContactLanguage(Dialog *dlg) if (dlg->lang_name[0] == '\0') {
MCONTACT hMetaContact = db_mc_getMeta(dlg->hContact);
if (hMetaContact != NULL) {
- if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
+ if (!db_get_ws(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
- if (dlg->lang_name[0] == '\0' && !db_get_ts(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
+ if (dlg->lang_name[0] == '\0' && !db_get_ws(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.ptszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
@@ -1216,10 +1216,10 @@ BOOL HandleMenuSelection(Dialog *dlg, unsigned selection) SetNoUnderline(dlg);
if (dlg->hContact == NULL)
- db_set_ts(NULL, MODULE_NAME, dlg->name,
+ db_set_ws(NULL, MODULE_NAME, dlg->name,
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
else
- db_set_ts(dlg->hContact, MODULE_NAME, "TalkLanguage",
+ db_set_ws(dlg->hContact, MODULE_NAME, "TalkLanguage",
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
GetContactLanguage(dlg);
|