diff options
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/muchighlight.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 36 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/tools.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 14 |
5 files changed, 35 insertions, 35 deletions
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); |