diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/QuickMessages | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickMessages')
-rw-r--r-- | plugins/QuickMessages/src/Utils.cpp | 12 | ||||
-rw-r--r-- | plugins/QuickMessages/src/main.cpp | 16 | ||||
-rw-r--r-- | plugins/QuickMessages/src/options.cpp | 34 |
3 files changed, 31 insertions, 31 deletions
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 82aa13cd5a..b5f1943aed 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -356,8 +356,8 @@ wchar_t* getMenuEntry(int buttonnum, int entrynum, BYTE mode) } if (!db_get_ts(NULL, PLGNAME, szMEntry, &dbv)) { - if (mir_tstrlen(dbv.ptszVal)) - buffer = mir_tstrdup(dbv.ptszVal); + if (mir_wstrlen(dbv.ptszVal)) + buffer = mir_wstrdup(dbv.ptszVal); db_free(&dbv); } @@ -453,7 +453,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText, break; case 'P': ptszName = mir_a2u(GetContactProto(hContact)); - NameLenght = (int)mir_tstrlen(ptszName); + NameLenght = (int)mir_wstrlen(ptszName); p = (wchar_t *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(wchar_t)); if (!p) { mir_free(ptszName); @@ -478,7 +478,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText, case 'n': ptszName = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0); - NameLenght = (int)mir_tstrlen(ptszName); + NameLenght = (int)mir_wstrlen(ptszName); p = (wchar_t *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(wchar_t)); if (!p) break; @@ -501,7 +501,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText, ptszName = Contact_GetInfo(CNF_FIRSTNAME, hContact); if (ptszName == NULL) break; - NameLenght = (int)mir_tstrlen(ptszName); + NameLenght = (int)mir_wstrlen(ptszName); p = (wchar_t *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(wchar_t)); if (!p) { mir_free(ptszName); @@ -528,7 +528,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText, if (ptszName == NULL) break; - NameLenght = (int)mir_tstrlen(ptszName); + NameLenght = (int)mir_wstrlen(ptszName); p = (wchar_t *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(wchar_t)); if (!p) { mir_free(ptszName); diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp index 6dc22694c7..267dd279b0 100644 --- a/plugins/QuickMessages/src/main.cpp +++ b/plugins/QuickMessages/src/main.cpp @@ -94,8 +94,8 @@ static int InputMenuPopup(WPARAM, LPARAM lParam) hData = GetClipboardData(CF_UNICODETEXT);
chBuffer = (wchar_t*)GlobalLock(hData);
- textLength = (int)mir_tstrlen(chBuffer);
- pszCBText = mir_tstrdup(chBuffer);
+ textLength = (int)mir_wstrlen(chBuffer);
+ pszCBText = mir_wstrdup(chBuffer);
GlobalUnlock(hData);
CloseClipboard();
}
@@ -110,7 +110,7 @@ static int InputMenuPopup(WPARAM, LPARAM lParam) SendMessage(mwpd->hwnd, EM_GETSELTEXT, 0, (LPARAM)pszText);
}
if (qd->ptszValue) {
- ptszQValue = ParseString(mwpd->hContact, qd->ptszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(qd->ptszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(mwpd->hContact, qd->ptszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_wstrlen(qd->ptszValue), textlenght, pszCBText ? (int)mir_wstrlen(pszCBText) : 0);
if ((bIsService = qd->bIsService) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)mwpd->hContact, 0);
@@ -163,8 +163,8 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) hData = GetClipboardData(CF_UNICODETEXT);
chBuffer = (wchar_t*)GlobalLock(hData);
- textLength = (int)mir_tstrlen(chBuffer);
- pszCBText = mir_tstrdup(chBuffer);
+ textLength = (int)mir_wstrlen(chBuffer);
+ pszCBText = mir_wstrdup(chBuffer);
GlobalUnlock(hData);
CloseClipboard();
}
@@ -195,7 +195,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) switch (state) {
case 1:
if (ButtonsList[cbcd->dwButtonId]->ptszQValue)
- ptszQValue = ParseString(cbcd->hContact, ButtonsList[cbcd->dwButtonId]->ptszQValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(ButtonsList[cbcd->dwButtonId]->ptszQValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, ButtonsList[cbcd->dwButtonId]->ptszQValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_wstrlen(ButtonsList[cbcd->dwButtonId]->ptszQValue), textlenght, pszCBText ? (int)mir_wstrlen(pszCBText) : 0);
if ((bIsService = ButtonsList[cbcd->dwButtonId]->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
break;
@@ -204,7 +204,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) {
ButtonData *bd = (ButtonData *)sl->items[0];
if (bd && bd->pszValue) {
- ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_wstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_wstrlen(pszCBText) : 0);
if ((bIsService = bd->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
}
@@ -246,7 +246,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) ButtonData *bd = (ButtonData *)sl->items[res - 1];
bCTRL = (GetKeyState(VK_CONTROL) & 0x8000) ? 1 : 0;
if (bd->pszValue) {
- ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_wstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_wstrlen(pszCBText) : 0);
if ((bIsService = bd->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
}
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp index 65d55d874a..297a6b0f9f 100644 --- a/plugins/QuickMessages/src/options.cpp +++ b/plugins/QuickMessages/src/options.cpp @@ -121,10 +121,10 @@ void SetMenuEntryProperties(HWND hdlg) ListData* ld = (ListData*)tvi.lParam;
wchar_t szValue[256];
GetDlgItemText(hdlg, IDC_RCLICKVALUE, szValue, _countof(szValue));
- if (mir_tstrlen(szValue)) {
+ if (mir_wstrlen(szValue)) {
if (ld->ptszOPQValue && (ld->ptszOPQValue != ld->ptszQValue))
mir_free(ld->ptszOPQValue);
- ld->ptszOPQValue = mir_tstrdup(szValue);
+ ld->ptszOPQValue = mir_wstrdup(szValue);
}
ld->bIsOpServName = IsDlgButtonChecked(hdlg, IDC_ISSERVNAME2);
}
@@ -139,10 +139,10 @@ void SetMenuEntryProperties(HWND hdlg) ButtonData *bd = (ButtonData*)tvi.lParam;
wchar_t szValue[256];
GetDlgItemText(hdlg, IDC_MENUVALUE, szValue, _countof(szValue));
- if (mir_tstrlen(szValue)) {
- if (mir_tstrlen(bd->pszOpValue) && (bd->pszOpValue != bd->pszValue))
+ if (mir_wstrlen(szValue)) {
+ if (mir_wstrlen(bd->pszOpValue) && (bd->pszOpValue != bd->pszValue))
mir_free(bd->pszOpValue);
- bd->pszOpValue = mir_tstrdup(szValue);
+ bd->pszOpValue = mir_wstrdup(szValue);
}
bd->bOpInQMenu = IsDlgButtonChecked(hdlg, IDC_INQMENU);
bd->bIsOpServName = IsDlgButtonChecked(hdlg, IDC_ISSERVNAME);
@@ -177,7 +177,7 @@ void SetMenuEntryProperties(HWND hdlg) }
else {
if (!bd->pszOpValue)
- bd->pszOpValue = mir_tstrdup(LPGENW("Enter Value"));
+ bd->pszOpValue = mir_wstrdup(LPGENW("Enter Value"));
}
if (TreeView_GetParent(hMenuTree, tvi.hItem))
bd->fEntryOpType |= QMF_EX_CHILD;
@@ -244,7 +244,7 @@ void SaveMenuTree() TreeView_GetItem(hButtonsList, &tvi);
}
- ld->ptszButtonName = mir_tstrdup(tvi.pszText);
+ ld->ptszButtonName = mir_wstrdup(tvi.pszText);
if (ld->ptszQValue) {
mir_snprintf(szMEntry, "ButtonValue_%u", iBl);
@@ -748,9 +748,9 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) GetWindowText(hwndEdit, szLabel, _countof(szLabel));
hwndEdit = NULL;
- if (!mir_tstrlen(szLabel)) break;
+ if (!mir_wstrlen(szLabel)) break;
if (bd = (ButtonData*)tvi.lParam) {
- if (!mir_tstrcmp(szLabel, L"---")) {
+ if (!mir_wstrcmp(szLabel, L"---")) {
if (TreeView_GetChild(hMenuTree, tvi.hItem))
break;
else {
@@ -767,7 +767,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) SetDlgItemText(hdlg, IDC_MENUVALUE, bd->pszOpValue/*?bd->pszOpValue:bd->pszValue*/);
}
- bd->pszOpName = mir_tstrdup(szLabel);
+ bd->pszOpName = mir_wstrdup(szLabel);
tvi.pszText = szLabel;
TreeView_SetItem(hMenuTree, &tvi);
@@ -804,10 +804,10 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) if (bd) {
wchar_t szValue[256];
GetDlgItemText(hdlg, IDC_MENUVALUE, szValue, _countof(szValue));
- if (mir_tstrlen(szValue)) {
+ if (mir_wstrlen(szValue)) {
if (bd->pszOpValue && (bd->pszOpValue != bd->pszValue))
mir_free(bd->pszOpValue);
- bd->pszOpValue = mir_tstrdup(szValue);
+ bd->pszOpValue = mir_wstrdup(szValue);
}
bd->bOpInQMenu = IsDlgButtonChecked(hdlg, IDC_INQMENU);
bd->bIsOpServName = IsDlgButtonChecked(hdlg, IDC_ISSERVNAME);
@@ -877,7 +877,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) GetWindowText(hwndEdit, szLabel, _countof(szLabel));
hwndEdit = NULL;
- if (!mir_tstrlen(szLabel)) break;
+ if (!mir_wstrlen(szLabel)) break;
tvi.pszText = szLabel;
((ListData*)tvi.lParam)->dwOPFlags |= QMF_RENAMED;
@@ -964,7 +964,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) GetDlgItemText(hdlg, IDC_BUTTONNAME, namebuff, _countof(namebuff));
tvis.item.mask = TVIF_PARAM | TVIF_TEXT;
- tvis.item.pszText = (mir_tstrlen(namebuff)) ? namebuff : TranslateT("New Button");
+ tvis.item.pszText = (mir_wstrlen(namebuff)) ? namebuff : TranslateT("New Button");
tvis.item.lParam = (LPARAM)ld;
TreeView_SelectItem(hButtonsList, TreeView_InsertItem(hButtonsList, &tvis));
}break;
@@ -1014,9 +1014,9 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) GetDlgItemText(hdlg, IDC_MENUNAME, namebuff, _countof(namebuff));
bd->dwOPPos = TreeView_GetCount(hMenuTree) - 1;
- bd->pszOpName = mir_tstrlen(namebuff) ? mir_tstrdup(namebuff) : mir_tstrdup(TranslateT("New Menu Entry"));
- bd->pszOpValue = mir_tstrdup(bd->pszOpName);
- bd->fEntryOpType = !mir_tstrcmp(namebuff, L"---") ? QMF_EX_SEPARATOR : 0;
+ bd->pszOpName = mir_wstrlen(namebuff) ? mir_wstrdup(namebuff) : mir_wstrdup(TranslateT("New Menu Entry"));
+ bd->pszOpValue = mir_wstrdup(bd->pszOpName);
+ bd->fEntryOpType = !mir_wstrcmp(namebuff, L"---") ? QMF_EX_SEPARATOR : 0;
bd->dwOPFlags = QMF_NEW;
bd->pszName = NULL;
bd->pszValue = NULL;
|