summaryrefslogtreecommitdiff
path: root/plugins/Boltun/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/Boltun/src
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Boltun/src')
-rw-r--r--plugins/Boltun/src/boltun.cpp22
-rw-r--r--plugins/Boltun/src/config.cpp6
2 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index ebe6dd21d6..42278611c0 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -218,7 +218,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
return 0;
DBEVENTGETTEXT egt;
egt.codepage = CP_ACP;
- egt.datatype = DBVT_TCHAR;
+ egt.datatype = DBVT_WCHAR;
egt.dbei = &dbei;
wchar_t* s = (wchar_t*)(void*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&egt);
free(dbei.pBlob);
@@ -312,7 +312,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
if (bTranslated)
Config.WarnText = c;
else
- Config.WarnText = TranslateTS(DEFAULT_WARN_TEXT);
+ Config.WarnText = TranslateW(DEFAULT_WARN_TEXT);
}
return TRUE;
}
@@ -369,9 +369,9 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = GetParent(hwndDlg);
- wchar_t *mind = TranslateTS(MIND_FILE_DESC);
- wchar_t *anyfile = TranslateTS(ALL_FILES_DESC);
- CMString filt(FORMAT, MIND_DIALOG_FILTER, mind, anyfile);
+ wchar_t *mind = TranslateW(MIND_FILE_DESC);
+ wchar_t *anyfile = TranslateW(ALL_FILES_DESC);
+ CMStringW filt(FORMAT, MIND_DIALOG_FILTER, mind, anyfile);
filt.Replace('\1', '\0');
ofn.lpstrFilter = filt;
@@ -407,8 +407,8 @@ static INT_PTR CALLBACK EngineDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
bTranslated = blInit = LoadMind(c, line);
if (!bTranslated) {
wchar_t message[5000];
- mir_snwprintf(message, TranslateTS(FAILED_TO_LOAD_BASE), line, c);
- MessageBox(NULL, message, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
+ mir_snwprintf(message, TranslateW(FAILED_TO_LOAD_BASE), line, c);
+ MessageBox(NULL, message, TranslateW(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
}
break;
@@ -575,8 +575,8 @@ extern "C" int __declspec(dllexport) Load(void)
blInit = LoadMind(Config.MindFileName, line);
if (!blInit) {
wchar_t path[2000];
- mir_snwprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
- MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
+ mir_snwprintf(path, TranslateW(FAILED_TO_LOAD_BASE), line, (const wchar_t*)Config.MindFileName);
+ MessageBox(NULL, path, TranslateW(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
}
return 0;
}
@@ -593,8 +593,8 @@ extern "C" int __declspec(dllexport) Unload(void)
//So in case of saving error we will remain silent
#if 0
wchar_t path[MAX_PATH];
- mir_snwprintf(path, TranslateTS(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
- wchar_t* err = TranslateTS(BOLTUN_ERROR);
+ mir_snwprintf(path, TranslateW(FAILED_TO_SAVE_BASE), (const wchar_t*)Config.MindFileName);
+ wchar_t* err = TranslateW(BOLTUN_ERROR);
MessageBox(NULL, path, err, MB_ICONERROR | MB_TASKMODAL | MB_OK); */
#endif
}
diff --git a/plugins/Boltun/src/config.cpp b/plugins/Boltun/src/config.cpp
index 68d6035315..7137a8af1a 100644
--- a/plugins/Boltun/src/config.cpp
+++ b/plugins/Boltun/src/config.cpp
@@ -40,7 +40,7 @@ inline wchar_t* GetString(char* key, const wchar_t* def)
{
DBVARIANT dbv;
wchar_t* val;
- if (!db_get_ts(NULL, BOLTUN_KEY, key, &dbv))
+ if (!db_get_ws(NULL, BOLTUN_KEY, key, &dbv))
{
size_t len = mir_wstrlen(dbv.ptszVal) + 1;
val = new wchar_t[len];
@@ -61,7 +61,7 @@ inline const wchar_t* SetString(char* key, const wchar_t* value)
size_t len = mir_wstrlen(value) + 1;
wchar_t* val = new wchar_t[len];
wcscpy_s(val, len, value);
- db_set_ts(NULL, BOLTUN_KEY, key, val);
+ db_set_ws(NULL, BOLTUN_KEY, key, val);
return val;
}
@@ -97,7 +97,7 @@ BUILDINTETTERS(AnswerPauseTime, DB_WAIT_TIME, 2);
BUILDINTETTERS(AnswerThinkTime, DB_THINK_TIME, 4);
BUILDETTERS(PauseDepends, DB_PAUSE_DEPENDS, TRUE);
BUILDETTERS(PauseRandom, DB_PAUSE_RANDOM, TRUE);
-BUILDSTRETTERS(WarnText, DB_WARN_TEXT, TranslateTS(DEFAULT_WARN_TEXT));
+BUILDSTRETTERS(WarnText, DB_WARN_TEXT, TranslateW(DEFAULT_WARN_TEXT));
BUILDSTRETTERS(MindFileName, DB_MIND_FILE_NAME, DEFAULT_MIND_FILE);
BUILDETTERS(EngineStaySilent, DB_ENGINE_SILENT, FALSE);
BUILDETTERS(EngineMakeLowerCase, DB_ENGINE_LOWERCASE, FALSE);