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/MirLua | |
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/MirLua')
-rw-r--r-- | plugins/MirLua/Modules/m_popup/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_hotkeys.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/m_icolib.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_message.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_options.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_sounds.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_options.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_script_loader.cpp | 2 |
11 files changed, 23 insertions, 23 deletions
diff --git a/plugins/MirLua/Modules/m_popup/src/main.cpp b/plugins/MirLua/Modules/m_popup/src/main.cpp index c169ba72e6..62d6bfb43b 100644 --- a/plugins/MirLua/Modules/m_popup/src/main.cpp +++ b/plugins/MirLua/Modules/m_popup/src/main.cpp @@ -56,8 +56,8 @@ static POPUPDATA2* MakePopupData2(lua_State *L) ppd->flags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(ppd->flags & PU2_TCHAR))
- ppd->flags |= PU2_TCHAR;
+ if (!(ppd->flags & PU2_UNICODE))
+ ppd->flags |= PU2_UNICODE;
lua_getfield(L, -1, "Title");
ppd->lptzTitle = mir_utf8decodeW(lua_tostring(L, -1));
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index 07f3c9329e..fa4a769a74 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -289,7 +289,7 @@ static int core_Parse(lua_State *L) char *what = (char*)luaL_checkstring(L, 1);
ptrW value(mir_utf8decodeW(what));
- lua_pushstring(L, T2Utf(VARST(value)));
+ lua_pushstring(L, T2Utf(VARSW(value)));
return 1;
}
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index e5b33d58a7..0eaafee37a 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -8,8 +8,8 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) mi.flags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(mi.flags & CMIF_TCHAR))
- mi.flags |= CMIF_TCHAR;
+ if (!(mi.flags & CMIF_UNICODE))
+ mi.flags |= CMIF_UNICODE;
lua_getfield(L, -1, "Uid");
const char* uuid = lua_tostring(L, -1);
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp index c99ef4290b..e3c71cf38c 100644 --- a/plugins/MirLua/src/m_hotkeys.cpp +++ b/plugins/MirLua/src/m_hotkeys.cpp @@ -8,19 +8,19 @@ void MakeHotkey(lua_State *L, HOTKEYDESC &hk) hk.dwFlags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(hk.dwFlags & HKD_TCHAR))
- hk.dwFlags |= HKD_TCHAR;
+ if (!(hk.dwFlags & HKD_UNICODE))
+ hk.dwFlags |= HKD_UNICODE;
lua_getfield(L, -1, "Name");
hk.pszName = mir_utf8decodeA(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Description");
- hk.ptszDescription = mir_utf8decodeW(lua_tostring(L, -1));
+ hk.pwszDescription = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Section");
- hk.ptszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
+ hk.pwszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
lua_pop(L, 1);
lua_getfield(L, -1, "Hotkey");
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp index 018931ffb7..ef8ee4ff85 100644 --- a/plugins/MirLua/src/m_icolib.cpp +++ b/plugins/MirLua/src/m_icolib.cpp @@ -14,7 +14,7 @@ static int icolib_AddIcon(lua_State *L) }
SKINICONDESC si = { 0 };
- si.flags = SIDF_ALL_TCHAR;
+ si.flags = SIDF_ALL_UNICODE;
si.pszName = mir_utf8decodeA(name);
si.description.w = description;
si.section.w = section;
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index 0a56c791e3..eb99205312 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -34,7 +34,7 @@ static int message_Send(lua_State *L) const char *szProto = GetContactProto(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE)
{
- ptrW tszChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID"));
+ ptrW tszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
GCDEST gcd = { szProto, tszChatRoom, GC_EVENT_SENDMESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.bIsMe = TRUE;
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp index 6bb25cbe26..f55af0f6d0 100644 --- a/plugins/MirLua/src/m_options.cpp +++ b/plugins/MirLua/src/m_options.cpp @@ -47,11 +47,11 @@ void MakeOptionDialogPage(lua_State *L, OPTIONSDIALOGPAGE &odp) odp.hLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
lua_getfield(L, -1, "Flags");
- odp.flags = luaL_optinteger(L, -1, ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE);
+ odp.flags = luaL_optinteger(L, -1, ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE);
lua_pop(L, 1);
- if (!(odp.flags & ODPF_TCHAR))
- odp.flags |= ODPF_TCHAR;
+ if (!(odp.flags & ODPF_UNICODE))
+ odp.flags |= ODPF_UNICODE;
lua_getfield(L, -1, "Group");
odp.pwszGroup = mir_utf8decodeW(lua_tostring(L, -1));
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index 0291515ee7..ea7c2a5e6a 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -9,10 +9,10 @@ static int sounds_AddSound(lua_State *L) SKINSOUNDDESCEX ssd = { sizeof(SKINSOUNDDESCEX) };
ssd.pszName = name;
- ssd.dwFlags = SSDF_TCHAR;
- ssd.ptszDescription = description;
- ssd.ptszSection = section;
- ssd.ptszDefaultFile = filePath;
+ ssd.dwFlags = SSDF_UNICODE;
+ ssd.pwszDescription = description;
+ ssd.pwszSection = section;
+ ssd.pwszDefaultFile = filePath;
int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index b6c62101a6..156e957a02 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -27,11 +27,11 @@ void CMLua::SetPaths() lua_getglobal(L, "package");
- FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hCLibsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
lua_pushfstring(L, "%s\\?.dll", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "cpath");
- FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, path, _countof(path), VARSW(MIRLUA_PATHT));
lua_pushfstring(L, "%s\\?.lua", ptrA(mir_utf8encodeW(path)));
lua_setfield(L, -2, "path");
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 524cd427bb..dca7c9f363 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -60,7 +60,7 @@ void CMLuaOptions::OnInitDialog() ImageList_AddIcon(hImageList, GetIcon(IDI_RELOAD));
wchar_t scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
- FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
PathToRelativeT(scriptDir, relativeScriptDir, NULL);
mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
@@ -160,7 +160,7 @@ int CMLuaOptions::OnOptionsInit(WPARAM wParam, LPARAM) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = g_hInstance;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.pwszGroup = LPGENW("Services");
odp.pwszTitle = L"Lua";
odp.pwszTab = LPGENW("Scripts");
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index 3a3d88fbc7..758422b9f4 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -26,7 +26,7 @@ void CMLuaScriptLoader::LoadScript(const wchar_t *scriptDir, const wchar_t *file void CMLuaScriptLoader::LoadScripts()
{
wchar_t scriptDir[MAX_PATH];
- FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
+ FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
Log(L"Loading scripts from %s", scriptDir);
|