summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Clist_nicer/src
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp4
-rw-r--r--plugins/Clist_nicer/src/clc.h14
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp26
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp18
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp12
-rw-r--r--plugins/Clist_nicer/src/clcutils.cpp24
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp8
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp62
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp6
-rw-r--r--plugins/Clist_nicer/src/cluiopts.cpp2
-rw-r--r--plugins/Clist_nicer/src/cluiservices.cpp6
-rw-r--r--plugins/Clist_nicer/src/config.cpp14
-rw-r--r--plugins/Clist_nicer/src/config.h10
-rw-r--r--plugins/Clist_nicer/src/contact.cpp8
-rw-r--r--plugins/Clist_nicer/src/coolsblib.cpp2
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp12
-rw-r--r--plugins/Clist_nicer/src/extBackg.h6
-rw-r--r--plugins/Clist_nicer/src/groupmenu.cpp4
-rw-r--r--plugins/Clist_nicer/src/init.cpp6
-rw-r--r--plugins/Clist_nicer/src/statusbar.cpp2
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp18
22 files changed, 133 insertions, 133 deletions
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp
index 047ef84064..fef024d3b1 100644
--- a/plugins/Clist_nicer/src/CLCButton.cpp
+++ b/plugins/Clist_nicer/src/CLCButton.cpp
@@ -102,7 +102,7 @@ int ClcGetButtonId(HWND hwnd)
struct MButtonExtension : public MButtonCtrl
{
HICON hIconPrivate;
- TCHAR szText[128];
+ wchar_t szText[128];
SIZE sLabel;
HIMAGELIST hIml;
int iIcon;
@@ -388,7 +388,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
break;
case WM_SETTEXT:
- _tcsncpy_s(bct->szText, (TCHAR*)lParam, _TRUNCATE);
+ wcsncpy_s(bct->szText, (wchar_t*)lParam, _TRUNCATE);
break;
case BM_GETIMAGE:
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h
index 91b917162f..b083c93a83 100644
--- a/plugins/Clist_nicer/src/clc.h
+++ b/plugins/Clist_nicer/src/clc.h
@@ -94,7 +94,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef struct _OrderTreeData
{
BYTE ID;
- const TCHAR * Name;
+ const wchar_t * Name;
BYTE Position;
BOOL Visible;
BOOL fReserved;
@@ -105,7 +105,7 @@ struct TExtraCache
MCONTACT hContact;
HANDLE hTimeZone;
BYTE valid;
- TCHAR *statusMsg;
+ wchar_t *statusMsg;
BYTE bStatusMsgValid;
DWORD dwCFlags;
DWORD dwDFlags; // display flags for caching only
@@ -274,7 +274,7 @@ struct TCluiData {
BOOL bUsePerProto;
BOOL bOverridePerStatusColors;
BOOL bDontSeparateOffline;
- TCHAR groupFilter[2048];
+ wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
DWORD lastMsgFilter;
@@ -308,7 +308,7 @@ struct TCluiData {
int group_padding;
DWORD t_now;
BOOL realTimeSaving;
- TCHAR tszProfilePath[MAX_PATH];
+ wchar_t tszProfilePath[MAX_PATH];
FILETIME ft;
SYSTEMTIME st;
};
@@ -373,13 +373,13 @@ LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM
// clcutils.c
void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
void DoSelectionDefaultAction(HWND hwnd, struct ClcData *dat);
-int FindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk);
+int FindRowByText(HWND hwnd, struct ClcData *dat, const wchar_t *text, int prefixOk);
void BeginRenameSelection(HWND hwnd, struct ClcData *dat);
int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
-size_t MY_pathToRelative(const TCHAR *pSrc, TCHAR *pOut);
-size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut);
+size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut);
+size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut);
#define DROPTARGET_OUTSIDE 0
#define DROPTARGET_ONSELF 1
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index b6ebeb7cb3..d46f474e20 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -52,14 +52,14 @@ ClcContact* CreateClcContact(void)
return p;
}
-ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText)
+ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText)
{
ClcContact *p = coreCli.pfnAddInfoItemToGroup(group, flags, pszText);
p->avatarLeft = p->extraIconRightBegin = -1;
return p;
}
-ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers)
+ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers)
{
ClcGroup *p = coreCli.pfnAddGroup(hwnd, dat, szName, flags, groupId, calcTotalMembers);
if (p && p->parent)
@@ -188,13 +188,13 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
if (!result && mir_tstrlen(dbv.ptszVal) > 1) {
size_t iLen = mir_tstrlen(dbv.ptszVal);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
- p->statusMsg = (TCHAR *)realloc(p->statusMsg, (iLen + 2) * sizeof(TCHAR));
- _tcsncpy(p->statusMsg, dbv.ptszVal, iLen + 1);
+ p->statusMsg = (wchar_t *)realloc(p->statusMsg, (iLen + 2) * sizeof(wchar_t));
+ wcsncpy(p->statusMsg, dbv.ptszVal, iLen + 1);
}
else {
int xStatus;
WPARAM xStatus2;
- TCHAR xStatusName[128];
+ wchar_t xStatusName[128];
CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
@@ -204,9 +204,9 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
if (!CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, hContact, (LPARAM)&cst)) {
- TCHAR *szwXstatusName = TranslateTS(xStatusName);
- p->statusMsg = (TCHAR *)realloc(p->statusMsg, (mir_tstrlen(szwXstatusName) + 2) * sizeof(TCHAR));
- _tcsncpy(p->statusMsg, szwXstatusName, mir_tstrlen(szwXstatusName) + 1);
+ wchar_t *szwXstatusName = TranslateTS(xStatusName);
+ p->statusMsg = (wchar_t *)realloc(p->statusMsg, (mir_tstrlen(szwXstatusName) + 2) * sizeof(wchar_t));
+ wcsncpy(p->statusMsg, szwXstatusName, mir_tstrlen(szwXstatusName) + 1);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
}
}
@@ -215,9 +215,9 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
if (p->bStatusMsgValid > STATUSMSG_XSTATUSNAME) {
int j = 0;
- p->statusMsg = (TCHAR *)realloc(p->statusMsg, (mir_tstrlen(dbv.ptszVal) + 2) * sizeof(TCHAR));
+ p->statusMsg = (wchar_t *)realloc(p->statusMsg, (mir_tstrlen(dbv.ptszVal) + 2) * sizeof(wchar_t));
for (int i = 0; dbv.ptszVal[i]; i++) {
- if (dbv.ptszVal[i] == (TCHAR)0x0d)
+ if (dbv.ptszVal[i] == (wchar_t)0x0d)
continue;
p->statusMsg[j] = dbv.ptszVal[i] == (wchar_t)0x0a ? (wchar_t)' ' : dbv.ptszVal[i];
j++;
@@ -265,7 +265,7 @@ void ReloadExtraInfo(MCONTACT hContact)
void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
{
WORD infoTypeC2[12];
- TCHAR *szText;
+ wchar_t *szText;
TExtraCache *p;
memset(infoTypeC2, 0, sizeof(infoTypeC2));
@@ -409,9 +409,9 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData
if (cfg::dat.bFilterEffective & CLVM_FILTER_GROUPS) {
ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
- TCHAR szGroupMask[256];
+ wchar_t szGroupMask[256];
mir_sntprintf(szGroupMask, L"%s|", tszGroup);
- int bHasGroup = _tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0;
+ int bHasGroup = wcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0;
filterResult = (cfg::dat.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | bHasGroup) : (filterResult & bHasGroup);
}
else if (cfg::dat.filterFlags & CLVM_INCLUDED_UNGROUPED)
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index f20f3bb4e6..5d73f252b9 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -62,18 +62,18 @@ struct CheckBoxToGroupStyleEx_t {
struct CheckBoxValues_t {
DWORD style;
- TCHAR *szDescr;
+ wchar_t *szDescr;
};
static const struct CheckBoxValues_t greyoutValues[] = {
- { GREYF_UNFOCUS, LPGENT("Not focused") }, { MODEF_OFFLINE, LPGENT("Offline") }, { PF2_ONLINE, LPGENT("Online") }, { PF2_SHORTAWAY, LPGENT("Away") },
- { PF2_LONGAWAY, LPGENT("Not available") }, { PF2_LIGHTDND, LPGENT("Occupied") }, { PF2_HEAVYDND, LPGENT("Do not disturb") }, { PF2_FREECHAT, LPGENT("Free for chat") },
- { PF2_INVISIBLE, LPGENT("Invisible") }, { PF2_OUTTOLUNCH, LPGENT("Out to lunch") }, { PF2_ONTHEPHONE, LPGENT("On the phone") }
+ { GREYF_UNFOCUS, LPGENW("Not focused") }, { MODEF_OFFLINE, LPGENW("Offline") }, { PF2_ONLINE, LPGENW("Online") }, { PF2_SHORTAWAY, LPGENW("Away") },
+ { PF2_LONGAWAY, LPGENW("Not available") }, { PF2_LIGHTDND, LPGENW("Occupied") }, { PF2_HEAVYDND, LPGENW("Do not disturb") }, { PF2_FREECHAT, LPGENW("Free for chat") },
+ { PF2_INVISIBLE, LPGENW("Invisible") }, { PF2_OUTTOLUNCH, LPGENW("Out to lunch") }, { PF2_ONTHEPHONE, LPGENW("On the phone") }
};
static const struct CheckBoxValues_t offlineValues[] = {
- { MODEF_OFFLINE, LPGENT("Offline") }, { PF2_ONLINE, LPGENT("Online") }, { PF2_SHORTAWAY, LPGENT("Away") }, { PF2_LONGAWAY, LPGENT("Not available") },
- { PF2_LIGHTDND, LPGENT("Occupied") }, { PF2_HEAVYDND, LPGENT("Do not disturb") }, { PF2_FREECHAT, LPGENT("Free for chat") }, { PF2_INVISIBLE, LPGENT("Invisible") },
- { PF2_OUTTOLUNCH, LPGENT("Out to lunch") }, { PF2_ONTHEPHONE, LPGENT("On the phone") }
+ { MODEF_OFFLINE, LPGENW("Offline") }, { PF2_ONLINE, LPGENW("Online") }, { PF2_SHORTAWAY, LPGENW("Away") }, { PF2_LONGAWAY, LPGENW("Not available") },
+ { PF2_LIGHTDND, LPGENW("Occupied") }, { PF2_HEAVYDND, LPGENW("Do not disturb") }, { PF2_FREECHAT, LPGENW("Free for chat") }, { PF2_INVISIBLE, LPGENW("Invisible") },
+ { PF2_OUTTOLUNCH, LPGENW("Out to lunch") }, { PF2_ONTHEPHONE, LPGENW("On the phone") }
};
static UINT sortCtrlIDs[] = { IDC_SORTPRIMARY, IDC_SORTTHEN, IDC_SORTFINALLY, 0 };
@@ -711,7 +711,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
{
DBVARIANT dbv;
if (!db_get_ts(NULL, "CLC", "BkBitmap", &dbv)) {
- TCHAR szPath[MAX_PATH];
+ wchar_t szPath[MAX_PATH];
if (PathToAbsoluteT(dbv.ptszVal, szPath))
SetDlgItemText(hwndDlg, IDC_FILENAME, szPath);
@@ -743,7 +743,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_COMMAND:
if (LOWORD(wParam) == IDC_BROWSE) {
- TCHAR str[MAX_PATH], filter[512];
+ wchar_t str[MAX_PATH], filter[512];
GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str));
Bitmap_GetFilter(filter, _countof(filter));
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index dd985a65fe..76d2aa23ed 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -36,7 +36,7 @@ extern char *im_clients[];
extern HICON im_clienthIcons[];
extern HICON overlayicons[];
-extern TCHAR *statusNames[];
+extern wchar_t *statusNames[];
extern LONG g_cxsmIcon, g_cysmIcon;
@@ -200,7 +200,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
rc->left += 26;
int iCount = GetMenuItemCount(cfg::dat.hMenuNotify);
if (cfg::dat.hUpdateContact != 0) {
- TCHAR *szName = pcli->pfnGetContactDisplayName(cfg::dat.hUpdateContact, 0);
+ wchar_t *szName = pcli->pfnGetContactDisplayName(cfg::dat.hUpdateContact, 0);
int iIcon = pcli->pfnGetContactIcon(cfg::dat.hUpdateContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -215,7 +215,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
GetMenuItemInfo(cfg::dat.hMenuNotify, iCount - 1, TRUE, &mii);
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
- TCHAR *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
+ wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
int iIcon = pcli->pfnGetContactIcon(nmi->hContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
@@ -499,7 +499,7 @@ set_bg_l:
else
ChangeToFont(hdcMem, dat, FONTID_CONTACTS, &fontHeight);
- TCHAR *szCounts = NULL;
+ wchar_t *szCounts = NULL;
if (type == CLCIT_GROUP) {
GetTextExtentPoint32(hdcMem, contact->szText, (int)mir_tstrlen(contact->szText), &textSize);
int width = textSize.cx;
@@ -1061,7 +1061,7 @@ bgskipped:
}
}
else {
- TCHAR *szText = contact->szText;
+ wchar_t *szText = contact->szText;
rcContent.top = y + ((rowHeight - fontHeight) >> 1);
@@ -1103,7 +1103,7 @@ bgskipped:
RECT rc2 = rcContent;
int fHeight = 0;
- TCHAR szResult[80];
+ wchar_t szResult[80];
if (TimeZone_PrintDateTime(cEntry->hTimeZone, L"t", szResult, _countof(szResult), 0))
goto nodisplay;
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp
index 626d421ae6..576642bf86 100644
--- a/plugins/Clist_nicer/src/clcutils.cpp
+++ b/plugins/Clist_nicer/src/clcutils.cpp
@@ -35,7 +35,7 @@ extern int /*g_isConnecting,*/ during_sizing;
extern void ( *saveRecalcScrollBar )(HWND hwnd, struct ClcData *dat);
-static int MY_pathIsAbsolute(const TCHAR *path)
+static int MY_pathIsAbsolute(const wchar_t *path)
{
if (!path || !(mir_tstrlen(path) > 2))
return 0;
@@ -46,7 +46,7 @@ static int MY_pathIsAbsolute(const TCHAR *path)
return 0;
}
-size_t MY_pathToRelative(const TCHAR *pSrc, TCHAR *pOut)
+size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut)
{
size_t dwSrcLen, dwProfilePathLen;
@@ -58,25 +58,25 @@ size_t MY_pathToRelative(const TCHAR *pSrc, TCHAR *pOut)
if (!MY_pathIsAbsolute(pSrc))
goto path_not_abs;
- TCHAR szTmp[MAX_PATH];
- memcpy(szTmp, pSrc, (dwSrcLen * sizeof(TCHAR)));
+ wchar_t szTmp[MAX_PATH];
+ memcpy(szTmp, pSrc, (dwSrcLen * sizeof(wchar_t)));
szTmp[dwSrcLen] = 0;
- _tcslwr(szTmp);
- if (_tcsstr(szTmp, cfg::dat.tszProfilePath)) {
+ wcslwr(szTmp);
+ if (wcsstr(szTmp, cfg::dat.tszProfilePath)) {
dwProfilePathLen = mir_tstrlen(cfg::dat.tszProfilePath);
- memcpy(pOut, (pSrc + (dwProfilePathLen - 1)), ((dwSrcLen - (dwProfilePathLen - 1)) * sizeof(TCHAR)));
+ memcpy(pOut, (pSrc + (dwProfilePathLen - 1)), ((dwSrcLen - (dwProfilePathLen - 1)) * sizeof(wchar_t)));
pOut[0] = '.';
pOut[dwSrcLen] = 0;
return (dwSrcLen - (dwProfilePathLen - 1));
}
path_not_abs:
- memcpy(pOut, pSrc, (dwSrcLen * sizeof(TCHAR)));
+ memcpy(pOut, pSrc, (dwSrcLen * sizeof(wchar_t)));
pOut[dwSrcLen] = 0;
return dwSrcLen;
}
-size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut)
+size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut)
{
size_t dwSrcLen;
@@ -87,7 +87,7 @@ size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut)
return 0;
if (MY_pathIsAbsolute(pSrc) && pSrc[0] != '.') {
- memcpy(pOut, pSrc, (dwSrcLen * sizeof(TCHAR)));
+ memcpy(pOut, pSrc, (dwSrcLen * sizeof(wchar_t)));
pOut[dwSrcLen] = 0;
return dwSrcLen;
}
@@ -167,7 +167,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac
GetTextExtentPoint32(hdc, hitcontact->szText, (int)mir_tstrlen(hitcontact->szText), &textSize);
width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
- TCHAR *szCounts;
+ wchar_t *szCounts;
szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
GetTextExtentPoint32(hdc, L" ", 1, &textSize);
@@ -308,7 +308,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c
GetTextExtentPoint32(hdc, hitcontact->szText, (int)mir_tstrlen(hitcontact->szText), &textSize);
width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
- TCHAR *szCounts;
+ wchar_t *szCounts;
szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
GetTextExtentPoint32(hdc, L" ", 1, &textSize);
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 34ec1b17dd..6a504da5b3 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -254,14 +254,14 @@ CListEvent* AddEvent(CLISTEVENT *cle)
}
char *szProto = GetContactProto(p->hContact);
- TCHAR *szName = pcli->pfnGetContactDisplayName(p->hContact, 0);
+ wchar_t *szName = pcli->pfnGetContactDisplayName(p->hContact, 0);
if (szProto && szName) {
NotifyMenuItemExData *nmi = (NotifyMenuItemExData*)malloc(sizeof(NotifyMenuItemExData));
if (nmi) {
- TCHAR szBuffer[128];
- TCHAR* szStatus = pcli->pfnGetStatusModeDescription(db_get_w(p->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
+ wchar_t szBuffer[128];
+ wchar_t* szStatus = pcli->pfnGetStatusModeDescription(db_get_w(p->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- TCHAR szwProto[64];
+ wchar_t szwProto[64];
MultiByteToWideChar(CP_ACP, 0, szProto, -1, szwProto, 64);
szwProto[63] = 0;
mir_sntprintf(szBuffer, L"%s: %s (%s)", szwProto, szName, szStatus);
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index 7e74dbd6b2..94cfbf6e52 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -98,7 +98,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
return FALSE;
}
else {
- TCHAR szTitle[512];
+ wchar_t szTitle[512];
DWORD dwFlags = db_get_dw(hContact, "CList", "CLN_Flags", 0);
BYTE bSecondLine = db_get_b(hContact, "CList", "CLN_2ndline", -1);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 8041d1dda3..954d08a5bd 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -60,7 +60,7 @@ static BYTE old_cliststate, show_on_first_autosize = FALSE;
RECT cluiPos;
-TCHAR *statusNames[12];
+wchar_t *statusNames[12];
extern LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
extern HANDLE hNotifyFrame;
@@ -160,7 +160,7 @@ static int FS_FontsChanged(WPARAM, LPARAM)
// last frame of all.
static HWND PreCreateCLC(HWND parent)
{
- pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), L"",
+ pcli->hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
WS_CHILD | CLS_CONTACTLIST
| (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
| (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0)
@@ -256,7 +256,7 @@ static void InitIcoLib()
char szBuffer[128];
mir_snprintf(szBuffer, "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), 0), szBuffer, i };
- Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Overlay icons"), &icon, 1);
+ Icon_RegisterT(g_hInst, LPGENW("Contact list") L"/" LPGENW("Overlay icons"), &icon, 1);
}
PROTOACCOUNT **accs = NULL;
@@ -266,10 +266,10 @@ static void InitIcoLib()
if (!Proto_IsAccountEnabled(accs[k]) || CallProtoService(accs[k]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
- TCHAR szDescr[128];
+ wchar_t szDescr[128];
mir_sntprintf(szDescr, TranslateT("%s connecting"), accs[k]->tszAccountName);
IconItemT icon = { szDescr, "conn", IDI_PROTOCONNECTING };
- Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName);
+ Icon_RegisterT(g_hInst, LPGENW("Contact list") L"/" LPGENW("Connecting icons"), &icon, 1, accs[k]->szModuleName);
}
}
@@ -1415,7 +1415,7 @@ skipbg:
if (!contactOK)
MessageBox(0, TranslateT("The requested action requires a valid contact selection. Please select a contact from the contact list and repeat."), TranslateT("Parameter mismatch"), MB_OK);
if (serviceFailure) {
- TCHAR szError[512];
+ wchar_t szError[512];
mir_sntprintf(szError, TranslateT("The service %S specified by the %S button definition was not found. You may need to install additional plugins."), item->szService, item->szName);
MessageBox(NULL, szError, TranslateT("Service failure"), MB_OK);
}
@@ -1706,7 +1706,7 @@ buttons_done:
}
if (showOpts & 2) {
- TCHAR szName[64];
+ wchar_t szName[64];
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (pa) {
mir_tstrncpy(szName, pa->tszAccountName, _countof(szName));
@@ -1722,7 +1722,7 @@ buttons_done:
x += textSize.cx;
}
if (showOpts & 4) {
- TCHAR *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
+ wchar_t *szStatus = pcli->pfnGetStatusModeDescription(status, 0);
GetTextExtentPoint32(dis->hDC, szStatus, (int)mir_tstrlen(szStatus), &textSize);
TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szStatus, (int)mir_tstrlen(szStatus));
}
@@ -1825,7 +1825,7 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hwndDlg, IDC_VERSION, WM_SETFONT, (WPARAM)hFont, 0);
}
{
- TCHAR str[64];
+ wchar_t str[64];
DWORD v = pluginInfo.version;
mir_sntprintf(str, L"%s %d.%d.%d.%d", TranslateT("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v)));
SetDlgItemText(hwndDlg, IDC_VERSION, str);
@@ -1962,29 +1962,29 @@ void OnCreateClc()
struct
{
- const TCHAR *tszName;
+ const wchar_t *tszName;
int iMask;
}
static clistFontDescr[] =
{
- { LPGENT("Standard contacts"), FIDF_CLASSGENERAL },
- { LPGENT("Online contacts to whom you have a different visibility"), FIDF_CLASSGENERAL },
- { LPGENT("Offline contacts"), FIDF_CLASSGENERAL },
- { LPGENT("Contacts which are 'not on list'"), FIDF_CLASSGENERAL },
- { LPGENT("Groups"), FIDF_CLASSHEADER },
- { LPGENT("Group member counts"), FIDF_CLASSHEADER },
- { LPGENT("Dividers"), FIDF_CLASSSMALL },
- { LPGENT("Offline contacts to whom you have a different visibility"), FIDF_CLASSGENERAL },
- { LPGENT("Status mode"), FIDF_CLASSGENERAL },
- { LPGENT("Frame titles"), FIDF_CLASSGENERAL },
- { LPGENT("Event area"), FIDF_CLASSGENERAL },
- { LPGENT("Contact list local time"), FIDF_CLASSGENERAL }
+ { LPGENW("Standard contacts"), FIDF_CLASSGENERAL },
+ { LPGENW("Online contacts to whom you have a different visibility"), FIDF_CLASSGENERAL },
+ { LPGENW("Offline contacts"), FIDF_CLASSGENERAL },
+ { LPGENW("Contacts which are 'not on list'"), FIDF_CLASSGENERAL },
+ { LPGENW("Groups"), FIDF_CLASSHEADER },
+ { LPGENW("Group member counts"), FIDF_CLASSHEADER },
+ { LPGENW("Dividers"), FIDF_CLASSSMALL },
+ { LPGENW("Offline contacts to whom you have a different visibility"), FIDF_CLASSGENERAL },
+ { LPGENW("Status mode"), FIDF_CLASSGENERAL },
+ { LPGENW("Frame titles"), FIDF_CLASSGENERAL },
+ { LPGENW("Event area"), FIDF_CLASSGENERAL },
+ { LPGENW("Contact list local time"), FIDF_CLASSGENERAL }
};
void FS_RegisterFonts()
{
FontIDT fid = { sizeof(fid) };
- _tcsncpy(fid.group, LPGENT("Contact list"), _countof(fid.group));
+ wcsncpy(fid.group, LPGENW("Contact list"), _countof(fid.group));
strncpy(fid.dbSettingsGroup, "CLC", 5);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE;
@@ -1994,7 +1994,7 @@ void FS_RegisterFonts()
pcli->pfnGetFontSetting(i, &lf, &fid.deffontsettings.colour);
lf.lfHeight = -MulDiv(lf.lfHeight, GetDeviceCaps(hdc, LOGPIXELSY), 72);
- _tcsncpy_s(fid.deffontsettings.szFace, lf.lfFaceName, _TRUNCATE);
+ wcsncpy_s(fid.deffontsettings.szFace, lf.lfFaceName, _TRUNCATE);
fid.deffontsettings.charset = lf.lfCharSet;
fid.deffontsettings.size = (char)lf.lfHeight;
fid.deffontsettings.style = (lf.lfWeight >= FW_BOLD ? DBFONTF_BOLD : 0) | (lf.lfItalic ? DBFONTF_ITALIC : 0);
@@ -2002,7 +2002,7 @@ void FS_RegisterFonts()
fid.flags &= ~FIDF_CLASSMASK;
fid.flags |= clistFontDescr[i].iMask;
- _tcsncpy(fid.name, clistFontDescr[i].tszName, _countof(fid.name));
+ wcsncpy(fid.name, clistFontDescr[i].tszName, _countof(fid.name));
char idstr[10];
mir_snprintf(idstr, "Font%d", i);
@@ -2019,32 +2019,32 @@ void FS_RegisterFonts()
strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup));
strncpy(colourid.setting, "BkColour", sizeof(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Background"), _countof(colourid.name));
- _tcsncpy(colourid.group, LPGENT("Contact list"), _countof(colourid.group));
+ wcsncpy(colourid.name, LPGENW("Background"), _countof(colourid.name));
+ wcsncpy(colourid.group, LPGENW("Contact list"), _countof(colourid.group));
colourid.defcolour = CLCDEFAULT_BKCOLOUR;
ColourRegisterT(&colourid);
strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Selected text"), _countof(colourid.name));
+ wcsncpy(colourid.name, LPGENW("Selected text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR;
ColourRegisterT(&colourid);
strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Hottrack text"), _countof(colourid.name));
+ wcsncpy(colourid.name, LPGENW("Hottrack text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR;
ColourRegisterT(&colourid);
strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Quicksearch text"), _countof(colourid.name));
+ wcsncpy(colourid.name, LPGENW("Quicksearch text"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR;
ColourRegisterT(&colourid);
strncpy(colourid.dbSettingsGroup, "CLUI", sizeof(colourid.dbSettingsGroup));
strncpy(colourid.setting, "clr_frameborder", sizeof(colourid.setting));
- _tcsncpy(colourid.name, LPGENT("Embedded frames border"), _countof(colourid.name));
+ wcsncpy(colourid.name, LPGENW("Embedded frames border"), _countof(colourid.name));
colourid.order = 1;
colourid.defcolour = RGB(40, 40, 40);
ColourRegisterT(&colourid);
diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index 2a5fe5eca6..53e2692258 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -1348,7 +1348,7 @@ static int CLUIFramesLoadMainMenu()
FRAMEWND &F = Frames[i];
mi.hIcolibItem = F.TitleBar.hicon;
mi.position = separator;
- mi.name.t = F.TitleBar.tbname ? F.TitleBar.tbname : F.name;
+ mi.name.w = F.TitleBar.tbname ? F.TitleBar.tbname : F.name;
mi.pszService = 0;
g_frameMenus.insert(F.MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi));
CLUIFramesCreateMenuForFrame(F.id, F.MenuHandles.MainMenuItem, separator, true);
@@ -1597,7 +1597,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM)
Frames[nFramescount].dwFlags = clfrm->Flags;
if (clfrm->name == NULL || ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->wname) : mir_strlen(clfrm->name)) == 0) {
- TCHAR ptszClassName[256];
+ wchar_t ptszClassName[256];
GetClassName(Frames[nFramescount].hWnd, ptszClassName, _countof(ptszClassName));
Frames[nFramescount].name = mir_tstrdup(ptszClassName);
}
@@ -2892,7 +2892,7 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam)
return 0;
}
-TCHAR g_ptszEventName[100];
+wchar_t g_ptszEventName[100];
static int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
{
diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp
index dec092b6a9..fe8f5e380f 100644
--- a/plugins/Clist_nicer/src/cluiopts.cpp
+++ b/plugins/Clist_nicer/src/cluiopts.cpp
@@ -233,7 +233,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
else
SetMenu(pcli->hwndContactList, pcli->hMenuMain);
- TCHAR title[256];
+ wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
db_set_ts(NULL, "CList", "TitleText", title);
SetWindowText(pcli->hwndContactList, title);
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp
index 9a80fdd757..826fcdfcab 100644
--- a/plugins/Clist_nicer/src/cluiservices.cpp
+++ b/plugins/Clist_nicer/src/cluiservices.cpp
@@ -111,7 +111,7 @@ void CluiProtocolStatusChanged(int, const char*)
else {
SIZE textSize;
BYTE showOpts = db_get_b(NULL, "CLUI", "SBarShow", 1);
- TCHAR szName[32];
+ wchar_t szName[32];
HDC hdc = GetDC(NULL);
HFONT hofont = reinterpret_cast<HFONT>(SelectObject(hdc, (HFONT)SendMessage(pcli->hwndStatus, WM_GETFONT, 0, 0)));
@@ -139,7 +139,7 @@ void CluiProtocolStatusChanged(int, const char*)
x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
if (showOpts & 4) {
- TCHAR* modeDescr = pcli->pfnGetStatusModeDescription(CallProtoService(accs[i]->szModuleName, PS_GETSTATUS, 0, 0), 0);
+ wchar_t* modeDescr = pcli->pfnGetStatusModeDescription(CallProtoService(accs[i]->szModuleName, PS_GETSTATUS, 0, 0), 0);
GetTextExtentPoint32(hdc, modeDescr, (int)mir_tstrlen(modeDescr), &textSize);
x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
@@ -219,7 +219,7 @@ void CluiProtocolStatusChanged(int, const char*)
* and uses timer based sort and redraw handling. This can improve performance
* when connecting multiple protocols significantly.
*/
- TCHAR *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
+ wchar_t *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
/*
* set the global status icon and display the global (most online) status mode on the
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp
index 4195d5fe63..663e4dadef 100644
--- a/plugins/Clist_nicer/src/config.cpp
+++ b/plugins/Clist_nicer/src/config.cpp
@@ -42,7 +42,7 @@ EXCEPTION_RECORD API::exRecord = { 0 };
CONTEXT API::exCtx = { 0 };
LRESULT API::exLastResult = 0;
char API::exSzFile[MAX_PATH] = "";
-TCHAR API::exReason[256] = L"";
+wchar_t API::exReason[256] = L"";
int API::exLine = 0;
bool API::exAllowContinue = false;
HMODULE API::hDwm = 0;
@@ -193,7 +193,7 @@ void API::Ex_Handler()
ExitProcess(1);
}
-int API::Ex_ShowDialog(EXCEPTION_POINTERS *ep, const char *szFile, int line, TCHAR* szReason, bool fAllowContinue)
+int API::Ex_ShowDialog(EXCEPTION_POINTERS *ep, const char *szFile, int line, wchar_t* szReason, bool fAllowContinue)
{
char szDrive[MAX_PATH], szDir[MAX_PATH], szName[MAX_PATH], szExt[MAX_PATH];
@@ -230,9 +230,9 @@ void TSAPI Utils::showDlgControl(const HWND hwnd, UINT id, int showCmd)
*
* return 0 and throw an exception if something goes wrong.
*/
-HMODULE Utils::loadSystemLibrary(const TCHAR* szFilename, bool useGetHandle)
+HMODULE Utils::loadSystemLibrary(const wchar_t* szFilename, bool useGetHandle)
{
- TCHAR sysPathName[MAX_PATH + 2];
+ wchar_t sysPathName[MAX_PATH + 2];
HMODULE _h = 0;
try {
@@ -258,16 +258,16 @@ HMODULE Utils::loadSystemLibrary(const TCHAR* szFilename, bool useGetHandle)
return (_h);
}
-CRTException::CRTException(const char *szMsg, const TCHAR *szParam) : std::runtime_error(std::string(szMsg))
+CRTException::CRTException(const char *szMsg, const wchar_t *szParam) : std::runtime_error(std::string(szMsg))
{
mir_sntprintf(m_szParam, MAX_PATH, szParam);
}
void CRTException::display() const
{
- TCHAR *tszMsg = mir_a2t(what());
+ wchar_t *tszMsg = mir_a2t(what());
- TCHAR tszBoxMsg[500];
+ wchar_t tszBoxMsg[500];
mir_sntprintf(tszBoxMsg, L"%s\n\n(%s)", tszMsg, m_szParam);
::MessageBox(0, tszBoxMsg, L"Clist_nicer runtime error", MB_OK | MB_ICONERROR);
mir_free(tszMsg);
diff --git a/plugins/Clist_nicer/src/config.h b/plugins/Clist_nicer/src/config.h
index 327353432e..581d01b0be 100644
--- a/plugins/Clist_nicer/src/config.h
+++ b/plugins/Clist_nicer/src/config.h
@@ -38,13 +38,13 @@ typedef HRESULT (WINAPI *pfnDwmIsCompositionEnabled_t)(BOOL *);
class CRTException : public std::runtime_error
{
public:
- CRTException(const char *szMsg, const TCHAR *szParam);
+ CRTException(const char *szMsg, const wchar_t *szParam);
~CRTException() {}
void display() const;
private:
- TCHAR m_szParam[MAX_PATH];
+ wchar_t m_szParam[MAX_PATH];
};
class cfg
@@ -80,7 +80,7 @@ public:
static void Ex_CopyEditToClipboard (HWND hWnd);
static INT_PTR CALLBACK Ex_DlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
static void Ex_Handler ();
- static int Ex_ShowDialog (EXCEPTION_POINTERS *ep, const char *szFile, int line, TCHAR* szReason, bool fAllowContinue);
+ static int Ex_ShowDialog (EXCEPTION_POINTERS *ep, const char *szFile, int line, wchar_t* szReason, bool fAllowContinue);
static pfnDwmExtendFrameIntoClientArea_t pfnDwmExtendFrameIntoClientArea;
static pfnDwmIsCompositionEnabled_t pfnDwmIsCompositionEnabled;
@@ -92,7 +92,7 @@ public:
static CONTEXT exCtx;
static LRESULT exLastResult;
static char exSzFile[MAX_PATH];
- static TCHAR exReason[256];
+ static wchar_t exReason[256];
static int exLine;
static bool exAllowContinue;
@@ -105,7 +105,7 @@ class Utils
public:
static void TSAPI enableDlgControl(const HWND hwnd, UINT id, BOOL fEnable);
static void TSAPI showDlgControl(const HWND hwnd, UINT id, int showCmd);
- static HMODULE loadSystemLibrary(const TCHAR* szFilename, bool useGetHandle = false);
+ static HMODULE loadSystemLibrary(const wchar_t* szFilename, bool useGetHandle = false);
};
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp
index cd8a3d8f93..04bf2fc34d 100644
--- a/plugins/Clist_nicer/src/contact.cpp
+++ b/plugins/Clist_nicer/src/contact.cpp
@@ -101,7 +101,7 @@ static void MF_CalcFrequency(MCONTACT hContact, DWORD dwCutoffDays, int doSleep)
db_set_dw(hContact, "CList", "mf_count", eventCount);
}
-extern TCHAR g_ptszEventName[];
+extern wchar_t g_ptszEventName[];
void MF_UpdateThread(LPVOID)
{
@@ -158,7 +158,7 @@ int __forceinline GetProtoIndex(char * szName)
int __forceinline INTSORT_CompareContacts(const ClcContact* c1, const ClcContact* c2, UINT bywhat)
{
- TCHAR *namea, *nameb;
+ wchar_t *namea, *nameb;
int statusa, statusb;
char *szProto1, *szProto2;
int rc;
@@ -201,8 +201,8 @@ int __forceinline INTSORT_CompareContacts(const ClcContact* c1, const ClcContact
switch (bywhat) {
case SORTBY_NAME:
- namea = (TCHAR *)c1->szText;
- nameb = (TCHAR *)c2->szText;
+ namea = (wchar_t *)c1->szText;
+ nameb = (wchar_t *)c2->szText;
return CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, namea, -1, nameb, -1) - 2;
case SORTBY_LASTMSG:
diff --git a/plugins/Clist_nicer/src/coolsblib.cpp b/plugins/Clist_nicer/src/coolsblib.cpp
index 3dc6705d9a..61da1b3567 100644
--- a/plugins/Clist_nicer/src/coolsblib.cpp
+++ b/plugins/Clist_nicer/src/coolsblib.cpp
@@ -31,7 +31,7 @@
#include "userdefs.h"
#include "coolsb_internal.h"
-static TCHAR szPropStr[] = L"CoolSBSubclassPtr";
+static wchar_t szPropStr[] = L"CoolSBSubclassPtr";
LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 325330056c..5ed6ee4347 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -1169,10 +1169,10 @@ void IMG_LoadItems()
if (db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv))
return;
- TCHAR tszFileName[MAX_PATH];
+ wchar_t tszFileName[MAX_PATH];
MY_pathToAbsolute(dbv.ptszVal, tszFileName);
- // TODO: rewrite the skin loading in TCHAR manner
+ // TODO: rewrite the skin loading in wchar_t manner
char szFileName[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, tszFileName, MAX_PATH, szFileName, MAX_PATH, 0, 0);
@@ -1221,7 +1221,7 @@ void IMG_LoadItems()
CoolSB_SetupScrollBar();
}
-void LoadPerContactSkins(TCHAR *tszFileName)
+void LoadPerContactSkins(wchar_t *tszFileName)
{
char szItem[100];
ptrA szSections(LPSTR(calloc(3002, 1)));
@@ -1441,7 +1441,7 @@ void extbk_import(char *file, HWND hwndDlg)
static void ApplyCLUISkin()
{
DBVARIANT dbv = { 0 };
- TCHAR tszFinalName[MAX_PATH];
+ wchar_t tszFinalName[MAX_PATH];
char szFinalName[MAX_PATH];
if (!db_get_ts(NULL, "CLC", "AdvancedSkin", &dbv)) {
MY_pathToAbsolute(dbv.ptszVal, tszFinalName);
@@ -1524,7 +1524,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case IDC_SELECTSKINFILE:
{
OPENFILENAME ofn = { 0 };
- TCHAR str[MAX_PATH] = L"*.clist", final_path[MAX_PATH];
+ wchar_t str[MAX_PATH] = L"*.clist", final_path[MAX_PATH];
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
@@ -1562,7 +1562,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
case IDC_RELOAD:
- TCHAR tszFilename[MAX_PATH], tszFinalPath[MAX_PATH];
+ wchar_t tszFilename[MAX_PATH], tszFinalPath[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_SKINFILE, tszFilename, _countof(tszFilename));
tszFilename[MAX_PATH - 1] = 0;
MY_pathToAbsolute(tszFilename, tszFinalPath);
diff --git a/plugins/Clist_nicer/src/extBackg.h b/plugins/Clist_nicer/src/extBackg.h
index 607ac3dc17..474107b05a 100644
--- a/plugins/Clist_nicer/src/extBackg.h
+++ b/plugins/Clist_nicer/src/extBackg.h
@@ -71,14 +71,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
BOOL CheckItem(int item, HWND hwndDlg);
BOOL isValidItem(void);
-void extbk_export(const TCHAR *file);
-void extbk_import(const TCHAR *file, HWND hwndDlg);
+void extbk_export(const wchar_t *file);
+void extbk_import(const wchar_t *file, HWND hwndDlg);
void LoadExtBkSettingsFromDB();
void IMG_LoadItems();
void __fastcall IMG_RenderImageItem(HDC hdc, ImageItem *item, RECT *rc);
void IMG_InitDecoder();
-void LoadPerContactSkins(const TCHAR *file);
+void LoadPerContactSkins(const wchar_t *file);
static void SaveCompleteStructToDB();
StatusItems_t *GetProtocolStatusItem(const char *szProto);
diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp
index ca819a8c44..fe5c5177f9 100644
--- a/plugins/Clist_nicer/src/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/groupmenu.cpp
@@ -80,12 +80,12 @@ static int OnBuildGroupMenu(WPARAM, LPARAM)
}
IconItemT iconItem[] = {
- { LPGENT("Contact list"), "clist", IDI_CLIST }
+ { LPGENW("Contact list"), "clist", IDI_CLIST }
};
void InitIconLibMenuIcons(void)
{
- Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
+ Icon_RegisterT(g_hInst, LPGENW("Contact list"), iconItem, _countof(iconItem));
}
void InitGroupMenus(void)
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 27b7742c62..07397d6c33 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -50,10 +50,10 @@ int ShowHide(WPARAM wParam, LPARAM lParam);
int ClcShutdown(WPARAM wParam, LPARAM lParam);
CListEvent* AddEvent(CLISTEVENT *cle);
-ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
+ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
-ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText);
+ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
int RemoveEvent(MCONTACT hContact, MEVENT hDbEvent);
INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
@@ -183,7 +183,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
cfg::dat.soundsOff = db_get_b(NULL, "Skin", "UseSound", 1) ? 0 : 1;
CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)cfg::dat.tszProfilePath);
- _tcslwr(cfg::dat.tszProfilePath);
+ wcslwr(cfg::dat.tszProfilePath);
// get the clist interface
pcli->hInst = g_hInst;
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp
index 8f127b3bd0..6484ccba6a 100644
--- a/plugins/Clist_nicer/src/statusbar.cpp
+++ b/plugins/Clist_nicer/src/statusbar.cpp
@@ -159,7 +159,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
WORD wStatus = (WORD)CallProtoService(PD->RealName, PS_GETSTATUS, 0, 0);
BYTE isLocked = db_get_b(NULL, PD->RealName, "LockMainStatus", 0);
- TCHAR szTipText[256];
+ wchar_t szTipText[256];
mir_sntprintf(szTipText, L"<b>%s</b>: %s%s",
PD->RealName, pcli->pfnGetStatusModeDescription(wStatus, 0), isLocked ? L" (LOCKED)" : L"");
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index c684d6dc0c..772f2e0fa0 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -199,7 +199,7 @@ static int FillDialog(HWND hwnd)
item.pszText = TranslateT("Ungrouped contacts");
SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
- TCHAR *grpName;
+ wchar_t *grpName;
for (i = 1; (grpName = Clist_GroupGetName(i, NULL)) != NULL; i++) {
item.pszText = grpName;
SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
@@ -296,7 +296,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int
}
}
-void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options,
unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
char szSetting[512];
@@ -346,7 +346,7 @@ void SaveState()
{
LVITEM item = { 0 };
- TCHAR szTemp[256];
+ wchar_t szTemp[256];
HWND hwndList = GetDlgItem(sttClvmHwnd, IDC_GROUPS);
@@ -433,7 +433,7 @@ void UpdateFilters()
SendDlgItemMessageA(sttClvmHwnd, IDC_VIEWMODES, LB_GETTEXT, sttClvm_curItem, (LPARAM)szBuf);
mir_strncpy(sttModeName, szBuf, sizeof(sttModeName));
{
- TCHAR szTemp[100];
+ wchar_t szTemp[100];
mir_sntprintf(szTemp, TranslateT("Current view mode: %S"), sttModeName);
SetDlgItemText(sttClvmHwnd, IDC_CURVIEWMODE2, szTemp);
}
@@ -480,8 +480,8 @@ void UpdateFilters()
{
LVITEM item = { 0 };
- TCHAR szTemp[256];
- TCHAR szMask[256];
+ wchar_t szTemp[256];
+ wchar_t szMask[256];
HWND hwndList = GetDlgItem(sttClvmHwnd, IDC_GROUPS);
item.mask = LVIF_TEXT;
@@ -494,7 +494,7 @@ void UpdateFilters()
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
mir_sntprintf(szMask, L"%s|", szTemp);
- if (dbv_gf.ptszVal && _tcsstr(dbv_gf.ptszVal, szMask)) {
+ if (dbv_gf.ptszVal && wcsstr(dbv_gf.ptszVal, szMask)) {
ListView_SetCheckState(hwndList, i, TRUE);
}
else {
@@ -587,7 +587,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CLCINFOITEM cii = { 0 };
cii.cbSize = sizeof(cii);
cii.hParentGroup = 0;
- cii.pszText = LPGENT("*** All contacts ***");
+ cii.pszText = LPGENW("*** All contacts ***");
hInfoItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
}
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
@@ -1044,7 +1044,7 @@ void ApplyViewMode(const char *name)
mir_snprintf(szSetting, "%c%s_GF", 246, name);
ptrT tszGroups(db_get_tsa(NULL, CLVM_MODULE, szSetting));
if (mir_tstrlen(tszGroups) >= 2) {
- _tcsncpy_s(cfg::dat.groupFilter, tszGroups, _TRUNCATE);
+ wcsncpy_s(cfg::dat.groupFilter, tszGroups, _TRUNCATE);
cfg::dat.bFilterEffective |= CLVM_FILTER_GROUPS;
}