summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/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/TabSRMM/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/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp10
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/muchighlight.cpp14
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp36
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp14
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp8
-rw-r--r--plugins/TabSRMM/src/container.cpp36
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp10
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp18
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp10
-rw-r--r--plugins/TabSRMM/src/mim.cpp12
-rw-r--r--plugins/TabSRMM/src/modplus.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp14
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp12
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp8
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp10
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp6
-rw-r--r--plugins/TabSRMM/src/templates.cpp8
-rw-r--r--plugins/TabSRMM/src/themes.cpp16
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TabSRMM/src/utils.cpp18
-rw-r--r--plugins/TabSRMM/src/utils.h2
30 files changed, 143 insertions, 143 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index b7116265d1..f85ad9bed1 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -233,7 +233,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
if (bbdi->hIcon)
SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(bbdi->hIcon));
if (bbdi->pszTooltip)
- SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_UNICODE);
if (bbdi->bbbFlags) {
Utils::showDlgControl(hwndDlg, tempCID, (bbdi->bbbFlags & BBSF_HIDDEN) ? SW_HIDE : SW_SHOW);
Utils::enableDlgControl(hwndDlg, tempCID, !(bbdi->bbbFlags & BBSF_DISABLED));
@@ -463,7 +463,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
tvis.item.iImage = tvis.item.iSelectedImage = 0;
}
else {
- tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
+ tvis.item.pszText = TranslateW(cbd->m_ptszTooltip);
iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -491,7 +491,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
tvis.item.iImage = tvis.item.iSelectedImage = -1;
}
else {
- tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
+ tvis.item.pszText = TranslateW(cbd->m_ptszTooltip);
iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
@@ -803,7 +803,7 @@ void CustomButtonData::Accustom(HWND hwndBtn, TWindowData *dat)
if (m_hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(m_hIcon));
if (m_ptszTooltip)
- SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(m_ptszTooltip), BATF_TCHAR);
+ SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateW(m_ptszTooltip), BATF_UNICODE);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
@@ -1403,7 +1403,7 @@ void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData *cbd)
if (cbd->m_hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
if (cbd->m_ptszTooltip)
- SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_TCHAR);
+ SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_UNICODE);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SetWindowTextA(hwndBtn, cbd->m_pszModuleName);
}
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 3cec3e01bb..fc0a3a3169 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -795,7 +795,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
if (g_Settings.bLogClassicIndicators)
str.Append(pszIndicator);
- CMString pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
+ CMStringW pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
pszTemp.Replace(L"%n", L"%s");
if (!lin->bIsMe) {
if (g_Settings.bClickableNicks)
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp
index e6a00d5784..441183f454 100644
--- a/plugins/TabSRMM/src/chat/muchighlight.cpp
+++ b/plugins/TabSRMM/src/chat/muchighlight.cpp
@@ -49,13 +49,13 @@ void CMUCHighlight::init()
m_fInitialized = true;
- if (0 == db_get_ts(0, CHAT_MODULE, "HighlightWords", &dbv)) {
+ if (0 == db_get_ws(0, CHAT_MODULE, "HighlightWords", &dbv)) {
m_TextPatternString = dbv.ptszVal;
_wsetlocale(LC_ALL, L"");
wcslwr(m_TextPatternString);
}
- if (0 == db_get_ts(0, CHAT_MODULE, "HighlightNames", &dbv))
+ if (0 == db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv))
m_NickPatternString = dbv.ptszVal;
m_dwFlags = M.GetByte(CHAT_MODULE, "HighlightEnabled", MATCH_TEXT);
@@ -188,12 +188,12 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TranslateDialogDefault(hwndDlg);
{
DBVARIANT dbv = { 0 };
- if (!db_get_ts(0, CHAT_MODULE, "HighlightWords", &dbv)) {
+ if (!db_get_ws(0, CHAT_MODULE, "HighlightWords", &dbv)) {
::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, dbv.ptszVal);
::db_free(&dbv);
}
- if (!db_get_ts(0, CHAT_MODULE, "HighlightNames", &dbv)) {
+ if (!db_get_ws(0, CHAT_MODULE, "HighlightNames", &dbv)) {
::SetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, dbv.ptszVal);
::db_free(&dbv);
}
@@ -245,16 +245,16 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (iLen) {
szBuf = reinterpret_cast<wchar_t *>(mir_alloc((iLen + 2) * sizeof(wchar_t)));
::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTNICKPATTERN, szBuf, iLen + 1);
- db_set_ts(0, CHAT_MODULE, "HighlightNames", szBuf);
+ db_set_ws(0, CHAT_MODULE, "HighlightNames", szBuf);
}
iLen = ::GetWindowTextLength(::GetDlgItem(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN));
if (iLen) {
szBuf = reinterpret_cast<wchar_t *>(mir_realloc(szBuf, sizeof(wchar_t) * (iLen + 2)));
::GetDlgItemText(hwndDlg, IDC_HIGHLIGHTTEXTPATTERN, szBuf, iLen + 1);
- db_set_ts(0, CHAT_MODULE, "HighlightWords", szBuf);
+ db_set_ws(0, CHAT_MODULE, "HighlightWords", szBuf);
}
- else db_set_ts(0, CHAT_MODULE, "HighlightWords", L"");
+ else db_set_ws(0, CHAT_MODULE, "HighlightWords", L"");
mir_free(szBuf);
BYTE dwFlags = (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKENABLE) ? MATCH_NICKNAME : 0) |
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 65ee0a3dee..64825d1b4f 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -225,7 +225,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM
wcsncpy_s(lf->lfFaceName, L"Webdings", _TRUNCATE);
}
else {
- ptrW tszDefFace(db_get_tsa(NULL, szMod, str));
+ ptrW tszDefFace(db_get_wsa(NULL, szMod, str));
if (tszDefFace == NULL)
wcsncpy_s(lf->lfFaceName, fol[j].szDefFace, _TRUNCATE);
else
@@ -240,7 +240,7 @@ static HTREEITEM InsertBranch(HWND hwndTree, wchar_t* pszDescr, BOOL bExpanded)
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvis.item.pszText = TranslateTS(pszDescr);
+ tvis.item.pszText = TranslateW(pszDescr);
tvis.item.stateMask = TVIS_EXPANDED | TVIS_BOLD;
tvis.item.state = (bExpanded ? TVIS_EXPANDED : 0) | TVIS_BOLD;
tvis.item.iImage = tvis.item.iSelectedImage = (bExpanded ? IMG_GRPOPEN : IMG_GRPCLOSED);
@@ -258,7 +258,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, branch_t *branch, int n
tvis.hParent = hParent;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvis.item.pszText = TranslateTS(branch[i].szDescr);
+ tvis.item.pszText = TranslateW(branch[i].szDescr);
if (branch[i].iMode)
tvis.item.iImage = tvis.item.iSelectedImage = ((((M.GetDword(CHAT_MODULE, branch[i].szDBName, defaultval) & branch[i].iMode) & branch[i].iMode) != 0) ? IMG_CHECK : IMG_NOCHECK);
else
@@ -356,7 +356,7 @@ HICON LoadIconEx(char *pszIcoLibName)
static void InitSetting(wchar_t* &ppPointer, const char *pszSetting, const wchar_t *pszDefault)
{
- ptrW val(db_get_tsa(NULL, CHAT_MODULE, pszSetting));
+ ptrW val(db_get_wsa(NULL, CHAT_MODULE, pszSetting));
replaceStrW(ppPointer, (val != NULL) ? val : pszDefault);
}
@@ -442,9 +442,9 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
if (iLen > 0) {
pszText = (wchar_t*)mir_realloc(pszText, (iLen + 2) * sizeof(wchar_t));
GetDlgItemText(hwndDlg, IDC_GROUP, pszText, iLen + 1);
- db_set_ts(NULL, CHAT_MODULE, "AddToGroup", pszText);
+ db_set_ws(NULL, CHAT_MODULE, "AddToGroup", pszText);
}
- else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", L"");
+ else db_set_ws(NULL, CHAT_MODULE, "AddToGroup", L"");
mir_free(pszText);
@@ -488,11 +488,11 @@ void RegisterFontServiceFonts()
{
char szTemp[100];
LOGFONT lf;
- FontIDT fid = { 0 };
- ColourIDT cid = { 0 };
+ FontIDW fid = { 0 };
+ ColourIDW cid = { 0 };
- fid.cbSize = sizeof(FontIDT);
- cid.cbSize = sizeof(ColourIDT);
+ fid.cbSize = sizeof(FontIDW);
+ cid.cbSize = sizeof(ColourIDW);
strncpy(fid.dbSettingsGroup, FONTMODULE, _countof(fid.dbSettingsGroup));
@@ -552,7 +552,7 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, LPGENW("Incoming background"), _countof(fid.backgroundName));
break;
}
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
fontOptionsList = IP_fontOptionsList;
@@ -578,7 +578,7 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
wcsncpy(fid.group, LPGENW("Message Sessions"), _countof(fid.group));
}
- FontRegisterT(&fid);
+ FontRegisterW(&fid);
}
wcsncpy(cid.group, LPGENW("Message Sessions") L"/" LPGENW("Group chats"), _countof(cid.group));
@@ -599,18 +599,18 @@ void RegisterFontServiceFonts()
cid.defcolour = RGB(0, 0, 0);
break;
}
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
cid.order++;
wcsncpy_s(cid.name, LPGENW("Nick list background"), _TRUNCATE);
strncpy_s(cid.setting, "ColorNicklistBG", _TRUNCATE);
cid.defcolour = SRMSGDEFSET_BKGCOLOUR;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
cid.order++;
wcsncpy_s(cid.name, LPGENW("Group chat log background"), _TRUNCATE);
strncpy_s(cid.setting, "ColorLogBG", _TRUNCATE);
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
// static colors (info panel, tool bar background etc...)
strncpy(fid.dbSettingsGroup, FONTMODULE, _countof(fid.dbSettingsGroup));
@@ -625,7 +625,7 @@ void RegisterFontServiceFonts()
cid.defcolour = GetSysColor(_clrs[i].def & 0x000000ff);
else
cid.defcolour = _clrs[i].def;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
strncpy(cid.dbSettingsGroup, SRMSGMOD_T, _countof(fid.dbSettingsGroup));
@@ -641,7 +641,7 @@ void RegisterFontServiceFonts()
else
cid.defcolour = _tabclrs[i].def;
- ColourRegisterT(&cid);
+ ColourRegisterW(&cid);
}
}
@@ -826,7 +826,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
if (iLen > 0) {
wchar_t *pszText1 = (wchar_t*)mir_alloc(iLen*sizeof(wchar_t) + 2);
GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1);
- db_set_ts(NULL, CHAT_MODULE, "LogDirectory", pszText1);
+ db_set_ws(NULL, CHAT_MODULE, "LogDirectory", pszText1);
mir_free(pszText1);
g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
db_set_b(0, CHAT_MODULE, "LoggingEnabled", g_Settings.bLoggingEnabled);
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index 63f7f8134a..abedaddfdf 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -114,7 +114,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
- wcsncpy_s(pd.lptzText, TranslateTS(szBuf), _TRUNCATE);
+ wcsncpy_s(pd.lptzText, TranslateW(szBuf), _TRUNCATE);
pd.iSeconds = g_Settings.iPopupTimeout;
if (g_Settings.iPopupStyle == 2) {
@@ -557,7 +557,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
for (int i = 0; i < gcmi.nItems; i++) {
- wchar_t *ptszText = TranslateTS(gcmi.Item[i].pszDesc);
+ wchar_t *ptszText = TranslateW(gcmi.Item[i].pszDesc);
DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0;
if (gcmi.Item[i].uType == MENU_NEWPOPUP) {
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index a38dfc6291..54c436ae8b 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1819,7 +1819,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN, FALSE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), BATF_UNICODE);
DM_InitTip(dat);
BB_InitDlgButtons(dat);
@@ -2564,14 +2564,14 @@ LABEL_SHOWWINDOW:
case ID_SEARCH_GOOGLE:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
+ Utils_OpenUrlT(CMStringW(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
case ID_SEARCH_WIKIPEDIA:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
+ Utils_OpenUrlT(CMStringW(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
@@ -2789,7 +2789,7 @@ LABEL_SHOWWINDOW:
if (g_Settings.bDoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
LRESULT lResult = (LRESULT)SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
- CMString tszName;
+ CMStringW tszName;
if (start == 0)
tszName.Format(L"%s: ", ui->pszNick);
else
@@ -2824,7 +2824,7 @@ LABEL_SHOWWINDOW:
ptrA pszRtf(Message_GetFromStream(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)));
pci->SM_AddCommand(si->ptszID, si->pszModule, pszRtf);
- CMString ptszText(ptrW(mir_utf8decodeW(pszRtf)));
+ CMStringW ptszText(ptrW(mir_utf8decodeW(pszRtf)));
if (ptszText.IsEmpty())
break;
@@ -3169,7 +3169,7 @@ LABEL_SHOWWINDOW:
char *szKey = "TAB_ContainersW";
mir_snprintf(szIndex, "%d", iSelection - IDM_CONTAINERMENU);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- if (!db_get_ts(NULL, szKey, szIndex, &dbv)) {
+ if (!db_get_ws(NULL, szKey, szIndex, &dbv)) {
SendMessage(hwndDlg, DM_CONTAINERSELECTED, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -3212,7 +3212,7 @@ LABEL_SHOWWINDOW:
if (pNewContainer == NULL)
if ((pNewContainer = CreateContainer(szNewName, FALSE, dat->hContact)) == NULL)
break;
- db_set_ts(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB_CHAT, (WPARAM)pNewContainer, (LPARAM)hwndDlg);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
SendMessage(dat->pContainer->hwndActive, WM_SIZE, 0, 0);
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index e9923d78b2..3a9d346383 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -446,7 +446,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_szStatusMsg)
mir_free(m_szStatusMsg);
m_szStatusMsg = 0;
- ptrW szStatus(db_get_tsa(hContact, "CList", "StatusMsg"));
+ ptrW szStatus(db_get_wsa(hContact, "CList", "StatusMsg"));
if (szStatus != 0)
m_szStatusMsg = (mir_wstrlen(szStatus) > 0 ? getNormalizedStatusMsg(szStatus) : 0);
}
@@ -454,7 +454,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_ListeningInfo)
mir_free(m_ListeningInfo);
m_ListeningInfo = 0;
- ptrW szListeningTo(db_get_tsa(hContact, cc->szProto, "ListeningTo"));
+ ptrW szListeningTo(db_get_wsa(hContact, cc->szProto, "ListeningTo"));
if (szListeningTo != 0 && *szListeningTo)
m_ListeningInfo = szListeningTo.detach();
}
@@ -462,7 +462,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
if (m_xStatusMsg)
mir_free(m_xStatusMsg);
m_xStatusMsg = 0;
- ptrW szXStatusMsg(db_get_tsa(hContact, cc->szProto, "XStatusMsg"));
+ ptrW szXStatusMsg(db_get_wsa(hContact, cc->szProto, "XStatusMsg"));
if (szXStatusMsg != 0 && *szXStatusMsg)
m_xStatusMsg = szXStatusMsg.detach();
}
@@ -526,7 +526,7 @@ wchar_t* CContactCache::getNormalizedStatusMsg(const wchar_t *src, bool fStripAl
if (src == 0 || mir_wstrlen(src) < 2)
return 0;
- CMString dest;
+ CMStringW dest;
for (int i = 0; src[i] != 0; i++) {
if (src[i] == 0x0d || src[i] == '\t')
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 06d188730a..7d15fcd56d 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -803,7 +803,7 @@ panel_found:
char szIndex[10];
itoa(iSelection - IDM_CONTAINERMENU, szIndex, 10);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszName != NULL)
SendMessage((HWND)tci.lParam, DM_CONTAINERSELECTED, 0, tszName);
}
@@ -1037,7 +1037,7 @@ panel_found:
}
if (dat) {
SendMessage(hwndDlg, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->hXStatusIcon ? dat->hXStatusIcon : dat->hTabStatusIcon));
- CMString szTitle;
+ CMStringW szTitle;
if (Utils::FormatTitleBar(dat, pContainer->settings->szTitleFormat, szTitle))
SetWindowText(hwndDlg, szTitle);
}
@@ -1317,21 +1317,21 @@ panel_found:
pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
mir_snprintf(szCname, "%s_theme", CONTAINER_PREFIX);
- if (!db_get_ts(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
+ if (!db_get_ws(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.ptszVal;
}
else {
Utils::ReadPrivateContainerSettings(pContainer);
if (szThemeName == NULL) {
mir_snprintf(szCname, "%s%d_theme", CONTAINER_PREFIX, pContainer->iContainerIndex);
- if (!db_get_ts(NULL, SRMSGMOD_T, szCname, &dbv))
+ if (!db_get_ws(NULL, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.ptszVal;
}
}
Utils::SettingsToContainer(pContainer);
if (szThemeName != NULL) {
- PathToAbsoluteT(szThemeName, pContainer->szAbsThemeFile, M.getDataPath());
+ PathToAbsoluteW(szThemeName, pContainer->szAbsThemeFile, M.getDataPath());
wcsncpy_s(pContainer->szRelThemeFile, szThemeName, _TRUNCATE);
db_free(&dbv);
}
@@ -1722,7 +1722,7 @@ panel_found:
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ts(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
+ db_set_ws(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
}
@@ -1768,7 +1768,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
do {
char szCounter[10];
itoa(i, szCounter, 10);
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szCounter));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szCounter));
if (tszName == NULL) {
if (iFirstFree != -1) {
pContainer->iContainerIndex = iFirstFree;
@@ -1776,7 +1776,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
}
else pContainer->iContainerIndex = i;
- db_set_ts(NULL, CONTAINER_KEY, szCounter, name);
+ db_set_ws(NULL, CONTAINER_KEY, szCounter, name);
BuildContainerMenu();
break;
}
@@ -2016,7 +2016,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNa
// use clist group names for containers...
if (M.GetByte("useclistgroups", 0)) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup == NULL) {
wcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
@@ -2026,7 +2026,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, wchar_t *szName, int iNa
return 1;
}
- ptrW tszContainerName(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszContainerName(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (tszContainerName == NULL) {
wcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
@@ -2040,14 +2040,14 @@ void TSAPI DeleteContainer(int iIndex)
{
char szIndex[10];
itoa(iIndex, szIndex, 10);
- ptrW tszContainerName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszContainerName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
+ db_set_ws(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- ptrW tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY);
}
@@ -2074,16 +2074,16 @@ void TSAPI RenameContainer(int iIndex, const wchar_t *szNew)
char szIndex[10];
itoa(iIndex, szIndex, 10);
- ptrW tszContainerName(db_get_tsa(NULL, CONTAINER_KEY, szIndex));
+ ptrW tszContainerName(db_get_wsa(NULL, CONTAINER_KEY, szIndex));
if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, szNew);
+ db_set_ws(NULL, CONTAINER_KEY, szIndex, szNew);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- ptrW tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
+ ptrW tszValue(db_get_wsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!mir_wstrcmp(tszValue, tszContainerName))
- db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
+ db_set_ws(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
}
}
@@ -2105,7 +2105,7 @@ HMENU TSAPI BuildContainerMenu()
while (true) {
char szCounter[10];
itoa(i, szCounter, 10);
- ptrW tszName(db_get_tsa(NULL, CONTAINER_KEY, szCounter));
+ ptrW tszName(db_get_wsa(NULL, CONTAINER_KEY, szCounter));
if (tszName == NULL)
break;
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 9dbc431c96..c3adeb98e6 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -123,9 +123,9 @@ static void ShowPage(HWND hwndDlg, int iPage, BOOL fShow)
Utils::showDlgControl(hwndDlg, o_pages[iPage].uIds[i], fShow ? SW_SHOW : SW_HIDE);
}
if (fShow) {
- SetDlgItemText(hwndDlg, IDC_TITLEBOX, TranslateTS(o_pages[iPage].szTitle));
+ SetDlgItemText(hwndDlg, IDC_TITLEBOX, TranslateW(o_pages[iPage].szTitle));
if (o_pages[iPage].szDesc != NULL)
- SetDlgItemText(hwndDlg, IDC_DESC, TranslateTS(o_pages[iPage].szDesc));
+ SetDlgItemText(hwndDlg, IDC_DESC, TranslateW(o_pages[iPage].szDesc));
else
SetDlgItemText(hwndDlg, IDC_DESC, L"");
}
@@ -173,7 +173,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Don't show them"));
for (int i = 0; i < nr_layouts; i++)
- SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(sblayouts[i].szName));
+ SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateW(sblayouts[i].szName));
/* bits 24 - 31 of dwFlagsEx hold the side bar layout id */
SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_SETCURSEL, (WPARAM)((pContainer->settings->dwFlagsEx & 0xff000000) >> 24), 0);
@@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_TEXT | TVIF_PARAM;
- tvis.item.pszText = TranslateTS(o_pages[i].szTitle);
+ tvis.item.pszText = TranslateW(o_pages[i].szTitle);
tvis.item.lParam = i;
HTREEITEM hItem = TreeView_InsertItem(hwndTree, &tvis);
if (i == 0)
@@ -336,7 +336,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
GetDlgItemText(hwndDlg, IDC_THEME, szFilename, _countof(szFilename));
szFilename[MAX_PATH - 1] = 0;
- PathToAbsoluteT(szFilename, szFinalThemeFile, M.getDataPath());
+ PathToAbsoluteW(szFilename, szFinalThemeFile, M.getDataPath());
if (mir_wstrcmp(szFilename, pContainer->szRelThemeFile))
pContainer->fPrivateThemeChanged = TRUE;
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index 5d69e24d89..4507a01a21 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -1010,7 +1010,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR
if (PtInRect(&rc, pt) && ((rc.right - rc.left) < size.cx)) {
if (dat->bType == SESSIONTYPE_CHAT) {
- ptrW tszTopic(db_get_tsa(dat->hContact, dat->szProto, "Topic"));
+ ptrW tszTopic(db_get_wsa(dat->hContact, dat->szProto, "Topic"));
if (tszTopic != NULL) {
tooltip_active = TRUE;
CallService("mToolTip/ShowTipW", tszTopic, (LPARAM)&ti);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 24f0fe2898..9c552aaaa9 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -421,7 +421,7 @@ static wchar_t* ShortenPreview(DBEVENTINFO* dbe)
if (iPreviewLimit > 500 || iPreviewLimit == 0)
iPreviewLimit = 500;
- wchar_t *buf = DbGetEventTextT(dbe, CP_ACP);
+ wchar_t *buf = DbGetEventTextW(dbe, CP_ACP);
if (mir_wstrlen(buf) > iPreviewLimit) {
fAddEllipsis = true;
size_t iIndex = iPreviewLimit;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 365fe0a812..ba3f54c5b9 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -51,7 +51,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
wchar_t szInitialDir[MAX_PATH + 2];
mir_snwprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs");
- CreateDirectoryTreeT(szInitialDir);
+ CreateDirectoryTreeW(szInitialDir);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -527,7 +527,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
DBVARIANT dbv = { 0 };
- if (0 == db_get_ts(dat->hContact, "UserInfo", "MyNotes", &dbv)) {
+ if (0 == db_get_ws(dat->hContact, "UserInfo", "MyNotes", &dbv)) {
SetDlgItemText(hwndDlg, IDC_MESSAGE, dbv.ptszVal);
mir_free(dbv.ptszVal);
}
@@ -537,7 +537,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
wchar_t *buf = (wchar_t*)mir_alloc((iLen + 2) * sizeof(wchar_t));
GetDlgItemText(hwndDlg, IDC_MESSAGE, buf, iLen + 1);
- db_set_ts(dat->hContact, "UserInfo", "MyNotes", buf);
+ db_set_ws(dat->hContact, "UserInfo", "MyNotes", buf);
SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
if (!dat->bIsAutosizingInput) {
@@ -981,7 +981,7 @@ static void LoadKLThread(LPVOID _param)
Thread_SetName("TabSRMM: LoadKLThread");
DBVARIANT dbv;
- if (!db_get_ts((UINT_PTR)_param, SRMSGMOD_T, "locale", &dbv)) {
+ if (!db_get_ws((UINT_PTR)_param, SRMSGMOD_T, "locale", &dbv)) {
HKL hkl = LoadKeyboardLayout(dbv.ptszVal, 0);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SETLOCALE, (WPARAM)_param, (LPARAM)hkl);
db_free(&dbv);
@@ -997,7 +997,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
return;
DBVARIANT dbv;
- if (!db_get_ts(dat->hContact, SRMSGMOD_T, "locale", &dbv))
+ if (!db_get_ws(dat->hContact, SRMSGMOD_T, "locale", &dbv))
db_free(&dbv);
else {
wchar_t szKLName[KL_NAMELENGTH + 1];
@@ -1005,11 +1005,11 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
wchar_t szBuf[20];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20);
mir_snwprintf(szKLName, L"0000%s", szBuf);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
else {
GetKeyboardLayoutName(szKLName);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
}
@@ -1082,7 +1082,7 @@ void TSAPI DM_SaveLocale(TWindowData *dat, WPARAM, LPARAM lParam)
dat->hkl = (HKL)lParam;
ActivateKeyboardLayout(dat->hkl, 0);
GetKeyboardLayoutName(szKLName);
- db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "locale", szKLName);
GetLocaleID(dat, szKLName);
UpdateReadChars(dat);
}
@@ -1764,7 +1764,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nClick dropdown to change this contact's favorite status."),
bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
- SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_UNICODE);
}
}
else wcsncpy_s(newtitle, L"Message Session", _TRUNCATE);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index d901380ae2..c66f58eb3c 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -602,7 +602,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
if (szOldStatus == 0 || szNewStatus == 0)
return;
- CMString text;
+ CMStringW text;
if (wStatus == ID_STATUS_OFFLINE)
text = TranslateT("signed off.");
else if (wOldStatus == ID_STATUS_OFFLINE)
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index ca05fe22c8..eef1b2a6a1 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -440,7 +440,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
DBVARIANT dbv;
- if (0 == db_get_ts(hContact, SRMSGMOD_T, "locale", &dbv)) {
+ if (0 == db_get_ws(hContact, SRMSGMOD_T, "locale", &dbv)) {
GetLocaleID(dat, dbv.ptszVal);
db_free(&dbv);
UpdateReadChars(dat);
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index f2888d3f99..99ace42793 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -502,7 +502,7 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem)
if (M.GetByte("ShowClientDescription", 1)) {
wchar_t temp[256];
- ptrW szVersion(db_get_tsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
+ ptrW szVersion(db_get_wsa(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer"));
if (szVersion)
mir_snwprintf(temp, TranslateT(" Client: %s"), szVersion);
else
@@ -644,7 +644,7 @@ void CInfoPanel::Chat_RenderIPNickname(const HDC hdc, RECT& rcItem)
pTmp += 2;
if (si->ptszStatusbarText[0] == '[' && pTmp > si->ptszStatusbarText) {
- CMString tszTemp(si->ptszStatusbarText, pTmp - si->ptszStatusbarText);
+ CMStringW tszTemp(si->ptszStatusbarText, pTmp - si->ptszStatusbarText);
CSkin::RenderText(hdc, m_dat->hThemeIP, tszTemp, &rcItem, DT_SINGLELINE | DT_END_ELLIPSIS | DT_NOPREFIX | DT_VCENTER,
CSkin::m_glowSize, m_ipConfig.clrs[IPFONTID_STATUS]);
}
@@ -884,7 +884,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (m_hwndConfig)
return;
- CMString str(FORMAT, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
+ CMStringW str(FORMAT, RTF_DEFAULT_HEADER, 0, 0, 0, 30 * 15);
str.AppendFormat(TranslateT("\\ul\\b Status message:\\ul0\\b0 \\par %s"),
m_dat->cache->getStatusMsg() ? m_dat->cache->getStatusMsg() : TranslateT("No status message"));
@@ -892,7 +892,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
DBVARIANT dbv = { 0 };
if (BYTE xStatus = m_dat->cache->getXStatusId()) {
wchar_t *tszXStatusName = 0;
- if (0 == db_get_ts(m_dat->cache->getContact(), m_dat->cache->getProto(), "XStatusName", &dbv))
+ if (0 == db_get_ws(m_dat->cache->getContact(), m_dat->cache->getProto(), "XStatusName", &dbv))
tszXStatusName = dbv.ptszVal;
else if (xStatus > 0 && xStatus <= 31)
tszXStatusName = xStatusDescr[xStatus - 1];
@@ -910,7 +910,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (m_dat->cache->getListeningInfo())
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Listening to:\\ul0\\b0 \\par %s"), m_dat->cache->getListeningInfo());
- if (0 == db_get_ts(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
+ if (0 == db_get_ws(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
str.AppendFormat(TranslateT("\\par\\par\\ul\\b Client:\\ul0\\b0 %s"), dbv.ptszVal);
::db_free(&dbv);
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 73d017a64c..000043e8b6 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -123,9 +123,9 @@ INT_PTR CMimAPI::foldersPathChanged()
Utils::ensureTralingBackslash(m_szChatLogsPath);
}
- CreateDirectoryTreeT(m_szProfilePath);
- CreateDirectoryTreeT(m_szSkinsPath);
- CreateDirectoryTreeT(m_szSavedAvatarsPath);
+ CreateDirectoryTreeW(m_szProfilePath);
+ CreateDirectoryTreeW(m_szSkinsPath);
+ CreateDirectoryTreeW(m_szSavedAvatarsPath);
Skin->extractSkinsAndLogo(true);
Skin->setupAeroSkins();
@@ -138,7 +138,7 @@ const wchar_t* CMimAPI::getUserDir()
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
wcsncpy_s(m_userDir, L"%miranda_userdata%", _TRUNCATE);
else
- wcsncpy_s(m_userDir, VARST(L"%miranda_userdata%"), _TRUNCATE);
+ wcsncpy_s(m_userDir, VARSW(L"%miranda_userdata%"), _TRUNCATE);
Utils::ensureTralingBackslash(m_userDir);
}
@@ -155,8 +155,8 @@ void CMimAPI::InitPaths()
wcsncpy_s(m_szSkinsPath, L"%miranda_path%\\Skins\\TabSRMM", _TRUNCATE);
}
else {
- wcsncpy_s(m_szChatLogsPath, VARST(L"%miranda_logpath%"), _TRUNCATE);
- wcsncpy_s(m_szSkinsPath, VARST(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
+ wcsncpy_s(m_szChatLogsPath, VARSW(L"%miranda_logpath%"), _TRUNCATE);
+ wcsncpy_s(m_szSkinsPath, VARSW(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
}
Utils::ensureTralingBackslash(m_szChatLogsPath);
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp
index 333da241f8..120906e8e0 100644
--- a/plugins/TabSRMM/src/modplus.cpp
+++ b/plugins/TabSRMM/src/modplus.cpp
@@ -44,7 +44,7 @@ static wchar_t* getMenuEntry(int i)
{
char MEntry[256];
mir_snprintf(MEntry, "MenuEntry_%u", i);
- return db_get_tsa(NULL, "tabmodplus", MEntry);
+ return db_get_wsa(NULL, "tabmodplus", MEntry);
}
static int RegisterCustomButton(WPARAM, LPARAM)
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index d43e5bb62e..e8ae781eda 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1281,13 +1281,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING, 0);
for (int i = 0; i < _countof(tooltips); i++)
- SendDlgItemMessage(hwndDlg, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(tooltips[i].text), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, tooltips[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateW(tooltips[i].text), BATF_UNICODE);
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, dat->bNotOnList ? TranslateT("Contact not on list. You may add it...") :
TranslateT("Auto scrolling is disabled (press F12 to enable it)"));
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Click for contact menu\nClick dropdown for window settings"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
+ SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Click for contact menu\nClick dropdown for window settings"), BATF_UNICODE);
SetDlgItemText(hwndDlg, IDC_RETRY, TranslateT("Retry"));
{
@@ -1342,7 +1342,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
// restore saved msg if any...
if (dat->hContact) {
- ptrW tszSavedMsg(db_get_tsa(dat->hContact, SRMSGMOD, "SavedMsg"));
+ ptrW tszSavedMsg(db_get_wsa(dat->hContact, SRMSGMOD, "SavedMsg"));
if (tszSavedMsg != 0) {
SETTEXTEX stx = { ST_DEFAULT, 1200 };
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, tszSavedMsg);
@@ -2545,7 +2545,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
mir_snprintf(szIndex, "%d", iSelection - IDM_CONTAINERMENU);
if (iSelection - IDM_CONTAINERMENU >= 0) {
- ptrW val(db_get_tsa(NULL, szKey, szIndex));
+ ptrW val(db_get_wsa(NULL, szKey, szIndex));
if (val)
SendMessage(hwndDlg, DM_CONTAINERSELECTED, 0, (LPARAM)val);
}
@@ -2623,7 +2623,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
if (streamOut == NULL)
break;
- CMString decoded(ptrW(mir_utf8decodeW(streamOut)));
+ CMStringW decoded(ptrW(mir_utf8decodeW(streamOut)));
if (decoded.IsEmpty())
break;
@@ -2887,7 +2887,7 @@ quote_from_last:
if ((pNewContainer = CreateContainer(szNewName, FALSE, dat->hContact)) == NULL)
break;
- db_set_ts(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
+ db_set_ws(dat->hContact, SRMSGMOD_T, "containerW", szNewName);
dat->fIsReattach = TRUE;
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_DOCREATETAB, (WPARAM)pNewContainer, dat->hContact);
if (iOldItems > 1) // there were more than 1 tab, container is still valid
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 06c130e036..4f647fdd79 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -187,7 +187,7 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic)
ii.hbm = hbm;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_UNKNOWN; // get the format from the filename extension. png is default.
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_TCHAR);
+ CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
}
}
@@ -834,7 +834,7 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags)
static wchar_t tszRtfBreaks[] = L" \\\n\r";
-static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst)
+static void CreateColorMap(CMStringW &Text, int iCount, COLORREF *pSrc, int *pDst)
{
const wchar_t *pszText = Text;
int iIndex = 1;
@@ -881,7 +881,7 @@ static int GetRtfIndex(int iCol, int iCount, int *pIndex)
// convert rich edit code to bbcode (if wanted). Otherwise, strip all RTF formatting
// tags and return plain text
-BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors, COLORREF *pColors)
+BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMStringW &pszText, int iNumColors, COLORREF *pColors)
{
if (pszText.IsEmpty())
return FALSE;
@@ -904,7 +904,7 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors
else idx += 5;
bool bInsideColor = false, bInsideUl = false;
- CMString res;
+ CMStringW res;
// iterate through all characters, if rtf control character found then take action
for (const wchar_t *p = pszText.GetString() + idx; *p;) {
@@ -1726,7 +1726,7 @@ void TSAPI GetClientIcon(TWindowData *dat)
dat->hClientIcon = 0;
if (ServiceExists(MS_FP_GETCLIENTICONT)) {
- ptrW tszMirver(db_get_tsa(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "MirVer"));
+ ptrW tszMirver(db_get_wsa(dat->cache->getActiveContact(), dat->cache->getActiveProto(), "MirVer"));
if (tszMirver)
dat->hClientIcon = Finger_GetClientIcon(tszMirver, 1);
}
@@ -1937,7 +1937,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
ii.wszName = filename;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_JPEG;
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_TCHAR);
+ CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
int totalCount = 0;
wchar_t **ppFiles = NULL;
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index 1d7610caca..be46393656 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -45,7 +45,7 @@ void TSAPI AdjustBottomAvatarDisplay(TWindowData *dat);
void TSAPI SetDialogToType(HWND hwndDlg);
void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, MEVENT hEvent, DBEVENTINFO *dbei);
char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags = 0);
-BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors, COLORREF *pColors);
+BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMStringW &pszText, int iNumColors, COLORREF *pColors);
void TSAPI GetMYUIN(TWindowData *dat);
void TSAPI SetMessageLog(TWindowData *dat);
void TSAPI SwitchMessageLog(TWindowData *dat, int iMode);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 088a42847b..6f0a78a476 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -420,7 +420,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
dat->cache->updateStats(TSessionStats::SET_LAST_RCV, mir_strlen((char *)dbei.pBlob));
wchar_t *formatted = NULL;
- wchar_t *msg = DbGetEventTextT(&dbei, CP_UTF8);
+ wchar_t *msg = DbGetEventTextW(&dbei, CP_UTF8);
if (!msg) {
mir_free(dbei.pBlob);
return NULL;
@@ -684,7 +684,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateTS(months[event_time.tm_mon]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(months[event_time.tm_mon]), MAKELONG(isSent, dat->bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -704,7 +704,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME)));
str.AppendChar(' ');
}
- AppendUnicodeToBuffer(str, TranslateTS(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->bIsHistory));
+ AppendUnicodeToBuffer(str, TranslateW(weekDays[event_time.tm_wday]), MAKELONG(isSent, dat->bIsHistory));
}
else skipToNext = TRUE;
break;
@@ -844,7 +844,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
str.AppendChar(' ');
}
- ptrW tszText(DbGetEventTextT(&dbei, CP_ACP));
+ ptrW tszText(DbGetEventTextW(&dbei, CP_ACP));
AppendUnicodeToBuffer(str, tszText, 0);
}
break;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 0be5543c4d..ac5bf6b4ce 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -173,7 +173,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox)
FindClose(h);
SendMessage(hwndCombobox, CB_SETCURSEL, 0, 0);
- if (0 == db_get_ts(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
+ if (0 == db_get_ws(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
LRESULT lr = SendMessage(hwndCombobox, CB_GETCOUNT, 0, 0);
for (int i = 1; i < lr; i++) {
wchar_t *idata = (wchar_t*)SendMessage(hwndCombobox, CB_GETITEMDATA, i, 0);
@@ -344,7 +344,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (lr != CB_ERR && lr > 0) {
wchar_t *tszRelPath = (wchar_t*)SendDlgItemMessage(hwndDlg, IDC_SKINNAME, CB_GETITEMDATA, lr, 0);
if (tszRelPath && tszRelPath != (wchar_t*)CB_ERR)
- db_set_ts(0, SRMSGMOD_T, "ContainerSkin", tszRelPath);
+ db_set_ws(0, SRMSGMOD_T, "ContainerSkin", tszRelPath);
SendMessage(hwndDlg, WM_COMMAND, IDC_RELOADSKIN, 0);
}
else if (lr == 0) { // selected the <no skin> entry
@@ -398,7 +398,7 @@ void TreeViewInit(HWND hwndTree, UINT id, DWORD dwFlags, BOOL bFromMem)
tvi.hParent = 0;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.item.pszText = TranslateTS(lvGroups[i].szName);
+ tvi.item.pszText = TranslateW(lvGroups[i].szName);
tvi.item.stateMask = TVIS_EXPANDED | TVIS_BOLD;
tvi.item.state = TVIS_EXPANDED | TVIS_BOLD;
tvi.item.iImage = tvi.item.iSelectedImage = IMG_GRPOPEN;
@@ -408,7 +408,7 @@ void TreeViewInit(HWND hwndTree, UINT id, DWORD dwFlags, BOOL bFromMem)
for (int i = 0; lvItems[i].szName != NULL; i++) {
tvi.hParent = (HTREEITEM)lvGroups[lvItems[i].uGroup].handle;
tvi.hInsertAfter = TVI_LAST;
- tvi.item.pszText = TranslateTS(lvItems[i].szName);
+ tvi.item.pszText = TranslateW(lvItems[i].szName);
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvi.item.lParam = i;
if (bFromMem == FALSE) {
@@ -1096,7 +1096,7 @@ static INT_PTR CALLBACK DlgProcContainerSettings(HWND hwndDlg, UINT msg, WPARAM
CheckDlgButton(hwndDlg, IDC_USEAERO, M.GetByte("useAero", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_USEAEROPEEK, M.GetByte("useAeroPeek", 1) ? BST_CHECKED : BST_UNCHECKED);
for (int i = 0; i < CSkin::AERO_EFFECT_LAST; i++)
- SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_INSERTSTRING, -1, (LPARAM)TranslateTS(CSkin::m_aeroEffects[i].tszName));
+ SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_INSERTSTRING, -1, (LPARAM)TranslateW(CSkin::m_aeroEffects[i].tszName));
SendDlgItemMessage(hwndDlg, IDC_AEROEFFECT, CB_SETCURSEL, (WPARAM)CSkin::m_aeroEffect, 0);
Utils::enableDlgControl(hwndDlg, IDC_AEROEFFECT, PluginConfig.m_bIsVista);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 57be74dd2b..e88962717b 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -816,7 +816,7 @@ static int TSAPI SetupIconLibConfig()
SKINICONDESC sid = { 0 };
sid.defaultFile.w = szFilename;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.flags = SIDF_PATH_UNICODE;
for (int n = 0; n < _countof(ICONBLOCKS); n++) {
sid.section.a = ICONBLOCKS[n].szSection;
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index 6529bfaabf..36386a79b9 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -179,7 +179,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TContainerData *pContainer = 0;
do {
mir_snprintf(szValue, "%d", iCounter);
- if (db_get_ts(NULL, szKey, szValue, &dbv))
+ if (db_get_ws(NULL, szKey, szValue, &dbv))
break; // end of list
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
if (wcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index aed683997e..99bab331e2 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -450,13 +450,13 @@ void SendQueue::UpdateSaveAndSendButton(TWindowData *dat)
if (len) { // looks complex but avoids flickering on the button while typing.
if (!(dat->dwFlags & MWF_SAVEBTN_SAV)) {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_SAVE]);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_save, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_save, BATF_UNICODE);
dat->dwFlags |= MWF_SAVEBTN_SAV;
}
}
else {
SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
dat->dwFlags &= ~MWF_SAVEBTN_SAV;
}
dat->textLen = len;
@@ -667,7 +667,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b
if (dat->pContainer->hwndActive == dat->hwnd)
UpdateReadChars(dat);
SendDlgItemMessage(dat->hwnd, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_BUTTON_CANCEL]);
- SendDlgItemMessage(dat->hwnd, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_TCHAR);
+ SendDlgItemMessage(dat->hwnd, IDC_SAVE, BUTTONADDTOOLTIP, (WPARAM)pszIDCSAVE_close, BATF_UNICODE);
dat->dwFlags &= ~MWF_SAVEBTN_SAV;
if (!fAvail)
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 48c8168a55..abdb089cf8 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -81,7 +81,7 @@ static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl)
{
for (int i = 0; i <= TMPL_ERRMSG; i++) {
DBVARIANT dbv = { 0 };
- if (db_get_ts(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
+ if (db_get_ws(hContact, rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[i], &dbv))
continue;
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR)
wcsncpy_s(tSet->szTemplates[i], dbv.ptszVal, _TRUNCATE);
@@ -96,12 +96,12 @@ void LoadDefaultTemplates()
if (M.GetByte(RTLTEMPLATES_MODULE, "setup", 0) < 2) {
for (int i = 0; i <= TMPL_ERRMSG; i++)
- db_set_ts(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], RTL_Default.szTemplates[i]);
+ db_set_ws(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], RTL_Default.szTemplates[i]);
db_set_b(0, RTLTEMPLATES_MODULE, "setup", 2);
}
if (M.GetByte(TEMPLATES_MODULE, "setup", 0) < 2) {
for (int i = 0; i <= TMPL_ERRMSG; i++)
- db_set_ts(NULL, TEMPLATES_MODULE, TemplateNames[i], LTR_Default.szTemplates[i]);
+ db_set_ws(NULL, TEMPLATES_MODULE, TemplateNames[i], LTR_Default.szTemplates[i]);
db_set_b(0, TEMPLATES_MODULE, "setup", 2);
}
LoadTemplatesFrom(&LTR_Active, 0, 0);
@@ -258,7 +258,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Utils::enableDlgControl(hwndDlg, IDC_TEMPLATELIST, TRUE);
Utils::enableDlgControl(hwndDlg, IDC_REVERT, FALSE);
InvalidateRect(GetDlgItem(hwndDlg, IDC_TEMPLATELIST), NULL, FALSE);
- db_set_ts(teInfo->hContact, teInfo->rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[teInfo->inEdit], newTemplate);
+ db_set_ws(teInfo->hContact, teInfo->rtl ? RTLTEMPLATES_MODULE : TEMPLATES_MODULE, TemplateNames[teInfo->inEdit], newTemplate);
SendDlgItemMessage(hwndDlg, IDC_EDITTEMPLATE, EM_SETREADONLY, TRUE, 0);
}
break;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index d2ba2c8e3c..f0ea77ee67 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1002,7 +1002,7 @@ void CImageItem::Colorize(HBITMAP hBitmap, BYTE dr, BYTE dg, BYTE db, BYTE alpha
HBITMAP TSAPI CImageItem::LoadPNG(const wchar_t *szFilename)
{
HBITMAP hBitmap = 0;
- hBitmap = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_TCHAR);
+ hBitmap = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_WCHAR);
return hBitmap;
}
@@ -1015,8 +1015,8 @@ HBITMAP TSAPI CImageItem::LoadPNG(const wchar_t *szFilename)
void CSkin::setFileName()
{
DBVARIANT dbv;
- if (0 == db_get_ts(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
- PathToAbsoluteT(dbv.ptszVal, m_tszFileName, M.getSkinPath());
+ if (0 == db_get_ws(0, SRMSGMOD_T, "ContainerSkin", &dbv)) {
+ PathToAbsoluteW(dbv.ptszVal, m_tszFileName, M.getSkinPath());
db_free(&dbv);
}
else
@@ -1676,7 +1676,7 @@ void CSkin::setupAeroSkins()
mir_snwprintf(tszFilename, L"%scustom_unknown.png", tszBasePath);
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%sunknown.png", tszBasePath);
- PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
+ PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
if (PluginConfig.g_hbmUnknown == 0) {
HDC dc = GetDC(0);
PluginConfig.g_hbmUnknown = CreateCompatibleBitmap(dc, 20, 20);
@@ -1733,7 +1733,7 @@ void CSkin::setupAeroSkins()
m_dwmColorRGB = RGB((BYTE)fr, (BYTE)fg, (BYTE)fb);
- FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
HBITMAP hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
@@ -1775,7 +1775,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_glow.png", tszBasePath);
- fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
+ fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
COLORREF glowColor = M.GetDword(FONTMODULE, "aeroGlow", RGB(40, 40, 255));
hbm = FIF->FI_CreateHBITMAPFromDIB(fib);
@@ -1808,7 +1808,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_button.png", tszBasePath);
- hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
+ hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR);
CImageItem::Colorize(hbm, GetRValue(m_dwmColorRGB),
GetGValue(m_dwmColorRGB),
@@ -2442,7 +2442,7 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const
if (tszBasePath[mir_wstrlen(tszBasePath) - 1] != '\\')
mir_wstrcat(tszBasePath, L"\\");
- CreateDirectoryTreeT(tszBasePath);
+ CreateDirectoryTreeW(tszBasePath);
m_fAeroSkinsValid = true;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 0c05c1ba27..08dd764a9c 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -60,7 +60,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
switch (message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
- CallService(MS_MSG_SENDMESSAGET, (WPARAM)PUGetContact(hWnd), 0);
+ CallService(MS_MSG_SENDMESSAGEW, (WPARAM)PUGetContact(hWnd), 0);
PUDeletePopup(hWnd);
return 1;
}
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 5ce367b1a0..644134e6dd 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -241,7 +241,7 @@ static wchar_t* Trunc500(wchar_t *str)
return str;
}
-bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMString &dest)
+bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMStringW &dest)
{
if (dat == 0)
return false;
@@ -286,7 +286,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
{
BYTE xStatus = dat->cache->getXStatusId();
if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
+ ptrW szXStatus(db_get_wsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
}
@@ -296,7 +296,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
{
BYTE xStatus = dat->cache->getXStatusId();
if (dat->wStatus != ID_STATUS_OFFLINE && xStatus > 0 && xStatus <= 31) {
- ptrW szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
+ ptrW szXStatus(db_get_wsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : L"(undef)");
@@ -317,7 +317,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt
case 'g':
{
- ptrW tszGroup(db_get_tsa(dat->hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(dat->hContact, "CList", "Group"));
if (tszGroup != NULL)
dest.Append(tszGroup);
}
@@ -363,7 +363,7 @@ WCHAR* Utils::FilterEventMarkers(WCHAR *wszText)
void Utils::DoubleAmpersands(wchar_t *pszText, size_t len)
{
- CMString text(pszText);
+ CMStringW text(pszText);
text.Replace(L"&", L"&&");
mir_wstrncpy(pszText, text.c_str(), len);
}
@@ -573,7 +573,7 @@ void Utils::SaveContainerSettings(TContainerData *pContainer, const char *szSett
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ts(NULL, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
+ db_set_ws(NULL, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
}
@@ -1084,14 +1084,14 @@ LRESULT CWarning::show(const int uId, DWORD dwFlags, const wchar_t* tszTxt)
else {
if (uId != -1) {
if (dwFlags & CWF_UNTRANSLATED)
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
else {
// revert to untranslated warning when the translated message
// is not well-formatted.
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
if (mir_wstrlen(_s) < 3 || 0 == wcschr(_s, '|'))
- _s = TranslateTS(warnings[uId]);
+ _s = TranslateW(warnings[uId]);
}
}
else
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index cd6ca460a8..ce3ef737b1 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -56,7 +56,7 @@ public:
static wchar_t* GetPreviewWithEllipsis(wchar_t *szText, size_t iMaxLen);
static wchar_t* FilterEventMarkers(wchar_t *wszText);
static LPCTSTR FormatRaw(TWindowData *dat, const wchar_t *msg, int flags, BOOL isSent);
- static bool FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMString &dest);
+ static bool FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMStringW &dest);
static char* FilterEventMarkers(char *szText);
static void DoubleAmpersands(wchar_t *pszText, size_t len);
static void RTF_CTableInit();