diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Clist_modern/src | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (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_modern/src')
37 files changed, 371 insertions, 371 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 94b4ad3170..38d402c835 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -1504,7 +1504,7 @@ static int CLUIFramesLoadMainMenu() mi.hIcolibItem = F.TitleBar.hicon;
mi.flags = CMIF_SYSTEM | CMIF_TCHAR;
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);
@@ -1565,7 +1565,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM) g_pfwFrames[g_nFramesCount].dwFlags = clfrm->Flags;
if (clfrm->name == NULL || ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->wname) : mir_strlen(clfrm->name)) == 0) {
- g_pfwFrames[g_nFramesCount].name = (LPTSTR)mir_alloc(255 * sizeof(TCHAR));
+ g_pfwFrames[g_nFramesCount].name = (LPTSTR)mir_alloc(255 * sizeof(wchar_t));
GetClassName(g_pfwFrames[g_nFramesCount].hWnd, g_pfwFrames[g_nFramesCount].name, 255);
}
else g_pfwFrames[g_nFramesCount].name = (clfrm->Flags & F_UNICODE) ? mir_u2t(clfrm->wname) : mir_a2t(clfrm->name);
@@ -2730,7 +2730,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam int pos;
//tbinfo
{
- TCHAR TBcapt[255];
+ wchar_t TBcapt[255];
pos = id2pos(Frameid);
if (pos != -1) {
int oldflags;
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 60358a3851..9eb5a578f8 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -28,8 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IMMEDIATE_DRAW (!s_bSeparateWindow)
-void GDIPlus_ExtractAnimatedGIF(TCHAR *szName, int width, int height, HBITMAP &pBmp, int* &pframesDelay, int &pframesCount, SIZE &sizeAvatar);
-BOOL GDIPlus_IsAnimatedGif(TCHAR *szName);
+void GDIPlus_ExtractAnimatedGIF(wchar_t *szName, int width, int height, HBITMAP &pBmp, int* &pframesDelay, int &pframesCount, SIZE &sizeAvatar);
+BOOL GDIPlus_IsAnimatedGif(wchar_t *szName);
/* Next is module */
#define ANIAVAWINDOWCLASS L"MirandaModernAniAvatar"
@@ -43,7 +43,7 @@ BOOL GDIPlus_IsAnimatedGif(TCHAR *szName); //messages
enum {
AAM_FIRST = WM_USER,
- AAM_SETAVATAR, //sync WPARAM: TCHAR * filename, LPARAM: SIZE * size, RESULT: actual size
+ AAM_SETAVATAR, //sync WPARAM: wchar_t * filename, LPARAM: SIZE * size, RESULT: actual size
AAM_SETPOSITION, //async LPARAM: pointer to set pos info - the handler will empty it, RESULT: 0
AAM_REDRAW, //async
AAM_STOP, //async stops animation, timer, hide window - prepeare for deleting
@@ -73,7 +73,7 @@ struct ANIAVA_OBJECT : public MZeroedObject struct ANIAVA_INFO
{
DWORD dwAvatarUniqId;
- TCHAR *tcsFilename;
+ wchar_t *tcsFilename;
int nRefCount;
int nStripTop;
int nFrameCount;
@@ -229,11 +229,11 @@ static void CALLBACK _AniAva_SyncCallerUserAPCProc(DWORD_PTR dwParam) static INT_PTR _AniAva_CreateAvatarWindowSync_Worker(WPARAM tszName, LPARAM)
{
HWND hwnd = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TRANSPARENT | WS_EX_NOPARENTNOTIFY, ANIAVAWINDOWCLASS,
- (TCHAR*)tszName, WS_POPUP, 0, 0, 1, 1, pcli->hwndContactList, NULL, pcli->hInst, NULL);
+ (wchar_t*)tszName, WS_POPUP, 0, 0, 1, 1, pcli->hwndContactList, NULL, pcli->hInst, NULL);
return (INT_PTR)hwnd;
}
-static HWND _AniAva_CreateAvatarWindowSync(TCHAR *szFileName)
+static HWND _AniAva_CreateAvatarWindowSync(wchar_t *szFileName)
{
if (s_AnimationThreadHandle == 0 || s_AnimationThreadID == 0)
return NULL;
@@ -340,7 +340,7 @@ static void _AniAva_RealRemoveAvatar(DWORD UniqueID) }
}
-static int _AniAva_LoadAvatarFromImage(TCHAR * szFileName, int width, int height, ANIAVATARIMAGEINFO *pRetAII)
+static int _AniAva_LoadAvatarFromImage(wchar_t * szFileName, int width, int height, ANIAVATARIMAGEINFO *pRetAII)
{
ANIAVA_INFO aai = { 0 };
aai.tcsFilename = szFileName;
@@ -774,7 +774,7 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR //=======================================================================================
// adds avatars to be displayed
-int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth)
+int AniAva_AddAvatar(MCONTACT hContact, wchar_t * szFilename, int width, int heigth)
{
aacheck 0;
if (!GDIPlus_IsAnimatedGif(szFilename))
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 326722ab11..95e2a7f196 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -36,7 +36,7 @@ typedef BOOL(*ExecuteOnAllContactsFuncPtr) (ClcContact *contact, BOOL subcontact ///////////////////////////////////////////////////////////////////////////////////////// // Module static declarations -static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size); +static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size); static BOOL ExecuteOnAllContacts(ClcData *dat, ExecuteOnAllContactsFuncPtr func, void *param); static BOOL ExecuteOnAllContactsOfGroup(ClcGroup *group, ExecuteOnAllContactsFuncPtr func, void *param); @@ -71,7 +71,7 @@ void Cache_GetText(ClcData *dat, ClcContact *contact) } } -void CSmileyString::AddListeningToIcon(ClcData *dat, TCHAR *szText) +void CSmileyString::AddListeningToIcon(ClcData *dat, wchar_t *szText) { iMaxSmileyHeight = 0; DestroySmileyList(); @@ -170,7 +170,7 @@ void CSmileyString::DestroySmileyList() ///////////////////////////////////////////////////////////////////////////////////////// // Parsing of text for smiley // -void CSmileyString::ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, TCHAR * szText, BOOL replace_smileys) +void CSmileyString::ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, wchar_t * szText, BOOL replace_smileys) { int last_pos = 0; iMaxSmileyHeight = 0; @@ -270,7 +270,7 @@ void CSmileyString::ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, TCHAR * s // Getting Status name // returns -1 for XStatus, 1 for Status // -int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority) +int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority) { BOOL noAwayMsg = FALSE; BOOL noXstatus = FALSE; @@ -293,7 +293,7 @@ int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus } // Get Status name - TCHAR *tmp = pcli->pfnGetStatusModeDescription(nStatus, 0); + wchar_t *tmp = pcli->pfnGetStatusModeDescription(nStatus, 0); if (tmp && *tmp) { mir_tstrncpy(text, tmp, text_size); return 1; @@ -317,9 +317,9 @@ int GetStatusName(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus ///////////////////////////////////////////////////////////////////////////////////////// // Get Listening to information // -void GetListeningTo(TCHAR *text, int text_size, ClcCacheEntry *pdnce) +void GetListeningTo(wchar_t *text, int text_size, ClcCacheEntry *pdnce) { - *text = _T('\0'); + *text = '\0'; if (pdnce->m_iStatus == ID_STATUS_OFFLINE || pdnce->m_iStatus == 0) return; @@ -333,7 +333,7 @@ void GetListeningTo(TCHAR *text, int text_size, ClcCacheEntry *pdnce) // Getting Status message(Away message) // returns -1 for XStatus, 1 for Status // -int GetStatusMessage(TCHAR *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority) +int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstatus_has_priority) { BOOL noAwayMsg = FALSE; WORD wStatus = pdnce->getStatus(); @@ -393,7 +393,7 @@ LBL_Status: // Try to get XStatusMsg ptrT tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); if (tszXStatusMsg != NULL && tszXStatusMsg[0] != 0) { - TCHAR *tmp = NEWTSTR_ALLOCA(text); + wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_sntprintf(text, text_size, L"%s: %s", tmp, tszXStatusMsg); CopySkipUnprintableChars(text, text, text_size - 1); } @@ -415,7 +415,7 @@ LBL_Status: // Try to get XStatusName ptrT tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); if (tszXStatusName != NULL && tszXStatusName[0] != 0) { - TCHAR *tmp = NEWTSTR_ALLOCA(text); + wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_sntprintf(text, text_size, L"%s: %s", tszXStatusName, tmp); CopySkipUnprintableChars(text, text, text_size - 1); } @@ -474,11 +474,11 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) return; ClcCacheEntry *pdnce = contact->pce; - TCHAR *name = pcli->pfnGetContactDisplayName(contact->hContact, 0); + wchar_t *name = pcli->pfnGetContactDisplayName(contact->hContact, 0); if (dat->first_line_append_nick && !dat->bForceInDialog) { DBVARIANT dbv = { 0 }; if (!db_get_ts(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) { - TCHAR nick[_countof(contact->szText)]; + wchar_t nick[_countof(contact->szText)]; mir_tstrncpy(nick, dbv.ptszVal, _countof(contact->szText)); db_free(&dbv); @@ -501,9 +501,9 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) void Cache_GetNthLineText(ClcData *dat, ClcCacheEntry *pdnce, int n) { - TCHAR Text[240 - EXTRA_ICON_COUNT]; Text[0] = 0; + wchar_t Text[240 - EXTRA_ICON_COUNT]; Text[0] = 0; ClcLineInfo &line = (n == 2) ? dat->secondLine : dat->thirdLine; - TCHAR* &szText = (n == 2) ? pdnce->szSecondLineText : pdnce->szThirdLineText; + wchar_t* &szText = (n == 2) ? pdnce->szSecondLineText : pdnce->szThirdLineText; // in most cases replaceStrT does nothing if (!line.show) { @@ -521,7 +521,7 @@ void Cache_GetNthLineText(ClcData *dat, ClcCacheEntry *pdnce, int n) replaceStrT(szText, Text); CSmileyString &ss = (n == 2) ? pdnce->ssSecondLine : pdnce->ssThirdLine; - if (type == TEXT_LISTENING_TO && szText[0] != _T('\0')) + if (type == TEXT_LISTENING_TO && szText[0] != '\0') ss.AddListeningToIcon(dat, szText); else ss.ReplaceSmileys(dat, pdnce, szText, line.draw_smileys); @@ -529,25 +529,25 @@ void Cache_GetNthLineText(ClcData *dat, ClcCacheEntry *pdnce, int n) ///////////////////////////////////////////////////////////////////////////////////////// -void RemoveTag(TCHAR *to, TCHAR *tag) +void RemoveTag(wchar_t *to, wchar_t *tag) { - TCHAR *st = to; + wchar_t *st = to; int len = (int)mir_tstrlen(tag); int lastsize = (int)mir_tstrlen(to) + 1; - while (st = _tcsstr(st, tag)) { + while (st = wcsstr(st, tag)) { lastsize -= len; - memmove((void*)st, (void*)(st + len), (lastsize)*sizeof(TCHAR)); + memmove((void*)st, (void*)(st + len), (lastsize)*sizeof(wchar_t)); } } ///////////////////////////////////////////////////////////////////////////////////////// // Copy string with removing Escape chars from text and BBcodes -static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size) +static int CopySkipUnprintableChars(wchar_t *to, wchar_t * buf, DWORD size) { DWORD i; BOOL keep = 0; - TCHAR * cp = to; + wchar_t * cp = to; if (!to) return 0; if (!buf) { to[0] = '\0'; diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index ebc88e2976..91d9be08c1 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -44,7 +44,7 @@ static int StartScrollPos = 0; static BOOL g_bSortTimerIsSet = FALSE;
static ClcContact *hitcontact = NULL;
HANDLE hSkinFolder;
-TCHAR SkinsFolder[MAX_PATH];
+wchar_t SkinsFolder[MAX_PATH];
int ReloadSkinFolder(WPARAM, LPARAM)
{
@@ -202,7 +202,7 @@ static int clcProceedDragToScroll(HWND hwnd, int Y) return 1;
}
-static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR *text, int prefixOk, BOOL fSearchUp)
+static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_t *text, int prefixOk, BOOL fSearchUp)
{
ClcGroup *group = &dat->list;
int testlen = (int)mir_tstrlen(text);
@@ -225,9 +225,9 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR found = true;
}
else if (dat->bFilterSearch) {
- TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(cc->szText));
- TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
- found = _tcsstr(lowered_szText, lowered_search) != NULL;
+ wchar_t *lowered_szText = CharLowerW(NEWWSTR_ALLOCA(cc->szText));
+ wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
+ found = wcsstr(lowered_szText, lowered_search) != NULL;
}
else found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, cc->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, cc->szText)));
@@ -1065,7 +1065,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (dat->dragStage == (DRAGSTAGE_NOTMOVED | DRAGSTAGEF_MAYBERENAME))
CLUI_SafeSetTimer(hwnd, TIMERID_RENAME, GetDoubleClickTime(), NULL);
else if ((dat->dragStage & DRAGSTAGEM_STAGE) == DRAGSTAGE_ACTIVE) {
- TCHAR Wording[500];
+ wchar_t Wording[500];
ClcContact *contDest, *contSour;
POINT pt = UNPACK_POINT(lParam);
int target = GetDropTargetInformation(hwnd, dat, pt);
@@ -1198,13 +1198,13 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, ClcGroup *group, *destgroup;
{
BOOL NeedRename = FALSE;
- TCHAR newName[128] = { 0 };
+ wchar_t newName[128] = { 0 };
pcli->pfnGetRowByIndex(dat, dat->iDragItem, &contact, &group);
int i = pcli->pfnGetRowByIndex(dat, dat->iInsertionMark, &destcontact, &destgroup);
if (i != -1 && group->groupId != destgroup->groupId) {
- TCHAR *groupName = mir_tstrdup(Clist_GroupGetName(contact->groupId, 0));
- TCHAR *shortGroup = NULL;
- TCHAR *sourceGrName = mir_tstrdup(Clist_GroupGetName(destgroup->groupId, 0));
+ wchar_t *groupName = mir_tstrdup(Clist_GroupGetName(contact->groupId, 0));
+ wchar_t *shortGroup = NULL;
+ wchar_t *sourceGrName = mir_tstrdup(Clist_GroupGetName(destgroup->groupId, 0));
if (groupName) {
int len = (int)mir_tstrlen(groupName);
do { len--; } while (len >= 0 && groupName[len] != '\\');
@@ -1562,11 +1562,11 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
// Get icons
- TCHAR szMyPath[MAX_PATH];
+ wchar_t szMyPath[MAX_PATH];
GetModuleFileName(g_hInst, szMyPath, _countof(szMyPath));
SKINICONDESC sid = { 0 };
- sid.defaultFile.t = szMyPath;
+ sid.defaultFile.w = szMyPath;
sid.flags = SIDF_PATH_TCHAR;
sid.section.a = LPGEN("Contact list");
@@ -1666,7 +1666,7 @@ int ClcDoProtoAck(ACKDATA *ack) if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0)
return 0;
- db_set_ws(ack->hContact, "CList", "StatusMsg", (const TCHAR *)ack->lParam);
+ db_set_ws(ack->hContact, "CList", "StatusMsg", (const wchar_t *)ack->lParam);
Clist_Broadcast(INTM_STATUSCHANGED, ack->hContact, 0);
}
else {
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index a895e46231..64fd85c7e2 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -220,7 +220,7 @@ struct ClcLineInfo int top_space;
BOOL draw_smileys;
int type;
- TCHAR text[TEXT_TEXT_MAX_LENGTH];
+ wchar_t text[TEXT_TEXT_MAX_LENGTH];
BOOL xstatus_has_priority;
BOOL show_status_if_no_away;
BOOL show_listening_if_no_away;
@@ -374,10 +374,10 @@ DWORD GetDefaultExStyle(void); void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF *eColour1, COLORREF *eColour2);
// clistsettings.c
-TCHAR* GetContactDisplayNameW(MCONTACT hContact, int mode);
+wchar_t* GetContactDisplayNameW(MCONTACT hContact, int mode);
// groups.c
-TCHAR* GetGroupNameTS(int idx, DWORD* pdwFlags);
+wchar_t* GetGroupNameTS(int idx, DWORD* pdwFlags);
int RenameGroupT(WPARAM groupID, LPARAM newName);
int GetContactCachedStatus(MCONTACT hContact);
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 03259dd5a0..e2a5cb896f 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -406,9 +406,9 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) if (dat != NULL && dat->bFilterSearch && pdnce && pdnce->tszName) {
// search filtering
- TCHAR *lowered_name = CharLowerW(NEWTSTR_ALLOCA(pdnce->tszName));
- TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
- searchResult = _tcsstr(lowered_name, lowered_search) ? 0 : 1;
+ wchar_t *lowered_name = CharLowerW(NEWWSTR_ALLOCA(pdnce->tszName));
+ wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
+ searchResult = wcsstr(lowered_name, lowered_search) ? 0 : 1;
}
if (pdnce && g_CluiData.bFilterEffective && dat != NULL && !dat->bForceInDialog) {
@@ -435,9 +435,9 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) if (g_CluiData.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);
- filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0));
+ filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (wcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (wcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0));
}
else if (g_CluiData.filterFlags & CLVM_INCLUDED_UNGROUPED)
filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? filterResult : filterResult & 1;
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 5c98b322f1..605112c0fc 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -38,24 +38,24 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l struct FontOptionsList {
DWORD dwFlags;
int fontID;
- TCHAR *szGroup;
- TCHAR *szDescr;
+ wchar_t *szGroup;
+ wchar_t *szDescr;
COLORREF defColour;
- TCHAR *szDefFace;
+ wchar_t *szDefFace;
BYTE defCharset, defStyle;
char defSize;
FONTEFFECT defeffect;
COLORREF colour;
- TCHAR szFace[LF_FACESIZE];
+ wchar_t szFace[LF_FACESIZE];
BYTE charset, style;
char size;
};
-#define CLCGROUP LPGENT("Contact list") L"/" LPGENT("Contact names")
-#define CLCLINESGROUP LPGENT("Contact list") L"/" LPGENT("Row items")
-#define CLCFRAMESGROUP LPGENT("Contact list") L"/" LPGENT("Frame texts")
-#define CLCCOLOURSGROUP LPGENT("Contact list") L"/" LPGENT("Special colors")
+#define CLCGROUP LPGENW("Contact list") L"/" LPGENW("Contact names")
+#define CLCLINESGROUP LPGENW("Contact list") L"/" LPGENW("Row items")
+#define CLCFRAMESGROUP LPGENW("Contact list") L"/" LPGENW("Frame texts")
+#define CLCCOLOURSGROUP LPGENW("Contact list") L"/" LPGENW("Special colors")
#define DEFAULT_COLOUR RGB(0, 0, 0)
#define DEFAULT_GREYCOLOUR RGB(128, 128, 128)
@@ -68,53 +68,53 @@ struct FontOptionsList { #define DEFAULT_SMALLSIZE -8
static struct FontOptionsList fontOptionsList[] = {
- { FIDF_CLASSGENERAL, FONTID_CONTACTS, CLCGROUP, LPGENT("Standard contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_AWAY, CLCGROUP, LPGENT("Away contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_DND, CLCGROUP, LPGENT("Do not disturb contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_NA, CLCGROUP, LPGENT("Not available contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_OCCUPIED, CLCGROUP, LPGENT("Occupied contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_CHAT, CLCGROUP, LPGENT("Free for chat contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_INVISIBLE, CLCGROUP, LPGENT("Invisible contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_PHONE, CLCGROUP, LPGENT("On the phone contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_LUNCH, CLCGROUP, LPGENT("Out to lunch contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_OFFLINE, CLCGROUP, LPGENT("Offline contacts"), DEFAULT_GREYCOLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_INVIS, CLCGROUP, LPGENT("Online contacts to whom you have a different visibility"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_OFFINVIS, CLCGROUP, LPGENT("Offline contacts to whom you have a different visibility"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_NOTONLIST, CLCGROUP, LPGENT("Contacts who are 'not on list'"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSHEADER, FONTID_OPENGROUPS, CLCGROUP, LPGENT("Open groups"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_BOLD, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSHEADER, FONTID_OPENGROUPCOUNTS, CLCGROUP, LPGENT("Open group member counts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSHEADER, FONTID_CLOSEDGROUPS, CLCGROUP, LPGENT("Closed groups"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_BOLD, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSHEADER, FONTID_CLOSEDGROUPCOUNTS, CLCGROUP, LPGENT("Closed group member counts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSSMALL, FONTID_DIVIDERS, CLCGROUP, LPGENT("Dividers"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
-
- { FIDF_CLASSSMALL, FONTID_SECONDLINE, CLCLINESGROUP, LPGENT("Second line"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
- { FIDF_CLASSSMALL, FONTID_THIRDLINE, CLCLINESGROUP, LPGENT("Third line"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
- { FIDF_CLASSSMALL, FONTID_CONTACT_TIME, CLCLINESGROUP, LPGENT("Contact time"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
-
- { FIDF_CLASSGENERAL, FONTID_STATUSBAR_PROTONAME, CLCFRAMESGROUP, LPGENT("Status bar text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_EVENTAREA, CLCFRAMESGROUP, LPGENT("Event area text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
- { FIDF_CLASSGENERAL, FONTID_VIEMODES, CLCFRAMESGROUP, LPGENT("Current view mode text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_CONTACTS, CLCGROUP, LPGENW("Standard contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_AWAY, CLCGROUP, LPGENW("Away contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_DND, CLCGROUP, LPGENW("Do not disturb contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_NA, CLCGROUP, LPGENW("Not available contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_OCCUPIED, CLCGROUP, LPGENW("Occupied contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_CHAT, CLCGROUP, LPGENW("Free for chat contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_INVISIBLE, CLCGROUP, LPGENW("Invisible contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_PHONE, CLCGROUP, LPGENW("On the phone contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_LUNCH, CLCGROUP, LPGENW("Out to lunch contacts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_OFFLINE, CLCGROUP, LPGENW("Offline contacts"), DEFAULT_GREYCOLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_INVIS, CLCGROUP, LPGENW("Online contacts to whom you have a different visibility"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_OFFINVIS, CLCGROUP, LPGENW("Offline contacts to whom you have a different visibility"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_NOTONLIST, CLCGROUP, LPGENW("Contacts who are 'not on list'"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSHEADER, FONTID_OPENGROUPS, CLCGROUP, LPGENW("Open groups"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_BOLD, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSHEADER, FONTID_OPENGROUPCOUNTS, CLCGROUP, LPGENW("Open group member counts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSHEADER, FONTID_CLOSEDGROUPS, CLCGROUP, LPGENW("Closed groups"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_BOLD, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSHEADER, FONTID_CLOSEDGROUPCOUNTS, CLCGROUP, LPGENW("Closed group member counts"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSSMALL, FONTID_DIVIDERS, CLCGROUP, LPGENW("Dividers"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+
+ { FIDF_CLASSSMALL, FONTID_SECONDLINE, CLCLINESGROUP, LPGENW("Second line"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSSMALL, FONTID_THIRDLINE, CLCLINESGROUP, LPGENW("Third line"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSSMALL, FONTID_CONTACT_TIME, CLCLINESGROUP, LPGENW("Contact time"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SMALLSIZE, DEFAULT_EFFECT },
+
+ { FIDF_CLASSGENERAL, FONTID_STATUSBAR_PROTONAME, CLCFRAMESGROUP, LPGENW("Status bar text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_EVENTAREA, CLCFRAMESGROUP, LPGENW("Event area text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
+ { FIDF_CLASSGENERAL, FONTID_VIEMODES, CLCFRAMESGROUP, LPGENW("Current view mode text"), DEFAULT_COLOUR, DEFAULT_FAMILY, DEFAULT_CHARSET, FONTF_NORMAL, DEFAULT_SIZE, DEFAULT_EFFECT },
};
struct ColourOptionsList {
char *chGroup;
char *chName;
- TCHAR *szGroup;
- TCHAR *szDescr;
+ wchar_t *szGroup;
+ wchar_t *szDescr;
COLORREF defColour;
};
static struct ColourOptionsList colourOptionsList[] = {
- { "CLC", "BkColour", CLCGROUP, LPGENT("Background"), CLCDEFAULT_BKCOLOUR },
+ { "CLC", "BkColour", CLCGROUP, LPGENW("Background"), CLCDEFAULT_BKCOLOUR },
- { "CLC", "HotTextColour", CLCCOLOURSGROUP, LPGENT("Hot text"), CLCDEFAULT_MODERN_HOTTEXTCOLOUR },
- { "CLC", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
- { "CLC", "QuickSearchColour", CLCCOLOURSGROUP, LPGENT("Quick search text"), CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR },
+ { "CLC", "HotTextColour", CLCCOLOURSGROUP, LPGENW("Hot text"), CLCDEFAULT_MODERN_HOTTEXTCOLOUR },
+ { "CLC", "SelTextColour", CLCCOLOURSGROUP, LPGENW("Selected text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
+ { "CLC", "QuickSearchColour", CLCCOLOURSGROUP, LPGENW("Quick search text"), CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR },
- { "Menu", "TextColour", CLCCOLOURSGROUP, LPGENT("Menu text"), CLCDEFAULT_TEXTCOLOUR },
- { "Menu", "SelTextColour", CLCCOLOURSGROUP, LPGENT("Selected menu text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
- { "FrameTitleBar", "TextColour", CLCCOLOURSGROUP, LPGENT("Frame title text"), CLCDEFAULT_TEXTCOLOUR },
- { "ModernSettings", "KeyColor", CLCCOLOURSGROUP, LPGENT("3rd party frames transparent back color"), SETTING_KEYCOLOR_DEFAULT }
+ { "Menu", "TextColour", CLCCOLOURSGROUP, LPGENW("Menu text"), CLCDEFAULT_TEXTCOLOUR },
+ { "Menu", "SelTextColour", CLCCOLOURSGROUP, LPGENW("Selected menu text"), CLCDEFAULT_MODERN_SELTEXTCOLOUR },
+ { "FrameTitleBar", "TextColour", CLCCOLOURSGROUP, LPGENW("Frame title text"), CLCDEFAULT_TEXTCOLOUR },
+ { "ModernSettings", "KeyColor", CLCCOLOURSGROUP, LPGENW("3rd party frames transparent back color"), SETTING_KEYCOLOR_DEFAULT }
};
void RegisterCLUIFonts(void)
@@ -246,34 +246,34 @@ static const struct CheckBoxToStyleEx_t checkBoxToStyleEx[] = { 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 void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *values, int nValues, DWORD style)
@@ -486,7 +486,7 @@ static int _GetNetVisibleProtoCount() return netProtoCount;
}
-TCHAR *sortby[] = { LPGENT("Name"), LPGENT("Name (use locale settings)"), LPGENT("Status"), LPGENT("Last message time"), LPGENT("Account name"), LPGENT("Rate"), LPGENT("-Nothing-") };
+wchar_t *sortby[] = { LPGENW("Name"), LPGENW("Name (use locale settings)"), LPGENW("Status"), LPGENW("Last message time"), LPGENW("Account name"), LPGENW("Rate"), LPGENW("-Nothing-") };
int sortbyValue[] = { SORTBY_NAME, SORTBY_NAME_LOCALE, SORTBY_STATUS, SORTBY_LASTMSG, SORTBY_PROTO, SORTBY_RATE, SORTBY_NOTHING };
static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -803,7 +803,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
{
- TCHAR *hidemode[] = { TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge") };
+ wchar_t *hidemode[] = { TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge") };
for (int i = 0; i < _countof(hidemode); i++) {
int item = SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_ADDSTRING, 0, (LPARAM)hidemode[i]);
SendDlgItemMessage(hwndDlg, IDC_HIDEMETHOD, CB_SETITEMDATA, item, 0);
@@ -1002,7 +1002,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP {
DBVARIANT dbv = { 0 };
- TCHAR *s;
+ wchar_t *s;
if (!db_get_ts(NULL, "CList", "TitleText", &dbv))
s = dbv.ptszVal;
else
@@ -1148,7 +1148,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP db_set_b(NULL, "CList", "ThinBorder", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BORDER));
db_set_b(NULL, "CList", "NoBorder", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND));
{
- TCHAR title[256];
+ wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
db_set_ws(NULL, "CList", "TitleText", title);
}
@@ -1368,7 +1368,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];
Bitmap_GetFilter(filter, _countof(filter));
GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str));
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index deebf09991..e03c992085 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -184,7 +184,7 @@ int CLCPaint::GetBasicFontID(ClcContact *contact) }
}
-void CLCPaint::GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, TCHAR *szText, SortedList *plText, UINT uTextFormat, int smiley_height)
+void CLCPaint::GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_t *szText, SortedList *plText, UINT uTextFormat, int smiley_height)
{
if (szText == NULL || !szText[0]) {
text_size->cy = 0;
@@ -398,7 +398,7 @@ RECT CLCPaint::_GetRectangle(ClcData *dat, RECT *row_rc, RECT *free_row_rc, int -void CLCPaint::_DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, TCHAR *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley)
+void CLCPaint::_DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, wchar_t *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley)
{
if (szText == NULL)
return;
@@ -614,19 +614,19 @@ MODERNMASK* CLCPaint::_GetCLCContactRowBackModernMask(ClcGroup *group, ClcContac _itoa(index, buf, BUF2SIZE);
AddParam(mpModernMask, HASH[hi_Index], buf, 0);
{
- TCHAR *b2 = NEWTSTR_ALLOCA(Drawing->szText);
+ wchar_t *b2 = NEWWSTR_ALLOCA(Drawing->szText);
for (int i = 0; b2[i] != 0; i++)
- if (b2[i] == _T(','))
- b2[i] = _T('.');
+ if (b2[i] == ',')
+ b2[i] = '.';
AddParam(mpModernMask, HASH[hi_Name], T2Utf(b2), 0);
}
if (group->parent) {
- TCHAR *b2 = NEWTSTR_ALLOCA(group->parent->cl[0]->szText);
+ wchar_t *b2 = NEWWSTR_ALLOCA(group->parent->cl[0]->szText);
for (int i = 0; b2[i] != 0; i++)
- if (b2[i] == _T(','))
- b2[i] = _T('.');
+ if (b2[i] == ',')
+ b2[i] = '.';
AddParam(mpModernMask, HASH[hi_Group], T2Utf(b2), 0);
}
@@ -763,7 +763,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R // 3 draw text
{
SIZE text_size = { 0 };
- TCHAR *szCounts = NULL;
+ wchar_t *szCounts = NULL;
RECT text_rect = fr_rc;
RECT counts_rc = { 0 };
UINT uTextFormat = DT_LEFT | DT_VCENTER | (gl_TrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE;
@@ -903,9 +903,9 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (((dat->bFilterSearch && Drawing->type != CLCIT_GROUP) || selected) && dat->szQuickSearch[0] != '\0') {
int idx = 0;
if (dat->bFilterSearch) {
- TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
- TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
- TCHAR *p1 = _tcsstr(lowered, lowered_search);
+ wchar_t *lowered = CharLowerW(NEWWSTR_ALLOCA(Drawing->szText));
+ wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
+ wchar_t *p1 = wcsstr(lowered, lowered_search);
if (p1)
idx = int(p1 - lowered);
}
@@ -981,9 +981,9 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if ((dat->bFilterSearch || selected) && dat->szQuickSearch[0] != '\0') {
int idx = 0;
if (dat->bFilterSearch) {
- TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
- TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
- TCHAR *p1 = _tcsstr(lowered, lowered_search);
+ wchar_t *lowered = CharLowerW(NEWWSTR_ALLOCA(Drawing->szText));
+ wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
+ wchar_t *p1 = wcsstr(lowered, lowered_search);
if (p1)
idx = int(p1 - lowered);
}
@@ -1002,7 +1002,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R RECT count_rc = { 0 };
SIZE count_size = { 0 };
int space_width = 0;
- TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && mir_tstrlen(szCounts) > 0) {
// calc width and height
@@ -1080,7 +1080,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (dat->secondLine.show && dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = L"";
+ wchar_t buf[70] = L"";
mir_free_and_nil(pdnce->szSecondLineText);
TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
@@ -1108,7 +1108,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (dat->thirdLine.show && dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = L"";
+ wchar_t buf[70] = L"";
mir_free(pdnce->szThirdLineText);
TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
@@ -1391,7 +1391,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R break;
case TC_TIME:
- TCHAR szResult[80];
+ wchar_t szResult[80];
if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL);
@@ -2103,7 +2103,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT case ITEM_CONTACT_TIME: /////////////////////////////////////////////////////////////////////////////////////////////////////
if (Drawing->type == CLCIT_CONTACT && dat->contact_time_show && pdnce->hTimeZone) {
- TCHAR szResult[80];
+ wchar_t szResult[80];
if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
// Select font
@@ -2198,7 +2198,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (Drawing->type == CLCIT_GROUP) {
int full_text_width = text_size.cx;
// Has to draw the count?
- TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
if (szCounts && szCounts[0]) {
RECT space_rc = free_row_rc;
RECT counts_rc = free_row_rc;
@@ -2265,7 +2265,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (dat->secondLine.show) {
if (dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = L"";
+ wchar_t buf[70] = L"";
TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
replaceStrT(pdnce->szSecondLineText, buf);
}
@@ -2298,7 +2298,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (dat->thirdLine.show) {
if (dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = L"";
+ wchar_t buf[70] = L"";
TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
replaceStrT(pdnce->szThirdLineText, buf);
}
@@ -2665,9 +2665,9 @@ void CLCPaint::_DrawContactText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, i if ((dat->bFilterSearch || selected) && dat->szQuickSearch[0] != '\0') {
int idx = 0;
if (dat->bFilterSearch) {
- TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText));
- TCHAR *lowered_search = CharLowerW(NEWTSTR_ALLOCA(dat->szQuickSearch));
- TCHAR *p1 = _tcsstr(lowered, lowered_search);
+ wchar_t *lowered = CharLowerW(NEWWSTR_ALLOCA(Drawing->szText));
+ wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
+ wchar_t *p1 = wcsstr(lowered, lowered_search);
if (p1)
idx = int(p1 - lowered);
}
@@ -2684,7 +2684,7 @@ void CLCPaint::_DrawContactText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, i void CLCPaint::_DrawContactSubText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, int& selected, int& hottrack, RECT& text_rc, RECT *prcItem, UINT uTextFormat, BYTE itemType)
{
if (Drawing->type == CLCIT_GROUP) {
- TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && szCounts[0]) {
@@ -2718,7 +2718,7 @@ void CLCPaint::_DrawContactSubText(HDC hdcMem, ClcData *dat, ClcContact *Drawing void CLCPaint::_DrawContactTime(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT *prcItem)
{
- TCHAR szResult[80];
+ wchar_t szResult[80];
ClcCacheEntry *pdnce = Drawing->pce;
if (!pdnce)
return;
diff --git a/plugins/Clist_modern/src/modern_clcpaint.h b/plugins/Clist_modern/src/modern_clcpaint.h index 406bc51137..5a3d53adb0 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.h +++ b/plugins/Clist_modern/src/modern_clcpaint.h @@ -15,7 +15,7 @@ public: BOOL IsForegroundWindow(HWND hWnd);
HFONT ChangeToFont(HDC hdc, ClcData *dat, int id, int *fontHeight);
int GetBasicFontID(ClcContact *contact);
- void GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, TCHAR *szText, SortedList *plText, UINT uTextFormat, int smiley_height);
+ void GetTextSize(SIZE *text_size, HDC hdcMem, RECT free_row_rc, wchar_t *szText, SortedList *plText, UINT uTextFormat, int smiley_height);
void AddParam(MODERNMASK *mpModernMask, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
BOOL CheckMiniMode(ClcData *dat, BOOL selected);
@@ -101,7 +101,7 @@ private: int _GetGeneralisedStatus();
int _GetRealStatus(ClcContact *pContact, int nStatus);
RECT _GetRectangle(ClcData *dat, RECT *row_rc, RECT *free_row_rc, int *left_pos, int *right_pos, BOOL left, int real_width, int width, int height, int horizontal_space);
- void _DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, TCHAR *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley);
+ void _DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, wchar_t *szText, int start, int len, SortedList *plText, UINT uTextFormat, BOOL ResizeSizeSmiley);
void _AddParameter(MODERNMASK *mpModernMask, MASKPARAM * lpParam);
void _AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWORD dwValueIndex);
void _FillParam(MASKPARAM * lpParam, DWORD dwParamHash, const char* szValue, DWORD dwValueHash);
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index d65e2f32bc..c20e9740e8 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -564,7 +564,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) if (tszLineText)
mir_tstrncpy(dat->secondLine.text, tszLineText, _countof(dat->secondLine.text));
else
- dat->secondLine.text[0] = _T('\0');
+ dat->secondLine.text[0] = '\0';
dat->secondLine.xstatus_has_priority = db_get_b(NULL, "CList", "SecondLineXStatusHasPriority", SETTING_SECONDLINE_XSTATUS_DEFAULT);
dat->secondLine.show_status_if_no_away = db_get_b(NULL, "CList", "SecondLineShowStatusIfNoAway", SETTING_SECONDLINE_STATUSIFNOAWAY_DEFAULT);
@@ -584,7 +584,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) if (tszLineText)
mir_tstrncpy(dat->thirdLine.text, tszLineText, _countof(dat->thirdLine.text));
else
- dat->thirdLine.text[0] = _T('\0');
+ dat->thirdLine.text[0] = '\0';
dat->thirdLine.xstatus_has_priority = db_get_b(NULL, "CList", "ThirdLineXStatusHasPriority", SETTING_THIRDLINE_XSTATUS_DEFAULT);
dat->thirdLine.show_status_if_no_away = db_get_b(NULL, "CList", "ThirdLineShowStatusIfNoAway", SETTING_THIRDLINE_STATUSIFNOAWAY_DEFAULT);
@@ -654,7 +654,7 @@ int ExpandMetaContact(HWND hwnd, ClcContact *contact, ClcData *dat) return contact->bSubExpanded;
}
-int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
+int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk)
{
ClcGroup *group = &dat->list;
int testlen = (int)mir_tstrlen(text);
@@ -673,11 +673,11 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) if (cc->type != CLCIT_DIVIDER) {
bool found;
if (dat->bFilterSearch) {
- TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(cc->szText));
- TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
- found = _tcsstr(lowered_szText, lowered_text) != NULL;
+ wchar_t *lowered_szText = CharLowerW(NEWWSTR_ALLOCA(cc->szText));
+ wchar_t *lowered_text = CharLowerW(NEWWSTR_ALLOCA(text));
+ found = wcsstr(lowered_szText, lowered_text) != NULL;
}
- else found = (prefixOk && !_tcsnicmp(text, cc->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, cc->szText));
+ else found = (prefixOk && !wcsnicmp(text, cc->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, cc->szText));
if (found) {
ClcGroup *ccGroup = group;
@@ -704,11 +704,11 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) bool found;
if (dat->bFilterSearch) {
- TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(ccSub.szText));
- TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
- found = _tcsstr(lowered_szText, lowered_text) != NULL;
+ wchar_t *lowered_szText = CharLowerW(NEWWSTR_ALLOCA(ccSub.szText));
+ wchar_t *lowered_text = CharLowerW(NEWWSTR_ALLOCA(text));
+ found = wcsstr(lowered_szText, lowered_text) != NULL;
}
- else found = (prefixOk && !_tcsnicmp(text, ccSub.szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, ccSub.szText));
+ else found = (prefixOk && !wcsnicmp(text, ccSub.szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, ccSub.szText));
if (found) {
ClcGroup *ccGroup = group;
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index fc9e6e3695..db9ba3fd67 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void LoadContactTree(void);
HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
-int GetContactInfosForSort(MCONTACT hContact, char **Proto, TCHAR **Name, int *Status);
+int GetContactInfosForSort(MCONTACT hContact, char **Proto, wchar_t **Name, int *Status);
///////////////////////////////////////////////////////////////////////////////
@@ -59,13 +59,13 @@ public: DestroySmileyList();
}
- void ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, TCHAR *szText, BOOL replace_smileys);
+ void ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, wchar_t *szText, BOOL replace_smileys);
/** Destroy smiley list */
void DestroySmileyList();
/** Copy Smiley List */
void _CopySmileyList(SortedList *plInput);
- void AddListeningToIcon(ClcData *dat, TCHAR *szText);
+ void AddListeningToIcon(ClcData *dat, wchar_t *szText);
};
@@ -86,10 +86,10 @@ struct ClcCacheEntry : public ClcCacheEntryBase void* ClcContact;
int IsExpanded;
- TCHAR* szSecondLineText;
+ wchar_t* szSecondLineText;
CSmileyString ssSecondLine;
- TCHAR* szThirdLineText;
+ wchar_t* szThirdLineText;
CSmileyString ssThirdLine;
HANDLE hTimeZone;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 0c05a92028..24cc1f273c 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -110,13 +110,13 @@ CListEvent* cli_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 = (struct NotifyMenuItemExData *) malloc(sizeof(struct NotifyMenuItemExData));
if (nmi) {
- TCHAR szBuffer[128];
- TCHAR* szStatus = pcli->pfnGetStatusModeDescription(db_get_w(p->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- TCHAR szwProto[64];
+ wchar_t szBuffer[128];
+ wchar_t* szStatus = pcli->pfnGetStatusModeDescription(db_get_w(p->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
+ 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);
@@ -296,7 +296,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);
rc.left += 26;
if (g_CluiData.hUpdateContact != 0) {
- TCHAR *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
+ wchar_t *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
int iIcon = cli_GetContactIcon(g_CluiData.hUpdateContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -311,7 +311,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) GetMenuItemInfo(g_CluiData.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 = cli_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
@@ -320,7 +320,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) }
else {
HICON hIcon = (HICON)LoadImage(g_hMirApp, MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0);
- TCHAR *ptszEvents = TranslateT("No events");
+ wchar_t *ptszEvents = TranslateT("No events");
ske_DrawText(hDC, ptszEvents, (int)mir_tstrlen(ptszEvents), &rc, DT_VCENTER | DT_SINGLELINE);
ske_DrawIconEx(hDC, 4, (rc.bottom + rc.top - 16) / 2, hIcon, 16, 16, 0, 0, DI_NORMAL | DI_COMPAT);
DestroyIcon(hIcon);
@@ -488,7 +488,7 @@ int EventArea_Create(HWND hCluiWnd) ehhEventAreaBackgroundSettingsChanged(0, 0);
WNDCLASS wndclass = { 0 };
- TCHAR pluginname[] = L"EventArea";
+ wchar_t pluginname[] = L"EventArea";
int h = GetSystemMetrics(SM_CYSMICON) + 2;
if (GetClassInfo(g_hInst, pluginname, &wndclass) == 0) {
wndclass.style = 0;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 92dde8c3c1..2605dea546 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -58,13 +58,13 @@ int InitCustomMenus(void) #define CLUI_FAVSETRATE "CLUI/SetContactRate" //LParam is rate, Wparam is contact handle
#define CLUI_FAVTOGGLESHOWOFFLINE "CLUI/ToggleContactShowOffline"
-static TCHAR *FAVMENUROOTNAME = LPGENT("&Contact rate");
+static wchar_t *FAVMENUROOTNAME = LPGENW("&Contact rate");
-static TCHAR *rates[] = {
- LPGENT("None"),
- LPGENT("Low"),
- LPGENT("Medium"),
- LPGENT("High")
+static wchar_t *rates[] = {
+ LPGENW("None"),
+ LPGENW("Low"),
+ LPGENW("Medium"),
+ LPGENW("High")
};
static HGENMENU hFavoriteContactMenu = NULL, hShowIfOflineItem = NULL;
@@ -124,7 +124,7 @@ int LoadFavoriteContactMenu() CMenuItem mi;
SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
- mi.name.t = FAVMENUROOTNAME;
+ mi.name.w = FAVMENUROOTNAME;
mi.flags = CMIF_TCHAR;
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
@@ -135,7 +135,7 @@ int LoadFavoriteContactMenu() mi.pszService = CLUI_FAVSETRATE;
for (int i = 0; i < _countof(rates); i++) {
mi.hIcolibItem = iconList[i].hIcolib;
- mi.name.t = rates[i];
+ mi.name.w = rates[i];
hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
}
@@ -143,7 +143,7 @@ int LoadFavoriteContactMenu() mi.hIcolibItem = NULL;
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
mi.position = -100000000;
- mi.name.t = LPGENT("Show even if offline");
+ mi.name.w = LPGENW("Show even if offline");
hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, _countof(rates) + 100000000);
return 0;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index a6d774893a..5e8f223061 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -290,7 +290,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) hAuxOld = hAux;
hAux = GetAncestor(hAux, GA_ROOTOWNER);
if (hAuxOld == hAux) {
- TCHAR buf[255];
+ wchar_t buf[255];
GetClassName(hAux, buf, _countof(buf));
if (!mir_tstrcmp(buf, CLUIFrameSubContainerClassName)) {
hWndFound = TRUE;
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index f918d50773..ed7b571b64 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -508,7 +508,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara //TODO: init IDC_ALIGNGROUPCOMBO from db_get_b(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT);
{
int item;
- TCHAR *align[] = { LPGENT("Left align group names"), LPGENT("Center group names"), LPGENT("Right align group names") };
+ wchar_t *align[] = { LPGENW("Left align group names"), LPGENW("Center group names"), LPGENW("Right align group names") };
for (int i = 0; i < sizeof(align) / sizeof(char*); i++)
item = SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
SendDlgItemMessage(hwndDlg, IDC_ALIGNGROUPCOMBO, CB_SETCURSEL, db_get_b(NULL, "CList", "AlignGroupCaptions", SETTING_ALIGNGROPCAPTION_DEFAULT), 0);
@@ -716,7 +716,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM radio = TEXT_STATUS_MESSAGE;
db_set_w(NULL, "CList", "SecondLineType", (WORD)radio);
- TCHAR t[TEXT_TEXT_MAX_LENGTH];
+ wchar_t t[TEXT_TEXT_MAX_LENGTH];
GetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, t, _countof(t));
t[TEXT_TEXT_MAX_LENGTH - 1] = '\0';
db_set_ts(NULL, "CList", "SecondLineText", t);
@@ -882,7 +882,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM db_set_w(NULL, "CList", "ThirdLineType", (WORD)radio);
}
{
- TCHAR t[TEXT_TEXT_MAX_LENGTH];
+ wchar_t t[TEXT_TEXT_MAX_LENGTH];
GetDlgItemText(hwndDlg, IDC_VARIABLE_TEXT, t, _countof(t));
t[TEXT_TEXT_MAX_LENGTH - 1] = '\0';
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 70665ab9cc..a212170259 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void InsertContactIntoTree(MCONTACT hContact, int status);
-TCHAR* UnknownConctactTranslatedName = NULL;
+wchar_t* UnknownConctactTranslatedName = NULL;
void cliFreeCacheItem(ClcCacheEntry *p)
{
@@ -78,7 +78,7 @@ int GetStatusForContact(MCONTACT hContact, char *szProto) return (szProto) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : ID_STATUS_OFFLINE;
}
-int GetContactInfosForSort(MCONTACT hContact, char **Proto, TCHAR **Name, int *Status)
+int GetContactInfosForSort(MCONTACT hContact, char **Proto, wchar_t **Name, int *Status)
{
ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL) {
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 0a92bb92cc..c0b4e9c106 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -147,7 +147,7 @@ CLUI* CLUI::m_pCLUI = NULL; BOOL CLUI::m_fMainMenuInited = FALSE;
HWND CLUI::m_hWnd = NULL;
-static TCHAR tszFolderPath[MAX_PATH];
+static wchar_t tszFolderPath[MAX_PATH];
void CLUI::cliOnCreateClc(void)
{
@@ -184,9 +184,9 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM, LPARAM) return 0;
HWND hwndClist = GetFocus();
- TCHAR cls[128];
+ wchar_t cls[128];
GetClassName(hwndClist, cls, _countof(cls));
- if (mir_tstrcmp(_T(CLISTCONTROL_CLASS), cls))
+ if (mir_tstrcmp(CLISTCONTROL_CLASSW, cls))
hwndClist = pcli->hwndContactList;
MCONTACT hItem = (MCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
@@ -316,13 +316,13 @@ HRESULT CLUI::LoadDllsRuntime() }
static IconItemT iconItem[] = {
- { LPGENT("Show avatar"), "ShowAvatar", IDI_SHOW_AVATAR },
- { LPGENT("Hide avatar"), "HideAvatar", IDI_HIDE_AVATAR }
+ { LPGENW("Show avatar"), "ShowAvatar", IDI_SHOW_AVATAR },
+ { LPGENW("Hide avatar"), "HideAvatar", IDI_HIDE_AVATAR }
};
HRESULT CLUI::RegisterAvatarMenu()
{
- Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
+ Icon_RegisterT(g_hInst, LPGENW("Contact list"), iconItem, _countof(iconItem));
CMenuItem mi;
@@ -348,7 +348,7 @@ HRESULT CLUI::RegisterAvatarMenu() HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
{
- pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), L"",
+ pcli->hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
WS_CHILD | WS_CLIPCHILDREN | 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)
@@ -412,7 +412,7 @@ HRESULT CLUI::CreateCLC() Frame.align = alClient;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_TCHAR;
- Frame.tname = LPGENT("My contacts");
+ Frame.tname = LPGENW("My contacts");
Frame.TBtname = TranslateT("My contacts");
hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -496,7 +496,7 @@ BOOL CLUI_CheckOwnedByClui(HWND hWnd) if (hWndMid == hWndClui)
return TRUE;
- TCHAR buf[255];
+ wchar_t buf[255];
GetClassName(hWndMid, buf, 254);
if (!mir_tstrcmpi(buf, CLUIFrameSubContainerClassName))
return TRUE;
@@ -664,7 +664,7 @@ void CLUI_ChangeWindowMode() styleEx |= WS_EX_LAYERED;
// 4 - Set Title
- TCHAR titleText[255] = { 0 };
+ wchar_t titleText[255] = { 0 };
DBVARIANT dbv;
if (db_get_ts(NULL, "CList", "TitleText", &dbv))
mir_tstrncpy(titleText, _T(MIRANDANAME), _countof(titleText));
@@ -880,12 +880,12 @@ int CLUI_OnSkinLoad(WPARAM, LPARAM) static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
{
int count;
- TCHAR fileFull[MAX_PATH];
+ wchar_t fileFull[MAX_PATH];
if (!tszFolderPath[0]) {
- TCHAR szRelativePath[MAX_PATH];
+ wchar_t szRelativePath[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), szRelativePath, MAX_PATH);
- TCHAR *str = _tcsrchr(szRelativePath, '\\');
+ wchar_t *str = wcsrchr(szRelativePath, '\\');
if (str != NULL)
*str = 0;
PathToAbsoluteT(szRelativePath, tszFolderPath);
@@ -916,12 +916,12 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) return 8;
}
-static HICON CLUI_LoadIconFromExternalFile(TCHAR *filename, int i)
+static HICON CLUI_LoadIconFromExternalFile(wchar_t *filename, int i)
{
- TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH];
+ wchar_t szPath[MAX_PATH], szFullPath[MAX_PATH];
mir_sntprintf(szPath, L"Icons\\%s", filename);
PathToAbsoluteT(szPath, szFullPath);
- if (_taccess(szPath, 0))
+ if (_waccess(szPath, 0))
return NULL;
HICON hIcon = NULL;
@@ -931,7 +931,7 @@ static HICON CLUI_LoadIconFromExternalFile(TCHAR *filename, int i) static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx)
{
- TCHAR szFullPath[MAX_PATH];
+ wchar_t szFullPath[MAX_PATH];
HICON hIcon;
if (szAccoName) {
@@ -1498,35 +1498,35 @@ BOOL cliInvalidateRect(HWND hWnd, CONST RECT* lpRect, BOOL bErase) return InvalidateRect(hWnd, lpRect, bErase);
}
-static BOOL FileExists(TCHAR * tszFilename)
+static BOOL FileExists(wchar_t * tszFilename)
{
- FILE * f = _tfopen(tszFilename, L"r");
+ FILE * f = _wfopen(tszFilename, L"r");
if (f == NULL) return FALSE;
fclose(f);
return TRUE;
}
-HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDescription, TCHAR *tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModuleInst, int iDefaultResource)
+HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDescription, wchar_t *tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModuleInst, int iDefaultResource)
{
if (hDefaultModuleInst == NULL)
return Skin_GetIconHandle(iDefaultResource);
- TCHAR fileFull[MAX_PATH] = { 0 };
+ wchar_t fileFull[MAX_PATH] = { 0 };
SKINICONDESC sid = { 0 };
sid.section.a = szSectionName;
sid.pszName = szIcoID;
sid.flags |= SIDF_PATH_TCHAR;
sid.description.a = szDescription;
- sid.defaultFile.t = fileFull;
+ sid.defaultFile.w = fileFull;
if (tszDefaultFile) {
PathToAbsoluteT(tszDefaultFile, fileFull);
if (!FileExists(fileFull))
- fileFull[0] = _T('\0');
+ fileFull[0] = '\0';
}
- if (fileFull[0] != _T('\0'))
+ if (fileFull[0] != '\0')
sid.iDefaultIndex = -iDefaultIndex;
else {
GetModuleFileName(hDefaultModuleInst, fileFull, _countof(fileFull));
@@ -2419,7 +2419,7 @@ LRESULT CLUI::OnMeasureItem(UINT, WPARAM, LPARAM lParam) case MENU_STATUSMENU:
HDC hdc = GetDC(m_hWnd);
- TCHAR *ptszStr = TranslateT("Status");
+ wchar_t *ptszStr = TranslateT("Status");
SIZE textSize;
GetTextExtentPoint32(hdc, ptszStr, (int)mir_tstrlen(ptszStr), &textSize);
pmis->itemWidth = textSize.cx;
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index 4f285e9ad0..3aeb4ae795 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -67,7 +67,7 @@ bool CLCItems_IsShowOfflineGroup(ClcGroup *group); int CListMod_HideWindow();
/* CLUI */
-HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDescription, TCHAR *tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModule, int iDefaultResource);
+HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDescription, wchar_t *tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModule, int iDefaultResource);
void CLUI_UpdateAeroGlass();
void CLUI_ChangeWindowMode();
BOOL CLUI_CheckOwnedByClui(HWND hwnd);
@@ -91,13 +91,13 @@ int CLUIUnreadEmailCountChanged(WPARAM wParam, LPARAM lParam); /* GDIPlus */
BOOL GDIPlus_AlphaBlend(HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, BLENDFUNCTION *blendFunction);
-HBITMAP GDIPlus_LoadGlyphImage(const TCHAR *szFileName);
+HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *szFileName);
/* EventArea */
void EventArea_ConfigureEventArea();
/* ModernSkinButton */
-int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo, TCHAR *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
+int ModernSkinButton_AddButton(HWND parent, char *ID, char *CommandService, char *StateDefService, char *HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo, wchar_t *Hint, char *DBkey, char *TypeDef, int MinWidth, int MinHeight);
int ModernSkinButtonLoadModule();
int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT *r);
int ModernSkinButtonUnloadModule(WPARAM, LPARAM);
@@ -119,16 +119,16 @@ int ske_DrawNonFramedObjects(BOOL Erase, RECT *r); BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT *lpRect, UINT format);
LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char *szName, BYTE objType, SKINOBJECTSLIST *Skin);
HBITMAP ske_GetCurrentWindowImage();
-int ske_GetFullFilename(TCHAR *buf, const TCHAR *file, TCHAR *skinfolder, BOOL madeAbsolute);
-int ske_GetSkinFolder(TCHAR *szFileName, char *t2);
+int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, BOOL madeAbsolute);
+int ske_GetSkinFolder(wchar_t *szFileName, char *t2);
BOOL ske_ImageList_DrawEx(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, int dx, int dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle);
HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i);
int ske_JustUpdateWindowImageRect(RECT *rty);
-HBITMAP ske_LoadGlyphImage(const TCHAR *szFileName);
+HBITMAP ske_LoadGlyphImage(const wchar_t *szFileName);
HRESULT SkinEngineLoadModule();
void ske_LoadSkinFromDB(void);
-int ske_LoadSkinFromIniFile(TCHAR*, BOOL);
-TCHAR* ske_ParseText(TCHAR *stzText);
+int ske_LoadSkinFromIniFile(wchar_t*, BOOL);
+wchar_t* ske_ParseText(wchar_t *stzText);
int ske_PrepareImageButDontUpdateIt(RECT *r);
int ske_ReCreateBackImage(BOOL Erase, RECT *w);
int ske_RedrawCompleteWindow();
@@ -214,7 +214,7 @@ void UnLoadContactListModule(); / void UpdateAllAvatars(ClcData *dat); //cache_func.c
void ApplyViewMode(const char *Name, bool onlySelector = false);
-void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szProtoFilter, DWORD statusMask, DWORD stickyStatusMask, unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat);
+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);
// cluiframes.c
int ExtraImage_ExtraIDToColumnNum(int extra);
@@ -238,7 +238,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat); void cliRecalcScrollBar(HWND hwnd, ClcData *dat);
void CLUI_cliOnCreateClc(void);
int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
-int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk);
+int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact);
int cli_GetContactIcon(MCONTACT hContact);
diff --git a/plugins/Clist_modern/src/modern_effectenum.h b/plugins/Clist_modern/src/modern_effectenum.h index 28f30beaf8..aff63b837c 100644 --- a/plugins/Clist_modern/src/modern_effectenum.h +++ b/plugins/Clist_modern/src/modern_effectenum.h @@ -20,9 +20,9 @@ typedef struct _MODERNEFFECT }MODERNEFFECT;
#ifdef _EFFECTENUM_FULL_H
-TCHAR * ModernEffectNames[] =
+wchar_t * ModernEffectNames[] =
#else
-TCHAR * _ModernEffectNames[] =
+wchar_t * _ModernEffectNames[] =
#endif
{
L"Shadow at left",
@@ -87,7 +87,7 @@ MODERNEFFECTMATRIX ModernEffectsEnum[] = { #define MAXPREDEFINEDEFFECTS sizeof(ModernEffectNames)/sizeof(ModernEffectNames[0])
#else
#define MAXPREDEFINEDEFFECTS sizeof(_ModernEffectNames)/sizeof(_ModernEffectNames[0])
-extern TCHAR * ModernEffectNames[];
+extern wchar_t * ModernEffectNames[];
#endif
extern BOOL SkinEngine_ResetTextEffect(HDC);
extern BOOL SkinEngine_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD SecondColor);
\ No newline at end of file diff --git a/plugins/Clist_modern/src/modern_gdiplus.cpp b/plugins/Clist_modern/src/modern_gdiplus.cpp index e7d414125f..ce53d31913 100644 --- a/plugins/Clist_modern/src/modern_gdiplus.cpp +++ b/plugins/Clist_modern/src/modern_gdiplus.cpp @@ -48,7 +48,7 @@ DWORD argb_from_cola(COLORREF col, BYTE alpha) return((BYTE)(alpha) << 24 | col);
}
-HBITMAP GDIPlus_LoadGlyphImage(const TCHAR *tszFileName)
+HBITMAP GDIPlus_LoadGlyphImage(const wchar_t *tszFileName)
{
// Create a Bitmap object from a JPEG file.
Bitmap bitmap(tszFileName, 0);
@@ -149,7 +149,7 @@ COLORREF __inline _revcolref(COLORREF colref) // based on routine from http://www.codeproject.com/vcpp/gdiplus/imageexgdi.asp
//
-BOOL GDIPlus_IsAnimatedGif(TCHAR * szName)
+BOOL GDIPlus_IsAnimatedGif(wchar_t * szName)
{
int nFrameCount = 0;
Image image(szName);
@@ -169,7 +169,7 @@ BOOL GDIPlus_IsAnimatedGif(TCHAR * szName) return (BOOL)(nFrameCount > 1);
}
-void GDIPlus_ExtractAnimatedGIF(TCHAR *szName, int width, int height, HBITMAP &pBitmap, int* &pframesDelay, int &pframesCount, SIZE &pSizeAvatar)
+void GDIPlus_ExtractAnimatedGIF(wchar_t *szName, int width, int height, HBITMAP &pBitmap, int* &pframesDelay, int &pframesCount, SIZE &pSizeAvatar)
{
int nFrameCount = 0;
Bitmap image(szName);
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h index 7f54143571..242dc16c21 100644 --- a/plugins/Clist_modern/src/modern_global_structure.h +++ b/plugins/Clist_modern/src/modern_global_structure.h @@ -20,7 +20,7 @@ typedef struct tagCLUIDATA MCONTACT hUpdateContact;
// Contact List View Mode
- TCHAR groupFilter[2048];
+ wchar_t groupFilter[2048];
char protoFilter[2048];
char varFilter[2048];
DWORD lastMsgFilter;
diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp index d55326fee4..f4773c48e2 100644 --- a/plugins/Clist_modern/src/modern_keyboard.cpp +++ b/plugins/Clist_modern/src/modern_keyboard.cpp @@ -49,21 +49,21 @@ int InitSkinHotKeys(void) shk.cbSize = sizeof(shk);
shk.dwFlags = HKD_TCHAR;
- shk.ptszDescription = LPGENT("Close Miranda");
+ shk.ptszDescription = LPGENW("Close Miranda");
shk.pszName = "CloseMiranda";
- shk.ptszSection = LPGENT("Main");
+ shk.ptszSection = LPGENW("Main");
shk.pszService = "CLIST/HK/CloseMiranda";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENT("Restore last status");
+ shk.ptszDescription = LPGENW("Restore last status");
shk.pszName = "RestoreLastStatus";
- shk.ptszSection = LPGENT("Status");
+ shk.ptszSection = LPGENW("Status");
shk.pszService = "CLIST/HK/RestoreStatus";
Hotkey_Register(&shk);
- shk.ptszDescription = LPGENT("Show/Hide offline users");
+ shk.ptszDescription = LPGENW("Show/Hide offline users");
shk.pszName = "ShowHideOfflineUsers";
- shk.ptszSection = LPGENT("Main");
+ shk.ptszSection = LPGENW("Main");
shk.pszService = MS_CLIST_TOGGLEHIDEOFFLINE;
Hotkey_Register(&shk);
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index fbe18a6583..1fe7d491fb 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -70,7 +70,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) if (dat->text_replace_smileys && dat->first_line_draw_smileys && !dat->text_resize_smileys)
tmp = max(tmp, contact->ssText.iMaxSmileyHeight);
if (contact->type == CLCIT_GROUP) {
- TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
+ wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
// Has the count?
if (szCounts && szCounts[0])
tmp = max(tmp, dat->fontModernInfo[contact->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS].fontHeight);
@@ -108,7 +108,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) g_clcPainter.ChangeToFont(hdc, dat, g_clcPainter.GetBasicFontID(contact), NULL);
g_clcPainter.GetTextSize(&size, hdc, dummyRect, contact->szText, contact->ssText.plText, 0, dat->text_resize_smileys ? 0 : contact->ssText.iMaxSmileyHeight);
if (contact->type == CLCIT_GROUP) {
- TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
+ wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
if (szCounts && mir_tstrlen(szCounts) > 0) {
RECT count_rc = { 0 };
// calc width and height
@@ -239,7 +239,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) if (contact->type == CLCIT_CONTACT && dat->contact_time_show && pdnce->hTimeZone) {
pCell->h = dat->fontModernInfo[FONTID_CONTACT_TIME].fontHeight;
if (item == -1) {
- TCHAR szResult[80];
+ wchar_t szResult[80];
if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
SIZE text_size = { 0 };
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index 902812a8de..a83baa7089 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -28,7 +28,7 @@ void RefreshTree(HWND hwndDlg, HTREEITEM hti); static char* rowOptTmplStr;
static ROWCELL* rowOptTmplRoot;
static ROWCELL* rowOptTA[100];
-TCHAR *types[] = {
+wchar_t *types[] = {
L"none", L"text1", L"text2", L"text3", L"status",
L"avatar", L"extra", L"extra1", L"extra2", L"extra3",
L"extra4", L"extra5", L"extra6", L"extra7", L"extra8",
@@ -308,7 +308,7 @@ void RefreshTree(HWND hwndDlg, HTREEITEM hti) cell = (pROWCELL)tvi.lParam;
if (cell)
{
- TCHAR buf[200] = { 0 };
+ wchar_t buf[200] = { 0 };
if (!cell->child)
{
if (cell->type == 0)
@@ -362,14 +362,14 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETCURSEL, 0, 0);
- TCHAR *h_alignment[] = { L"left", L"hCenter", L"right" };
+ wchar_t *h_alignment[] = { L"left", L"hCenter", L"right" };
for (i = 0; i < _countof(h_alignment); i++) {
item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(h_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETCURSEL, 0, 0);
- TCHAR *v_alignment[] = { L"top", L"vCenter", L"bottom" };
+ wchar_t *v_alignment[] = { L"top", L"vCenter", L"bottom" };
for (i = 0; i < _countof(v_alignment); i++) {
item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(v_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETITEMDATA, item, 0);
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index d0062aecd5..55341cd073 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -33,7 +33,7 @@ This file contains code related to new modern free positioned skinned buttons BOOL ModernSkinButtonModuleIsLoaded = FALSE; static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); int ModernSkinButtonUnloadModule(WPARAM wParam, LPARAM lParam); -HWND SetToolTip(HWND hwnd, TCHAR * tip); +HWND SetToolTip(HWND hwnd, wchar_t * tip); typedef struct _ModernSkinButtonCtrl { @@ -51,7 +51,7 @@ typedef struct _ModernSkinButtonCtrl char * ValueTypeDef; int Left, Top, Bottom, Right; HMENU hMenu; - TCHAR * Hint; + wchar_t * Hint; } ModernSkinButtonCtrl; typedef struct _HandleServiceParams @@ -457,7 +457,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM w return DefWindowProc(hwndDlg, msg, wParam, lParam); } -HWND SetToolTip(HWND hwnd, TCHAR * tip) +HWND SetToolTip(HWND hwnd, wchar_t * tip) { TOOLINFO ti; if (!tip) return 0; @@ -483,7 +483,7 @@ HWND SetToolTip(HWND hwnd, TCHAR * tip) } ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; ti.uId = (UINT_PTR)hwnd; - ti.lpszText = (TCHAR*)tip; + ti.lpszText = (wchar_t*)tip; SendMessage(hwndToolTips, TTM_ADDTOOL, 0, (LPARAM)&ti); return hwndToolTips; @@ -516,7 +516,7 @@ int ModernSkinButton_AddButton(HWND parent, int Right, int Bottom, DWORD sbFlags, - TCHAR * Hint, + wchar_t * Hint, char * DBkey, char * TypeDef, int MinWidth, int MinHeight) @@ -607,7 +607,7 @@ static HWND ModernSkinButtonCreateWindow(ModernSkinButtonCtrl * bct, HWND parent if (bct == NULL) return FALSE; { - TCHAR *UnicodeID = mir_a2u(bct->ID); + wchar_t *UnicodeID = mir_a2u(bct->ID); hwnd = CreateWindow(_T(MODERNSKINBUTTONCLASS), UnicodeID, WS_VISIBLE | WS_CHILD, bct->Left, bct->Top, bct->Right - bct->Left, bct->Bottom - bct->Top, parent, NULL, g_hInst, NULL); mir_free(UnicodeID); } diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index e6c325481e..cc28081cb1 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -115,18 +115,18 @@ static MODERNEFFECT meCurrentEffect = { 0xFF, { 0 }, 0, 0 }; ////////////////////////////////////////////////////////////////////////// // Ini file parser -IniParser::IniParser(TCHAR * tcsFileName, BYTE flags) : _Flags(flags) +IniParser::IniParser(wchar_t * tcsFileName, BYTE flags) : _Flags(flags) { _DoInit(); if (!tcsFileName) return; - if (tcsFileName[0] == _T('%')) { + if (tcsFileName[0] == '%') { //TODO: Add parser of resource filename here _LoadResourceIni(g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF"); return; } - _hFile = _tfopen(tcsFileName, L"r"); + _hFile = _wfopen(tcsFileName, L"r"); if (_hFile != NULL) { _eType = IT_FILE; _isValid = true; @@ -200,20 +200,20 @@ HRESULT IniParser::WriteStrToDb(const char * szSection, const char * szName, con return S_OK; } -int IniParser::GetSkinFolder(IN const TCHAR * szFileName, OUT TCHAR * pszFolderName) +int IniParser::GetSkinFolder(IN const wchar_t * szFileName, OUT wchar_t * pszFolderName) { - TCHAR *szBuff = mir_tstrdup(szFileName); - TCHAR *pszPos = szBuff + mir_tstrlen(szBuff); - while (pszPos > szBuff && *pszPos != _T('.')) { pszPos--; } - *pszPos = _T('\0'); + wchar_t *szBuff = mir_tstrdup(szFileName); + wchar_t *pszPos = szBuff + mir_tstrlen(szBuff); + while (pszPos > szBuff && *pszPos != '.') { pszPos--; } + *pszPos = '\0'; mir_tstrcpy(pszFolderName, szBuff); - TCHAR custom_folder[MAX_PATH], cus[MAX_PATH]; - TCHAR *b3; + wchar_t custom_folder[MAX_PATH], cus[MAX_PATH]; + wchar_t *b3; mir_tstrncpy(custom_folder, pszFolderName, _countof(custom_folder)); b3 = custom_folder + mir_tstrlen(custom_folder); - while (b3 > custom_folder && *b3 != _T('\\')) { b3--; } - *b3 = _T('\0'); + while (b3 > custom_folder && *b3 != '\\') { b3--; } + *b3 = '\0'; GetPrivateProfileString(L"Skin_Description_Section", L"SkinFolder", L"", cus, _countof(custom_folder), szFileName); if (cus[0] != 0) @@ -1467,13 +1467,13 @@ void ske_PreMultiplyChannels(HBITMAP hbmp, BYTE Mult) return; } -int ske_GetFullFilename(TCHAR *buf, const TCHAR *file, TCHAR *skinfolder, BOOL madeAbsolute) +int ske_GetFullFilename(wchar_t *buf, const wchar_t *file, wchar_t *skinfolder, BOOL madeAbsolute) { - TCHAR *SkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); + wchar_t *SkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); if (SkinPlace == NULL) SkinPlace = mir_tstrdup(L"\\Skin\\default"); - TCHAR b2[MAX_PATH]; + wchar_t b2[MAX_PATH]; if (file[0] != '\\' && file[1] != ':') mir_sntprintf(b2, L"%s\\%s", (skinfolder == NULL) ? SkinPlace : ((INT_PTR)skinfolder != -1) ? skinfolder : L"", file); else @@ -1557,7 +1557,7 @@ static BOOL ske_ReadTGAImageData(void * From, DWORD fromSize, BYTE * destBuf, DW return TRUE; } -static HBITMAP ske_LoadGlyphImage_TGA(const TCHAR *szFilename) +static HBITMAP ske_LoadGlyphImage_TGA(const wchar_t *szFilename) { BYTE *colormap = NULL; int cx = 0, cy = 0; @@ -1566,7 +1566,7 @@ static HBITMAP ske_LoadGlyphImage_TGA(const TCHAR *szFilename) if (!szFilename) return NULL; if (!wildcmpit(szFilename, L"*\\*%.tga")) { //Loading TGA image from file - FILE *fp = _tfopen(szFilename, L"rb"); + FILE *fp = _wfopen(szFilename, L"rb"); if (!fp) { TRACEVAR("error: couldn't open \"%s\"!\n", szFilename); return NULL; @@ -1618,12 +1618,12 @@ static HBITMAP ske_LoadGlyphImage_TGA(const TCHAR *szFilename) return NULL; } -static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName) +static HBITMAP ske_LoadGlyphImageByDecoders(const wchar_t *tszFileName) { - if (!_tcschr(tszFileName, '%') && !PathFileExists(tszFileName)) + if (!wcschr(tszFileName, '%') && !PathFileExists(tszFileName)) return NULL; - const TCHAR *ext = _tcsrchr(tszFileName, '.'); + const wchar_t *ext = wcsrchr(tszFileName, '.'); if (ext == NULL) return NULL; @@ -1661,7 +1661,7 @@ static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName) return hBitmap; } -static HBITMAP ske_skinLoadGlyphImage(const TCHAR *tszFileName) +static HBITMAP ske_skinLoadGlyphImage(const wchar_t *tszFileName) { if (!wildcmpit(tszFileName, L"*.tga")) return GDIPlus_LoadGlyphImage(tszFileName); @@ -1669,10 +1669,10 @@ static HBITMAP ske_skinLoadGlyphImage(const TCHAR *tszFileName) return ske_LoadGlyphImageByDecoders(tszFileName); } -HBITMAP ske_LoadGlyphImage(const TCHAR *tszFileName) +HBITMAP ske_LoadGlyphImage(const wchar_t *tszFileName) { // try to find image in loaded - TCHAR szFile[MAX_PATH] = { 0 }; + wchar_t szFile[MAX_PATH] = { 0 }; ske_GetFullFilename(szFile, tszFileName, g_SkinObjectList.szSkinPlace, TRUE); mir_cslock lck(cs_SkinChanging); @@ -1913,9 +1913,9 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin) Skin->pMaskList = (LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK)); memset(Skin->pMaskList, 0, sizeof(LISTMODERNMASK)); Skin->szSkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); - if (!Skin->szSkinPlace || (_tcschr(Skin->szSkinPlace, '%') && !db_get_b(NULL, SKIN, "Modified", 0))) { + if (!Skin->szSkinPlace || (wcschr(Skin->szSkinPlace, '%') && !db_get_b(NULL, SKIN, "Modified", 0))) { BOOL bOnlyObjects = FALSE; - if (Skin->szSkinPlace && _tcschr(Skin->szSkinPlace, '%')) + if (Skin->szSkinPlace && wcschr(Skin->szSkinPlace, '%')) bOnlyObjects = TRUE; mir_free(Skin->szSkinPlace); Skin->szSkinPlace = mir_tstrdup(L"%Default%"); @@ -1957,9 +1957,9 @@ static int ske_LoadSkinFromResource(BOOL bOnlyObjects) } // Load data from ini file -int ske_LoadSkinFromIniFile(TCHAR *szFileName, BOOL bOnlyObjects) +int ske_LoadSkinFromIniFile(wchar_t *szFileName, BOOL bOnlyObjects) { - if (_tcschr(szFileName, _T('%'))) + if (wcschr(szFileName, '%')) return ske_LoadSkinFromResource(bOnlyObjects); IniParser parser(szFileName, bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS); @@ -1968,7 +1968,7 @@ int ske_LoadSkinFromIniFile(TCHAR *szFileName, BOOL bOnlyObjects) CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)"ModernSkin"); - TCHAR skinFolder[MAX_PATH], skinFile[MAX_PATH]; + wchar_t skinFolder[MAX_PATH], skinFile[MAX_PATH]; IniParser::GetSkinFolder(szFileName, skinFolder); PathToRelativeT(szFileName, skinFile); @@ -2272,10 +2272,10 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, // replace end of string by elipsis bNeedFreeWorkString = TRUE; - lpWorkString = (TCHAR*)mir_alloc((visibleCharCount + 4) * sizeof(TCHAR)); + lpWorkString = (wchar_t*)mir_alloc((visibleCharCount + 4) * sizeof(wchar_t)); - memcpy((void*)lpWorkString, lpString, visibleCharCount * sizeof(TCHAR)); - memcpy((void*)(lpWorkString + visibleCharCount), L"...", 4 * sizeof(TCHAR)); // 3 + 1 + memcpy((void*)lpWorkString, lpString, visibleCharCount * sizeof(wchar_t)); + memcpy((void*)(lpWorkString + visibleCharCount), L"...", 4 * sizeof(wchar_t)); // 3 + 1 nCount = visibleCharCount + 3; } @@ -3297,19 +3297,19 @@ static DWORD ske_HexToARGB(char * Hex) return AARRGGBB; } -static TCHAR *ske_ReAppend(TCHAR *lfirst, TCHAR * lsecond, int len) +static wchar_t *ske_ReAppend(wchar_t *lfirst, wchar_t * lsecond, int len) { size_t l1 = lfirst ? mir_tstrlen(lfirst) : 0; size_t l2 = (len ? len : (mir_tstrlen(lsecond) + 1)); - TCHAR *buf = (TCHAR *)mir_alloc((l1 + l2 + 1)*sizeof(TCHAR)); - if (lfirst) memmove(buf, lfirst, l1*sizeof(TCHAR)); - memmove(buf + l1, lsecond, l2*sizeof(TCHAR)); + wchar_t *buf = (wchar_t *)mir_alloc((l1 + l2 + 1)*sizeof(wchar_t)); + if (lfirst) memmove(buf, lfirst, l1*sizeof(wchar_t)); + memmove(buf + l1, lsecond, l2*sizeof(wchar_t)); mir_free(lfirst); - if (len) buf[l1 + l2] = _T('\0'); + if (len) buf[l1 + l2] = '\0'; return buf; } -TCHAR* ske_ReplaceVar(TCHAR *var) +wchar_t* ske_ReplaceVar(wchar_t *var) { if (!var) return mir_tstrdup(L""); if (!mir_tstrcmpi(var, L"Profile")) { @@ -3327,15 +3327,15 @@ TCHAR* ske_ReplaceVar(TCHAR *var) return mir_tstrdup(L""); } -TCHAR *ske_ParseText(TCHAR *stzText) +wchar_t *ske_ParseText(wchar_t *stzText) { size_t len = mir_tstrlen(stzText); - TCHAR *result = NULL; + wchar_t *result = NULL; size_t stpos = 0, curpos = 0; while (curpos < len) { //1 find first % - while (curpos < len && stzText[curpos] != (TCHAR)'%') + while (curpos < len && stzText[curpos] != (wchar_t)'%') curpos++; if (curpos < len) { //% found if (curpos - stpos > 0) @@ -3343,14 +3343,14 @@ TCHAR *ske_ParseText(TCHAR *stzText) stpos = curpos + 1; curpos++; //3 find second % - while (curpos < len && stzText[curpos] != (TCHAR)'%') + while (curpos < len && stzText[curpos] != (wchar_t)'%') curpos++; if (curpos >= len) break; if (curpos - stpos > 0) { - TCHAR *var = (TCHAR *)mir_alloc((curpos - stpos + 1)*sizeof(TCHAR)); - memcpy(var, stzText + stpos, (curpos - stpos)*sizeof(TCHAR)); - var[curpos - stpos] = (TCHAR)'\0'; + wchar_t *var = (wchar_t *)mir_alloc((curpos - stpos + 1)*sizeof(wchar_t)); + memcpy(var, stzText + stpos, (curpos - stpos)*sizeof(wchar_t)); + var[curpos - stpos] = (wchar_t)'\0'; var = ske_ReplaceVar(var); result = ske_ReAppend(result, var, 0); mir_free(var); diff --git a/plugins/Clist_modern/src/modern_skinengine.h b/plugins/Clist_modern/src/modern_skinengine.h index 7a165081fc..d59f64f680 100644 --- a/plugins/Clist_modern/src/modern_skinengine.h +++ b/plugins/Clist_modern/src/modern_skinengine.h @@ -21,7 +21,7 @@ struct SKINOBJECTSLIST {
DWORD dwObjLPReserved;
DWORD dwObjLPAlocated;
- TCHAR *szSkinPlace;
+ wchar_t *szSkinPlace;
LISTMODERNMASK *pMaskList;
SKINOBJECTDESCRIPTOR *pObjects;
SortedList *pTextList;
@@ -29,7 +29,7 @@ struct SKINOBJECTSLIST struct GLYPHIMAGE
{
- TCHAR *szFileName;
+ wchar_t *szFileName;
DWORD dwLoadedTimes;
HBITMAP hGlyph;
BYTE isSemiTransp;
@@ -69,7 +69,7 @@ public: typedef HRESULT(*ParserCallback_t)(const char *szSection, const char *szKey, const char *szValue, IniParser *This);
- IniParser(TCHAR *szFileName, BYTE flags = FLAG_WITH_SETTINGS);
+ IniParser(wchar_t *szFileName, BYTE flags = FLAG_WITH_SETTINGS);
IniParser(HINSTANCE hInst, const char *resourceName, const char *resourceType, BYTE flags = FLAG_ONLY_OBJECTS);
~IniParser();
@@ -77,7 +77,7 @@ public: HRESULT Parse(ParserCallback_t pLineCallBackProc, LPARAM lParam);
static HRESULT WriteStrToDb(const char *szSection, const char *szKey, const char *szValue, IniParser *This);
- static int GetSkinFolder(IN const TCHAR *szFileName, OUT TCHAR *pszFolderName);
+ static int GetSkinFolder(IN const wchar_t *szFileName, OUT wchar_t *pszFolderName);
private:
// common
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 3be1b39192..6927134b57 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -32,14 +32,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct SkinListData { - TCHAR Name[MAX_NAME]; - TCHAR File[MAX_PATH]; + wchar_t Name[MAX_NAME]; + wchar_t File[MAX_PATH]; }; HBITMAP hPreviewBitmap = NULL; -HTREEITEM AddItemToTree(HWND hTree, TCHAR *itemName, void *data); -HTREEITEM AddSkinToListFullName(HWND hwndDlg, TCHAR *fullName); -HTREEITEM AddSkinToList(HWND hwndDlg, TCHAR *path, TCHAR *file); +HTREEITEM AddItemToTree(HWND hTree, wchar_t *itemName, void *data); +HTREEITEM AddSkinToListFullName(HWND hwndDlg, wchar_t *fullName); +HTREEITEM AddSkinToList(HWND hwndDlg, wchar_t *path, wchar_t *file); HTREEITEM FillAvailableSkinList(HWND hwndDlg); INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); @@ -53,8 +53,8 @@ int SkinOptInit(WPARAM wParam, LPARAM) odp.hInstance = g_hInst; odp.pfnDlgProc = DlgSkinOpts; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN); - odp.ptszGroup = LPGENT("Skins"); - odp.ptszTitle = LPGENT("Contact list"); + odp.pwszGroup = LPGENW("Skins"); + odp.pwszTitle = LPGENW("Contact list"); odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; Options_AddPage(wParam, &odp); } @@ -117,8 +117,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara if (!sd) return 0; - TCHAR Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; - if (!_tcschr(sd->File, _T('%'))) { + wchar_t Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; + if (!wcschr(sd->File, '%')) { GetPrivateProfileString(L"Skin_Description_Section", L"Author", TranslateT("( unknown )"), Author, _countof(Author), sd->File); GetPrivateProfileString(L"Skin_Description_Section", L"URL", L"", URL, _countof(URL), sd->File); GetPrivateProfileString(L"Skin_Description_Section", L"Contact", L"", Contact, _countof(Contact), sd->File); @@ -254,11 +254,11 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara if (nmtv->itemNew.lParam) { SkinListData *sd = (SkinListData*)nmtv->itemNew.lParam; - TCHAR buf[MAX_PATH]; + wchar_t buf[MAX_PATH]; PathToRelativeT(sd->File, buf); SetDlgItemText(hwndDlg, IDC_EDIT_SKIN_FILENAME, buf); - TCHAR prfn[MAX_PATH] = { 0 }, imfn[MAX_PATH] = { 0 }, skinfolder[MAX_PATH] = { 0 }; + wchar_t prfn[MAX_PATH] = { 0 }, imfn[MAX_PATH] = { 0 }, skinfolder[MAX_PATH] = { 0 }; GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), sd->File); IniParser::GetSkinFolder(sd->File, skinfolder); mir_sntprintf(prfn, L"%s\\%s", skinfolder, imfn); @@ -282,8 +282,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara if (!sd2) return 0; - TCHAR Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; - if (sd2->File && !_tcschr(sd2->File, _T('%'))) { + wchar_t Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; + if (sd2->File && !wcschr(sd2->File, '%')) { GetPrivateProfileString(L"Skin_Description_Section", L"Author", TranslateT("( unknown )"), Author, _countof(Author), sd2->File); GetPrivateProfileString(L"Skin_Description_Section", L"URL", L"", URL, _countof(URL), sd2->File); GetPrivateProfileString(L"Skin_Description_Section", L"Contact", L"", Contact, _countof(Contact), sd2->File); @@ -325,10 +325,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara return 0; } -int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder) +int SearchSkinFiles(HWND hwndDlg, wchar_t * Folder) { struct _tfinddata_t fd = { 0 }; - TCHAR mask[MAX_PATH]; + wchar_t mask[MAX_PATH]; long hFile; mir_sntprintf(mask, L"%s\\*.msf", Folder); //fd.attrib = _A_SUBDIR; @@ -344,7 +344,7 @@ int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder) { do { if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, L".") == 0 || mir_tstrcmpi(fd.name, L"..") == 0)) {//Next level of subfolders - TCHAR path[MAX_PATH]; + wchar_t path[MAX_PATH]; mir_sntprintf(path, L"%s\\%s", Folder, fd.name); SearchSkinFiles(hwndDlg, path); } @@ -366,7 +366,7 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg) if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY)) SearchSkinFiles(hwndDlg, SkinsFolder); { - TCHAR skinfull[MAX_PATH]; + wchar_t skinfull[MAX_PATH]; ptrT skinfile(db_get_tsa(NULL, SKIN, "SkinFile")); if (skinfile) { PathToAbsoluteT(skinfile, skinfull); @@ -375,16 +375,16 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg) } return res; } -HTREEITEM AddSkinToListFullName(HWND hwndDlg, TCHAR * fullName) +HTREEITEM AddSkinToListFullName(HWND hwndDlg, wchar_t * fullName) { - TCHAR path[MAX_PATH] = { 0 }; - TCHAR file[MAX_PATH] = { 0 }; - TCHAR *buf; + wchar_t path[MAX_PATH] = { 0 }; + wchar_t file[MAX_PATH] = { 0 }; + wchar_t *buf; mir_tstrncpy(path, fullName, _countof(path)); buf = path + mir_tstrlen(path); while (buf > path) { - if (*buf == _T('\\')) { - *buf = _T('\0'); + if (*buf == '\\') { + *buf = '\0'; break; } buf--; @@ -395,29 +395,29 @@ HTREEITEM AddSkinToListFullName(HWND hwndDlg, TCHAR * fullName) } -HTREEITEM AddSkinToList(HWND hwndDlg, TCHAR * path, TCHAR* file) +HTREEITEM AddSkinToList(HWND hwndDlg, wchar_t * path, wchar_t* file) { - TCHAR fullName[MAX_PATH], defskinname[MAX_PATH]; + wchar_t fullName[MAX_PATH], defskinname[MAX_PATH]; SkinListData *sd = (SkinListData *)mir_alloc(sizeof(SkinListData)); if (!sd) return 0; - if (!file || _tcschr(file, _T('%'))) { + if (!file || wcschr(file, '%')) { mir_sntprintf(sd->File, L"%%Default Skin%%"); mir_sntprintf(sd->Name, TranslateT("%Default Skin%")); - _tcsncpy_s(fullName, TranslateT("Default Skin"), _TRUNCATE); + wcsncpy_s(fullName, TranslateT("Default Skin"), _TRUNCATE); } else { mir_sntprintf(fullName, L"%s\\%s", path, file); - _tcsncpy_s(defskinname, file, _TRUNCATE); - TCHAR *p = _tcsrchr(defskinname, '.'); if (p) *p = 0; + wcsncpy_s(defskinname, file, _TRUNCATE); + wchar_t *p = wcsrchr(defskinname, '.'); if (p) *p = 0; GetPrivateProfileString(L"Skin_Description_Section", L"Name", defskinname, sd->Name, _countof(sd->Name), fullName); - _tcsncpy_s(sd->File, fullName, _TRUNCATE); + wcsncpy_s(sd->File, fullName, _TRUNCATE); } return AddItemToTree(GetDlgItem(hwndDlg, IDC_TREE1), sd->Name, sd); } -HTREEITEM FindChild(HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data) +HTREEITEM FindChild(HWND hTree, HTREEITEM Parent, wchar_t * Caption, void * data) { HTREEITEM tmp = NULL; if (Parent) @@ -427,7 +427,7 @@ HTREEITEM FindChild(HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data) while (tmp) { TVITEM tvi; - TCHAR buf[255]; + wchar_t buf[255]; tvi.hItem = tmp; tvi.mask = TVIF_TEXT | TVIF_HANDLE; tvi.pszText = buf; @@ -451,7 +451,7 @@ HTREEITEM FindChild(HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data) return tmp; } -HTREEITEM AddItemToTree(HWND hTree, TCHAR *itemName, void *data) +HTREEITEM AddItemToTree(HWND hTree, wchar_t *itemName, void *data) { HTREEITEM cItem = NULL; //Insert item node @@ -473,7 +473,7 @@ INT_PTR SvcActiveSkin(WPARAM, LPARAM) { ptrT skinfile(db_get_tsa(NULL, SKIN, "SkinFile")); if (skinfile) { - TCHAR skinfull[MAX_PATH]; + wchar_t skinfull[MAX_PATH]; PathToAbsoluteT(skinfile, skinfull); return (INT_PTR)mir_tstrdup(skinfull); } @@ -483,7 +483,7 @@ INT_PTR SvcActiveSkin(WPARAM, LPARAM) INT_PTR SvcApplySkin(WPARAM, LPARAM lParam) { - ske_LoadSkinFromIniFile((TCHAR *)lParam, FALSE); + ske_LoadSkinFromIniFile((wchar_t *)lParam, FALSE); ske_LoadSkinFromDB(); Clist_Broadcast(INTM_RELOADOPTIONS, 0, 0); Sync(CLUIFrames_OnClistResize_mod, 0, 0); @@ -519,9 +519,9 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) OffsetRect(&workRect, -workRect.left, -workRect.top); if (lParam) { - TCHAR prfn[MAX_PATH] = { 0 }; - TCHAR imfn[MAX_PATH] = { 0 }; - TCHAR skinfolder[MAX_PATH] = { 0 }; + wchar_t prfn[MAX_PATH] = { 0 }; + wchar_t imfn[MAX_PATH] = { 0 }; + wchar_t skinfolder[MAX_PATH] = { 0 }; GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), (LPCTSTR)lParam); IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder); mir_sntprintf(prfn, L"%s\\%s", skinfolder, imfn); diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp index 09fbd5b350..d6a4a80fc5 100644 --- a/plugins/Clist_modern/src/modern_skinselector.cpp +++ b/plugins/Clist_modern/src/modern_skinselector.cpp @@ -363,10 +363,10 @@ SKINOBJECTDESCRIPTOR* skin_FindObjectByRequest(char *szValue, LISTMODERNMASK *mm return res;
}
-TCHAR* GetParamNT(char *string, TCHAR *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces)
+wchar_t* GetParamNT(char *string, wchar_t *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces)
{
- char *ansibuf = (char*)mir_alloc(buflen / sizeof(TCHAR));
- GetParamN(string, ansibuf, buflen / sizeof(TCHAR), paramN, Delim, SkipSpaces);
+ char *ansibuf = (char*)mir_alloc(buflen / sizeof(wchar_t));
+ GetParamN(string, ansibuf, buflen / sizeof(wchar_t), paramN, Delim, SkipSpaces);
MultiByteToWideChar(CP_UTF8, 0, ansibuf, -1, buf, buflen);
mir_free(ansibuf);
return buf;
@@ -437,7 +437,7 @@ int RegisterButtonByParce(char * ObjectName, char * Params) int Left, Top, Right, Bottom;
int MinWidth, MinHeight;
char TL[9] = { 0 };
- TCHAR Hint[250] = { 0 };
+ wchar_t Hint[250] = { 0 };
char Section[250] = { 0 };
char Type[250] = { 0 };
diff --git a/plugins/Clist_modern/src/modern_skinselector.h b/plugins/Clist_modern/src/modern_skinselector.h index 76f39f6ba9..804b97fabb 100644 --- a/plugins/Clist_modern/src/modern_skinselector.h +++ b/plugins/Clist_modern/src/modern_skinselector.h @@ -71,6 +71,6 @@ DWORD mod_CalcHash(const char *a); int RegisterObjectByParce(char *ObjectName, char *Params);
SKINOBJECTDESCRIPTOR* skin_FindObjectByRequest(char *szValue, LISTMODERNMASK *mmTemplateList);
SKINOBJECTDESCRIPTOR* skin_FindObjectByMask(MODERNMASK *mm, LISTMODERNMASK *mmTemplateList);
-TCHAR * GetParamNT(char *string, TCHAR *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces);
+wchar_t * GetParamNT(char *string, wchar_t *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces);
int SkinDrawGlyphMask(HDC hdc, RECT *rcSize, RECT *rcClip, MODERNMASK *ModernMask);
#endif
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index ade67318a6..f49faaa894 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -240,7 +240,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (p->bShowProtoEmails == 1 && ProtoServiceExists(szProto, PS_GETUNREADEMAILCOUNT)) {
int nEmails = (int)CallProtoService(szProto, PS_GETUNREADEMAILCOUNT, 0, 0);
if (nEmails > 0) {
- TCHAR str[40];
+ wchar_t str[40];
mir_sntprintf(str, L"[%d]", nEmails);
p->szProtoEMailCount = mir_tstrdup(str);
}
@@ -343,7 +343,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) p.extraIcon = NULL;
if ((p.xStatusMode & 8) && p.iProtoStatus > ID_STATUS_OFFLINE) {
- TCHAR str[512];
+ wchar_t str[512];
CUSTOM_STATUS cs = { sizeof(cs) };
cs.flags = CSSF_MASK_NAME | CSSF_TCHAR;
cs.ptszName = str;
@@ -861,7 +861,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa return DefWindowProc(hwnd, msg, wParam, lParam);
}
-TCHAR pluginname[] = L"ModernStatusBar";
+wchar_t pluginname[] = L"ModernStatusBar";
HWND StatusBar_Create(HWND parent)
{
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 6de1116d5a..44218b6bba 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -237,14 +237,14 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SendDlgItemMessage(hwndDlg, IDC_OFFSETSPIN3, UDM_SETPOS, 0, MAKELONG(db_get_dw(NULL, "CLUI", "SpaceBetween", SETTING_SPACEBETWEEN_DEFAULT), 2));
{
- TCHAR *align[] = { LPGENT("Left"), LPGENT("Center"), LPGENT("Right") };
+ wchar_t *align[] = { LPGENW("Left"), LPGENW("Center"), LPGENW("Right") };
for (int i = 0; i < _countof(align); i++)
SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_HORIZ_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "Align", SETTING_ALIGN_DEFAULT), 0);
}
{
- TCHAR *align[] = { LPGENT("Top"), LPGENT("Center"), LPGENT("Bottom") };
+ wchar_t *align[] = { LPGENW("Top"), LPGENW("Center"), LPGENW("Bottom") };
for (int i = 0; i < _countof(align); i++)
SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(align[i]));
SendDlgItemMessage(hwndDlg, IDC_SBAR_VERT_ALIGN, CB_SETCURSEL, db_get_b(NULL, "CLUI", "VAlign", SETTING_VALIGN_DEFAULT), 0);
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp index 34a6339e60..0ea00a70be 100644 --- a/plugins/Clist_modern/src/modern_tbbutton.cpp +++ b/plugins/Clist_modern/src/modern_tbbutton.cpp @@ -21,7 +21,7 @@ struct TBBUTTONDATA : public MButtonCtrl bool bHotMark; // button is hot marked (e.g. current state)
bool bFocused;
int nFontID; // internal font ID
- TCHAR szText[128]; // text on the button
+ wchar_t szText[128]; // text on the button
RECT rcMargins; // margins of inner content
HANDLE hIcolibHandle; // handle of icon in iconlib
@@ -238,7 +238,7 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam break;
case WM_SETTEXT:
- mir_tstrncpy(bct->szText, (TCHAR*)lParam, _countof(bct->szText));
+ mir_tstrncpy(bct->szText, (wchar_t*)lParam, _countof(bct->szText));
break;
case WM_SETFONT:
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 051ec14f57..7db4523adb 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -299,7 +299,7 @@ void CustomizeToolbar(HWND hwnd) static char szUrl[] = "http://miranda-ng.org/p/TopToolBar";
-static TCHAR szWarning[] = LPGENT("To view a toolbar in Clist_modern you need the TopToolBar plugin. Click Yes to download it or No to continue");
+static wchar_t szWarning[] = LPGENW("To view a toolbar in Clist_modern you need the TopToolBar plugin. Click Yes to download it or No to continue");
static void CopySettings(const char* to, const char* from, int defValue)
{
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index 469836c255..07810bd37f 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -51,7 +51,7 @@ void TRACE_ERROR() // load small icon (not shared) it IS NEED to be destroyed
HICON LoadSmallIcon(HINSTANCE hInstance, int index)
{
- TCHAR filename[MAX_PATH] = { 0 };
+ wchar_t filename[MAX_PATH] = { 0 };
GetModuleFileName(hInstance, filename, MAX_PATH);
HICON hIcon = NULL;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 7124d3f4b4..6ce7bd2965 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -245,7 +245,7 @@ static int FillDialog(HWND hwnd) item.pszText = TranslateT("Ungrouped contacts");
SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
- TCHAR *szGroup;
+ wchar_t *szGroup;
for (int i = 1; (szGroup = Clist_GroupGetName(i, NULL)) != NULL; i++) {
item.pszText = szGroup;
SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
@@ -344,7 +344,7 @@ static int DeleteAutoModesCallback(char *szsetting) }
-void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szProtoFilter, DWORD dwStatusMask, DWORD dwStickyStatusMask,
+void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *szProtoFilter, DWORD dwStatusMask, DWORD dwStickyStatusMask,
unsigned int options, unsigned int stickies, unsigned int operators, unsigned int lmdat)
{
CLVM_EnumModes(DeleteAutoModesCallback);
@@ -372,7 +372,7 @@ void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szPr void SaveState()
{
- TCHAR newGroupFilter[2048] = L"|";
+ wchar_t newGroupFilter[2048] = L"|";
char newProtoFilter[2048] = "|";
DWORD statusMask = 0;
DWORD operators = 0;
@@ -400,7 +400,7 @@ void SaveState() }
{
LVITEM item = { 0 };
- TCHAR szTemp[256];
+ wchar_t szTemp[256];
HWND hwndList = GetDlgItem(clvmHwnd, IDC_GROUPS);
@@ -430,7 +430,7 @@ void SaveState() if (iLen) {
unsigned int stickies = 0;
- TCHAR *szTempModeName = (TCHAR*)mir_alloc((iLen + 1)*sizeof(TCHAR));
+ wchar_t *szTempModeName = (wchar_t*)mir_alloc((iLen + 1)*sizeof(wchar_t));
if (szTempModeName) {
SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempModeName);
@@ -495,13 +495,13 @@ static void UpdateFilters() if (iLen == 0)
return;
- TCHAR *szTempBuf = (TCHAR*)_alloca((iLen + 1)*sizeof(TCHAR));
+ wchar_t *szTempBuf = (wchar_t*)_alloca((iLen + 1)*sizeof(wchar_t));
SendDlgItemMessage(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szTempBuf);
T2Utf szBuf(szTempBuf);
mir_strncpy(g_szModename, szBuf, _countof(g_szModename));
{
- TCHAR szTemp[100];
+ wchar_t szTemp[100];
mir_sntprintf(szTemp, TranslateT("Configuring view mode: %s"), szTempBuf);
SetDlgItemText(clvmHwnd, IDC_CURVIEWMODE2, szTemp);
}
@@ -547,8 +547,8 @@ static void UpdateFilters() }
{
LVITEM item = { 0 };
- TCHAR szTemp[256];
- TCHAR szMask[256];
+ wchar_t szTemp[256];
+ wchar_t szMask[256];
int i;
HWND hwndList = GetDlgItem(clvmHwnd, IDC_GROUPS);
@@ -562,7 +562,7 @@ static void UpdateFilters() item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
mir_sntprintf(szMask, L"%s|", szTemp);
- if (szGF && _tcsstr(szGF, szMask))
+ if (szGF && wcsstr(szGF, szMask))
ListView_SetCheckState(hwndList, i, TRUE)
else
ListView_SetCheckState(hwndList, i, FALSE);
@@ -689,7 +689,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP int index = 0;
if (g_CluiData.current_viewmode[0] != '\0') {
- TCHAR *temp = mir_utf8decodeW(g_CluiData.current_viewmode);
+ wchar_t *temp = mir_utf8decodeW(g_CluiData.current_viewmode);
if (temp) {
index = SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_FINDSTRING, -1, (LPARAM)temp);
mir_free(temp);
@@ -753,7 +753,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (MessageBox(0, TranslateT("Really delete this view mode? This cannot be undone"), TranslateT("Delete a view mode"), MB_YESNO | MB_ICONQUESTION) == IDYES) {
int iLen = SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETTEXTLEN, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), 0);
if (iLen) {
- TCHAR *szTempBuf = (TCHAR*)_alloca((iLen + 1)*sizeof(TCHAR));
+ wchar_t *szTempBuf = (wchar_t*)_alloca((iLen + 1)*sizeof(wchar_t));
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETTEXT, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), (LPARAM)szTempBuf);
DeleteViewMode(T2Utf(szTempBuf));
@@ -769,7 +769,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_ADDVIEWMODE:
{
- TCHAR szBuf[256];
+ wchar_t szBuf[256];
szBuf[0] = 0;
GetDlgItemText(hwndDlg, IDC_NEWVIEMODE, szBuf, _countof(szBuf));
szBuf[255] = 0;
@@ -890,7 +890,7 @@ static int FillMenuCallback(char *szSetting) if (szSetting[0] == 13)
return 1;
- TCHAR *temp = mir_utf8decodeT(szSetting);
+ wchar_t *temp = mir_utf8decodeT(szSetting);
if (temp) {
AppendMenu(hViewModeMenu, MFT_STRING, menuCounter++, temp);
mir_free(temp);
@@ -1086,7 +1086,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (selection == 10002)
goto clvm_reset_command;
- TCHAR szTemp[256];
+ wchar_t szTemp[256];
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING;
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h index 21abdf4975..814eed1ffa 100644 --- a/plugins/Clist_modern/src/stdafx.h +++ b/plugins/Clist_modern/src/stdafx.h @@ -119,7 +119,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "resource.h"
#define DEFAULT_SKIN_FOLDER "Skins\\Modern contact list"
-extern TCHAR SkinsFolder[MAX_PATH];
+extern wchar_t SkinsFolder[MAX_PATH];
//macros to free data and set it pointer to NULL
#define mir_free_and_nil(x) {mir_free((void*)x); x=NULL;}
@@ -224,7 +224,7 @@ int AniAva_InitModule(); // HAVE TO BE AFTER GDI+ INITIALIZED int AniAva_UnloadModule();
int AniAva_UpdateOptions(); //reload options, //hot enable/disable engine
-int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth); // adds avatars to be displayed
+int AniAva_AddAvatar(MCONTACT hContact, wchar_t * szFilename, int width, int heigth); // adds avatars to be displayed
int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha); // update avatars pos
int AniAva_InvalidateAvatarPositions(MCONTACT hContact); // reset positions of avatars to be drawn (still be painted at same place)
int AniAva_RemoveInvalidatedAvatars(); // all avatars without validated position will be stop painted and probably removed
|