diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
commit | 8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch) | |
tree | 94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/TipperYM | |
parent | 1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff) |
hello, Unix.
phase 1: removing _T()
git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/mir_smileys.cpp | 6 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 24 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 40 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.h | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/preset_items.cpp | 106 | ||||
-rw-r--r-- | plugins/TipperYM/src/skin_parser.cpp | 106 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 70 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 20 |
10 files changed, 189 insertions, 189 deletions
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 42fb11a362..4f07b1395d 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -218,7 +218,7 @@ void InitMessagePump() wcl.lpszClassName = POP_WIN_CLASS;
RegisterClassEx(&wcl);
- hDwmapiDll = LoadLibrary(_T("dwmapi.dll"));
+ hDwmapiDll = LoadLibrary(L"dwmapi.dll");
if (hDwmapiDll)
MyDwmEnableBlurBehindWindow = (HRESULT (WINAPI *)(HWND, DWM_BLURBEHIND *))GetProcAddress(hDwmapiDll, "DwmEnableBlurBehindWindow");
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 05095a2fea..3e2df38660 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -124,7 +124,7 @@ SIZE GetTextSize(HDC hdcMem, const TCHAR *szText, SMILEYPARSEINFO info, UINT uTe }
else {
// Get real height of the line
- text_height = DrawText(hdcMem, _T("A"), 1, &text_rc, DT_CALCRECT | uTextFormat);
+ text_height = DrawText(hdcMem, L"A", 1, &text_rc, DT_CALCRECT | uTextFormat);
// See each item of list
int i;
@@ -196,13 +196,13 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, SMIL i = 0;
// Get real height of the line
- text_height = DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat);
+ text_height = DrawText(hdcMem, L"A", 1, &tmp_rc, DT_CALCRECT | uTextFormat);
mir_ptr<COLOR32> pBits(SaveAlpha(&free_rc));
// Just draw ellipsis
if (free_rc.right <= free_rc.left)
- DrawText(hdcMem, _T("..."), 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
+ DrawText(hdcMem, L"...", 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
else {
// Draw text and smileys
RECT text_rc = free_rc;
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 2e8b94fdd8..63ca767e1e 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -49,8 +49,8 @@ void CreateDefaultItems() for (int i = 0; defaultItemList[i].szName; i++) {
if (defaultItemList[i].szName[0] == '-') {
DIListNode *di_node = (DIListNode *)mir_alloc(sizeof(DIListNode));
- _tcsncpy(di_node->di.swzLabel, _T(""), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T(""), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"", VALUE_LEN);
di_node->di.bLineAbove = true;
di_node->di.bIsVisible = true;
di_node->di.bParseTipperVarsFirst = false;
@@ -275,7 +275,7 @@ void SaveItems() opt.bWaitForStatusMsg = false;
while (di_node) {
SaveDI(&di_node->di, index);
- if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, _T("sys:status_msg")))
+ if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, L"sys:status_msg"))
opt.bWaitForStatusMsg = true;
di_node = di_node->next;
index++;
@@ -372,7 +372,7 @@ void LoadOptions() di_node->next = opt.diList;
opt.diList = di_node;
real_count++;
- if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, _T("sys:status_msg")))
+ if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, L"sys:status_msg"))
opt.bWaitForStatusMsg = true;
}
else
@@ -411,8 +411,8 @@ void LoadOptions() di_node = opt.diList;
}
- _tcsncpy(di_node->di.swzLabel, _T("Last message: (%sys:last_msg_reltime% ago)"), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T("%sys:last_msg%"), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"Last message: (%sys:last_msg_reltime% ago)", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"%sys:last_msg%", VALUE_LEN);
di_node->di.bLineAbove = di_node->di.bValueNewline = true;
di_node->next = 0;
opt.iDiCount++;
@@ -436,8 +436,8 @@ void LoadOptions() di_node = opt.diList;
}
- _tcsncpy(di_node->di.swzLabel, _T("Status message:"), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T("%sys:status_msg%"), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"Status message:", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"%sys:status_msg%", VALUE_LEN);
di_node->di.bLineAbove = di_node->di.bValueNewline = true;
di_node->next = 0;
opt.iDiCount++;
@@ -741,7 +741,7 @@ static void SetTreeItemText(DIListNode *node, TCHAR **pszText) {
if (node->di.swzLabel[0] == 0) {
if (node->di.swzValue[0] == 0 && node->di.bLineAbove)
- *pszText = _T("--------------------------------------");
+ *pszText = L"--------------------------------------";
else
*pszText = TranslateT("<No Label>");
}
@@ -944,7 +944,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA tvi.item.stateMask = TVIS_STATEIMAGEMASK;
tvi.item.lParam = (LPARAM)di_value;
tvi.item.state = INDEXTOSTATEIMAGEMASK(2);
- tvi.item.pszText = _T("---------------------------------");
+ tvi.item.pszText = L"---------------------------------";
HTREEITEM hItem = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS));
if (hItem)
@@ -2039,7 +2039,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
mir_tstrcat(swzProtos, buff);
- mir_tstrcat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, L" ");
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
@@ -2054,7 +2054,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
mir_tstrcat(swzProtos, buff);
- mir_tstrcat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, L" ");
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 0d57b32c73..1a238d7ba9 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -63,7 +63,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa SetTimer(hwnd, ID_TIMER_CHECKMOUSE, CHECKMOUSE_ELAPSE, 0); // register copy menu hotkey (CTRL+C) - pwd->iHotkeyId = GlobalAddAtom(_T("Tipper")); + pwd->iHotkeyId = GlobalAddAtom(L"Tipper"); RegisterHotKey(hwnd, pwd->iHotkeyId, MOD_CONTROL, 0x43); if (pwd->clcit.szProto) { @@ -99,7 +99,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // uid info TCHAR swzUid[256], swzUidName[256]; if (Uid(0, pwd->clcit.szProto, swzUid, 256) && UidName(pwd->clcit.szProto, swzUidName, 253)) { - mir_tstrcat(swzUidName, _T(": ")); + mir_tstrcat(swzUidName, L": "); AddRow(pwd, swzUidName, swzUid, NULL, false, false, false); } @@ -142,7 +142,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzAdvText(GetJabberAdvStatusText(pwd->clcit.szProto, "mood", "text")); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzAdvText, pwd->clcit.szProto, true, true, false); } } else { @@ -158,7 +158,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzAdvText(GetProtoExtraStatusMessage(pwd->clcit.szProto)); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzAdvText, pwd->clcit.szProto, true, true, false); } } } @@ -182,7 +182,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzActText(GetJabberAdvStatusText(pwd->clcit.szProto, "activity", "text")); if (swzActText) { StripBBCodesInPlace(swzActText); - AddRow(pwd, _T(""), swzActText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzActText, pwd->clcit.szProto, true, true, false); } // listening to @@ -232,7 +232,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa buff[iBuffPos] = 0; if (iBuffPos) { - AddRow(pwd, _T(""), buff, NULL, false, true, false); + AddRow(pwd, L"", buff, NULL, false, true, false); bTopMessage = true; } @@ -771,7 +771,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (iLen > MAX_VALUE_LEN) { _tcsncpy(buff, pwd->rows[i].swzValue, MAX_VALUE_LEN); buff[MAX_VALUE_LEN] = 0; - mir_tstrcat(buff, _T("...")); + mir_tstrcat(buff, L"..."); } else mir_tstrcpy(buff, pwd->rows[i].swzValue); @@ -823,7 +823,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if ((pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) || (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0])) { if (pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) { mir_tstrcat(pchData, pwd->rows[i].swzLabel); - mir_tstrcat(pchData, _T(" ")); + mir_tstrcat(pchData, L" "); } else mir_tstrcat(pchData, TranslateT("<No Label>: ")); @@ -832,7 +832,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else mir_tstrcat(pchData, TranslateT("<No Value>")); - mir_tstrcat(pchData, _T("\r\n")); + mir_tstrcat(pchData, L"\r\n"); } } } @@ -840,7 +840,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa for (int i = 0; i < pwd->iRowCount; i++) { if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { mir_tstrcat(pchData, pwd->rows[i].swzValue); - mir_tstrcat(pchData, _T("\r\n")); + mir_tstrcat(pchData, L"\r\n"); } } } @@ -1210,7 +1210,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { if (!bStatusMsg && opt.bGetNewStatusMsg) { - if (!mir_tstrcmp(pwd->rows[i].swzValue, _T("%sys:status_msg%"))) + if (!mir_tstrcmp(pwd->rows[i].swzValue, L"%sys:status_msg%")) bStatusMsg = true; } @@ -1484,7 +1484,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa iCountOnline++; iCount++; } - mir_sntprintf(buff, _T("(%d/%d)"), iCountOnline, iCount); + mir_sntprintf(buff, L"(%d/%d)", iCountOnline, iCount); } else buff[0] = 0; @@ -1540,7 +1540,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzAdvText = GetJabberAdvStatusText(pa->szModuleName, "mood", "text"); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzAdvText, pa->szModuleName, true, true, false); mir_free(swzAdvText); } } @@ -1558,7 +1558,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzAdvText = GetProtoExtraStatusMessage(pa->szModuleName); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzAdvText, pa->szModuleName, true, true, false); mir_free(swzAdvText); } } @@ -1574,7 +1574,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzActText = GetJabberAdvStatusText(pa->szModuleName, "activity", "text"); if (swzActText) { StripBBCodesInPlace(swzActText); - AddRow(pwd, _T(""), swzActText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzActText, pa->szModuleName, true, true, false); mir_free(swzActText); } } @@ -1621,7 +1621,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0); if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) { TCHAR *swzProto = a2t(proto); - mir_sntprintf(swzName, _T("%s (%s)"), swzNick, swzProto); + mir_sntprintf(swzName, L"%s (%s)", swzNick, swzProto); mir_free(swzProto); } else mir_tstrcpy(swzName, swzNick); @@ -1638,7 +1638,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa index -= iCount; if (index >= 0 && (dwItems & TRAYTIP_NUMCONTACTS) && !((opt.iFavoriteContFlags & FAVCONT_HIDE_OFFLINE) && iCountOnline == 0)) { - mir_sntprintf(buff, _T("(%d/%d)"), iCountOnline, iCount); + mir_sntprintf(buff, L"(%d/%d)", iCountOnline, iCount); pwd->rows[index].swzValue = mir_tstrdup(buff); } } @@ -1646,20 +1646,20 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_MIRANDA_UPTIME) { if (TimestampToTimeDifference(NULL, MODULE, "MirandaStartTS", buff, 64)) { - AddRow(pwd, TranslateT("Other"), _T(""), NULL, false, false, !bFirstItem, true, NULL); + AddRow(pwd, TranslateT("Other"), L"", NULL, false, false, !bFirstItem, true, NULL); AddRow(pwd, TranslateT("Miranda uptime:"), buff, NULL, false, false, false); } } if (dwItems & TRAYTIP_CLIST_EVENT && pwd->clcit.swzText) { TCHAR *pchBr = _tcschr(pwd->clcit.swzText, '\n'); - TCHAR *pchBold = _tcsstr(pwd->clcit.swzText, _T("<b>")); + TCHAR *pchBold = _tcsstr(pwd->clcit.swzText, L"<b>"); if (!pchBold || pchBold != pwd->clcit.swzText) { TCHAR swzText[256]; mir_tstrcpy(swzText, pwd->clcit.swzText); if (pchBr) swzText[pchBr - pwd->clcit.swzText] = 0; - AddRow(pwd, swzText, _T(""), NULL, false, true, false, true, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); + AddRow(pwd, swzText, L"", NULL, false, true, false, true, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); } } diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index 8ef1208a5f..92ac1e2855 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. #ifndef _POPWIN_INC
#define _POPWIN_INC
-#define POP_WIN_CLASS _T(MODULE) _T("MimTTClass")
+#define POP_WIN_CLASS _T(MODULE) L"MimTTClass"
#define PUM_GETHEIGHT (WM_USER + 0x020)
#define PUM_CALCPOS (WM_USER + 0x021)
diff --git a/plugins/TipperYM/src/preset_items.cpp b/plugins/TipperYM/src/preset_items.cpp index e079ebbf05..764264c42d 100644 --- a/plugins/TipperYM/src/preset_items.cpp +++ b/plugins/TipperYM/src/preset_items.cpp @@ -22,64 +22,64 @@ Boston, MA 02111-1307, USA. PRESETITEM presetItems[] =
{
- "account", LPGENT("Account"), LPGENT("Account:"), _T("%sys:account%"), 0, 0, 0,
- "birth", LPGENT("Birthday"), LPGENT("Birthday:"), _T("%birthday_date% (%birthday_age%) @ Next: %birthday_next%"), "birthdate", "birthage", "birthnext",
- "client", LPGENT("Client"), LPGENT("Client:"), _T("%raw:/MirVer%"), 0, 0, 0,
- "email", LPGENT("Email"), LPGENT("Email:"), _T("%raw:/e-mail%"), 0, 0, 0,
- "gender", LPGENT("Gender"), LPGENT("Gender:"), _T("%gender%"), 0, 0, 0,
- "homepage", LPGENT("Homepage"), LPGENT("Homepage:"), _T("%raw:/Homepage%"), 0, 0, 0,
- "id", LPGENT("Identifier"), _T("%sys:uidname|UID^!MetaContacts%:"), _T("%sys:uid%"), 0, 0, 0,
- "idle", LPGENT("Idle"), LPGENT("Idle:"), _T("%idle% (%idle_diff% ago)"), "idle", "idlediff", 0,
- "ip", _T("IP"), _T("IP:"), _T("%ip%"), "ip", 0, 0,
- "ipint", LPGENT("IP internal"), LPGENT("IP internal:"), _T("%ip_internal%"), "ipint", 0, 0,
- "lastmsg", LPGENT("Last message"), LPGENT("Last message: (%sys:last_msg_reltime% ago)"), _T("%sys:last_msg%"), 0, 0, 0,
- "listening", LPGENT("Listening to"), LPGENT("Listening to:"), _T("%raw:/ListeningTo%"), 0, 0, 0,
- "name", LPGENT("Name"), LPGENT("Name:"), _T("%raw:/FirstName|% %raw:/LastName%"), 0, 0, 0,
- "received", LPGENT("Number of received messages"), LPGENT("Number of msg [IN]:"), _T("%sys:msg_count_in%"), 0, 0, 0,
- "sended", LPGENT("Number of sent messages"), LPGENT("Number of msg [OUT]:"), _T("%sys:msg_count_out%"), 0, 0, 0,
- "status", LPGENT("Status"), LPGENT("Status:"), _T("%Status%"), "status", 0, 0,
- "statusmsg", LPGENT("Status message"), LPGENT("Status message:"), _T("%sys:status_msg%"), 0, 0, 0,
- "time", LPGENT("Contact time"), LPGENT("Time:"), _T("%sys:time%"), 0, 0, 0,
- "xtitle", LPGENT("xStatus title"), LPGENT("xStatus title:"), _T("%xsname%"), "xname", 0, 0,
- "xtext", LPGENT("xStatus text"), LPGENT("xStatus text:"), _T("%raw:/XStatusMsg%"), 0, 0, 0,
- "acttitle", LPGENT("[jabber.dll] Activity title"), LPGENT("Activity title:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/title%"), 0, 0, 0,
- "acttext", LPGENT("[jabber.dll] Activity text"), LPGENT("Activity text:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/text%"), 0, 0, 0,
- "lastseentime", LPGENT("[seenplugin.dll] Last seen time"), LPGENT("Last seen time:"), _T("%lastseen_date% @ %lastseen_time%"), "lsdate", "lstime", 0,
- "lastseenstatus", LPGENT("[seenplugin.dll] Last seen status"), LPGENT("Last seen status:"), _T("%lastseen_status% (%lastseen_ago% ago)"), "lsstatus", "lsago", 0,
- "cond", LPGENT("[weather.dll] Condition"), LPGENT("Condition:"), _T("%raw:Current/Condition%"), 0, 0, 0,
- "humidity", LPGENT("[weather.dll] Humidity"), LPGENT("Humidity:"), _T("%raw:Current/Humidity%"), 0, 0, 0,
- "minmaxtemp", LPGENT("[weather.dll] Max/Min temperature"), LPGENT("Max/Min:"), _T("%raw:Current/High%/%raw:Current/Low%"), 0, 0, 0,
- "moon", LPGENT("[weather.dll] Moon"), LPGENT("Moon:"), _T("%raw:Current/Moon%"), 0, 0, 0,
- "pressure", LPGENT("[weather.dll] Pressure"), LPGENT("Pressure:"), _T("%raw:Current/Pressure% (%raw:Current/Pressure Tendency%)"), 0, 0, 0,
- "sunrise", LPGENT("[weather.dll] Sunrise"), LPGENT("Sunrise:"), _T("%raw:Current/Sunrise%"), 0, 0, 0,
- "sunset", LPGENT("[weather.dll] Sunset"), LPGENT("Sunset:"), _T("%raw:Current/Sunset%"), 0, 0, 0,
- "temp", LPGENT("[weather.dll] Temperature"), LPGENT("Temperature:"), _T("%raw:Current/Temperature%"), 0, 0, 0,
- "uptime", LPGENT("[weather.dll] Update time"), LPGENT("Update time:"), _T("%raw:Current/Update%"), 0, 0, 0,
- "uvindex", LPGENT("[weather.dll] UV Index"), LPGENT("UV Index:"), _T("%raw:Current/UV% - %raw:Current/UVI%"), 0, 0, 0,
- "vis", LPGENT("[weather.dll] Visibility"), LPGENT("Visibility:"), _T("%raw:Current/Visibility%"), 0, 0, 0,
- "wind", LPGENT("[weather.dll] Wind"), LPGENT("Wind:"), _T("%raw:Current/Wind Direction% (%raw:Current/Wind Direction DEG%)/%raw:Current/Wind Speed%"), 0, 0, 0,
+ "account", LPGENT("Account"), LPGENT("Account:"), L"%sys:account%", 0, 0, 0,
+ "birth", LPGENT("Birthday"), LPGENT("Birthday:"), L"%birthday_date% (%birthday_age%) @ Next: %birthday_next%", "birthdate", "birthage", "birthnext",
+ "client", LPGENT("Client"), LPGENT("Client:"), L"%raw:/MirVer%", 0, 0, 0,
+ "email", LPGENT("Email"), LPGENT("Email:"), L"%raw:/e-mail%", 0, 0, 0,
+ "gender", LPGENT("Gender"), LPGENT("Gender:"), L"%gender%", 0, 0, 0,
+ "homepage", LPGENT("Homepage"), LPGENT("Homepage:"), L"%raw:/Homepage%", 0, 0, 0,
+ "id", LPGENT("Identifier"), L"%sys:uidname|UID^!MetaContacts%:", L"%sys:uid%", 0, 0, 0,
+ "idle", LPGENT("Idle"), LPGENT("Idle:"), L"%idle% (%idle_diff% ago)", "idle", "idlediff", 0,
+ "ip", L"IP", L"IP:", L"%ip%", "ip", 0, 0,
+ "ipint", LPGENT("IP internal"), LPGENT("IP internal:"), L"%ip_internal%", "ipint", 0, 0,
+ "lastmsg", LPGENT("Last message"), LPGENT("Last message: (%sys:last_msg_reltime% ago)"), L"%sys:last_msg%", 0, 0, 0,
+ "listening", LPGENT("Listening to"), LPGENT("Listening to:"), L"%raw:/ListeningTo%", 0, 0, 0,
+ "name", LPGENT("Name"), LPGENT("Name:"), L"%raw:/FirstName|% %raw:/LastName%", 0, 0, 0,
+ "received", LPGENT("Number of received messages"), LPGENT("Number of msg [IN]:"), L"%sys:msg_count_in%", 0, 0, 0,
+ "sended", LPGENT("Number of sent messages"), LPGENT("Number of msg [OUT]:"), L"%sys:msg_count_out%", 0, 0, 0,
+ "status", LPGENT("Status"), LPGENT("Status:"), L"%Status%", "status", 0, 0,
+ "statusmsg", LPGENT("Status message"), LPGENT("Status message:"), L"%sys:status_msg%", 0, 0, 0,
+ "time", LPGENT("Contact time"), LPGENT("Time:"), L"%sys:time%", 0, 0, 0,
+ "xtitle", LPGENT("xStatus title"), LPGENT("xStatus title:"), L"%xsname%", "xname", 0, 0,
+ "xtext", LPGENT("xStatus text"), LPGENT("xStatus text:"), L"%raw:/XStatusMsg%", 0, 0, 0,
+ "acttitle", LPGENT("[jabber.dll] Activity title"), LPGENT("Activity title:"), L"%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/title%", 0, 0, 0,
+ "acttext", LPGENT("[jabber.dll] Activity text"), LPGENT("Activity text:"), L"%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/text%", 0, 0, 0,
+ "lastseentime", LPGENT("[seenplugin.dll] Last seen time"), LPGENT("Last seen time:"), L"%lastseen_date% @ %lastseen_time%", "lsdate", "lstime", 0,
+ "lastseenstatus", LPGENT("[seenplugin.dll] Last seen status"), LPGENT("Last seen status:"), L"%lastseen_status% (%lastseen_ago% ago)", "lsstatus", "lsago", 0,
+ "cond", LPGENT("[weather.dll] Condition"), LPGENT("Condition:"), L"%raw:Current/Condition%", 0, 0, 0,
+ "humidity", LPGENT("[weather.dll] Humidity"), LPGENT("Humidity:"), L"%raw:Current/Humidity%", 0, 0, 0,
+ "minmaxtemp", LPGENT("[weather.dll] Max/Min temperature"), LPGENT("Max/Min:"), L"%raw:Current/High%/%raw:Current/Low%", 0, 0, 0,
+ "moon", LPGENT("[weather.dll] Moon"), LPGENT("Moon:"), L"%raw:Current/Moon%", 0, 0, 0,
+ "pressure", LPGENT("[weather.dll] Pressure"), LPGENT("Pressure:"), L"%raw:Current/Pressure% (%raw:Current/Pressure Tendency%)", 0, 0, 0,
+ "sunrise", LPGENT("[weather.dll] Sunrise"), LPGENT("Sunrise:"), L"%raw:Current/Sunrise%", 0, 0, 0,
+ "sunset", LPGENT("[weather.dll] Sunset"), LPGENT("Sunset:"), L"%raw:Current/Sunset%", 0, 0, 0,
+ "temp", LPGENT("[weather.dll] Temperature"), LPGENT("Temperature:"), L"%raw:Current/Temperature%", 0, 0, 0,
+ "uptime", LPGENT("[weather.dll] Update time"), LPGENT("Update time:"), L"%raw:Current/Update%", 0, 0, 0,
+ "uvindex", LPGENT("[weather.dll] UV Index"), LPGENT("UV Index:"), L"%raw:Current/UV% - %raw:Current/UVI%", 0, 0, 0,
+ "vis", LPGENT("[weather.dll] Visibility"), LPGENT("Visibility:"), L"%raw:Current/Visibility%", 0, 0, 0,
+ "wind", LPGENT("[weather.dll] Wind"), LPGENT("Wind:"), L"%raw:Current/Wind Direction% (%raw:Current/Wind Direction DEG%)/%raw:Current/Wind Speed%", 0, 0, 0,
0, 0, 0, 0, 0, 0, 0
};
PRESETSUBST presetSubsts[] =
{
- "gender", _T("gender"), DVT_PROTODB, NULL, "Gender", 5,
- "status", _T("Status"), DVT_PROTODB, NULL, "Status", 1,
- "ip", _T("ip"), DVT_PROTODB, NULL, "IP", 7,
- "ipint", _T("ip_internal"), DVT_PROTODB, NULL, "RealIP", 7,
- "idle", _T("idle"), DVT_PROTODB, NULL, "IdleTS", 2,
- "idlediff", _T("idle_diff"), DVT_PROTODB, NULL, "IdleTS", 3,
- "xname", _T("xsname"), DVT_PROTODB, NULL, "XStatusName", 17,
- "lsdate", _T("lastseen_date"), DVT_DB, "SeenModule", NULL, 8,
- "lstime", _T("lastseen_time"), DVT_DB, "SeenModule", NULL, 10,
- "lsstatus", _T("lastseen_status"), DVT_DB, "SeenModule", "OldStatus", 1,
- "lsago", _T("lastseen_ago"), DVT_DB, "SeenModule", "seenTS", 3,
- "birthdate", _T("birthday_date"), DVT_PROTODB, NULL, "Birth", 8,
- "birthage", _T("birthday_age"), DVT_PROTODB, NULL, "Birth", 9,
- "birthnext", _T("birthday_next"), DVT_PROTODB, NULL, "Birth", 12,
- "logondate", _T("logon_date"), DVT_PROTODB, NULL, "LogonTS", 15,
- "logontime", _T("logon_time"), DVT_PROTODB, NULL, "LogonTS", 13,
- "logonago", _T("logon_ago"), DVT_PROTODB, NULL, "LogonTS", 3,
+ "gender", L"gender", DVT_PROTODB, NULL, "Gender", 5,
+ "status", L"Status", DVT_PROTODB, NULL, "Status", 1,
+ "ip", L"ip", DVT_PROTODB, NULL, "IP", 7,
+ "ipint", L"ip_internal", DVT_PROTODB, NULL, "RealIP", 7,
+ "idle", L"idle", DVT_PROTODB, NULL, "IdleTS", 2,
+ "idlediff", L"idle_diff", DVT_PROTODB, NULL, "IdleTS", 3,
+ "xname", L"xsname", DVT_PROTODB, NULL, "XStatusName", 17,
+ "lsdate", L"lastseen_date", DVT_DB, "SeenModule", NULL, 8,
+ "lstime", L"lastseen_time", DVT_DB, "SeenModule", NULL, 10,
+ "lsstatus", L"lastseen_status", DVT_DB, "SeenModule", "OldStatus", 1,
+ "lsago", L"lastseen_ago", DVT_DB, "SeenModule", "seenTS", 3,
+ "birthdate", L"birthday_date", DVT_PROTODB, NULL, "Birth", 8,
+ "birthage", L"birthday_age", DVT_PROTODB, NULL, "Birth", 9,
+ "birthnext", L"birthday_next", DVT_PROTODB, NULL, "Birth", 12,
+ "logondate", L"logon_date", DVT_PROTODB, NULL, "LogonTS", 15,
+ "logontime", L"logon_time", DVT_PROTODB, NULL, "LogonTS", 13,
+ "logonago", L"logon_ago", DVT_PROTODB, NULL, "LogonTS", 3,
0, 0, DVT_DB, 0, 0, 0
};
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 5b0624a520..9f4416e51b 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -31,19 +31,19 @@ int RefreshSkinList(HWND hwndDlg) SetCurrentDirectory(SKIN_FOLDER);
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.*", &ffd);
while (hFind != INVALID_HANDLE_VALUE)
{
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName))
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(L".", ffd.cFileName) && mir_tstrcmp(L"..", ffd.cFileName))
{
SetCurrentDirectory(ffd.cFileName);
WIN32_FIND_DATA ffd2;
- HANDLE hFindFile = FindFirstFile(_T("*.tsf"), &ffd2);
+ HANDLE hFindFile = FindFirstFile(L"*.tsf", &ffd2);
if (hFindFile != INVALID_HANDLE_VALUE)
ListBox_AddString(hwndSkins, ffd.cFileName);
FindClose(hFindFile);
- SetCurrentDirectory(_T(".."));
+ SetCurrentDirectory(L"..");
}
if (!FindNextFile(hFind, &ffd))
@@ -83,12 +83,12 @@ void ParseAboutPart(FILE *fp, TCHAR *buff, TCHAR *szSkinName) if (pch)
{
- if (_tcsstr(buff, _T("author")))
+ if (_tcsstr(buff, L"author"))
{}
- else if (_tcsstr(buff, _T("preview")))
+ else if (_tcsstr(buff, L"preview"))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, szSkinName, pch);
+ mir_sntprintf(szImgPath, L"%s\\%s\\%s", SKIN_FOLDER, szSkinName, pch);
if (FileExists(szImgPath))
mir_tstrcpy(opt.szPreviewFile, szImgPath);
}
@@ -123,40 +123,40 @@ void ParseImagePart(FILE *fp, TCHAR *buff, int iPart) if (pch)
{
- if (_tcsstr(buff, _T("image")))
+ if (_tcsstr(buff, L"image"))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, opt.szSkinName, pch);
+ mir_sntprintf(szImgPath, L"%s\\%s\\%s", SKIN_FOLDER, opt.szSkinName, pch);
opt.szImgFile[iPart] = mir_tstrdup(szImgPath);
}
- else if (_tcsstr(buff, _T("tm")))
+ else if (_tcsstr(buff, L"tm"))
{
- if (!mir_tstrcmpi(pch, _T("TM_NONE")))
+ if (!mir_tstrcmpi(pch, L"TM_NONE"))
opt.transfMode[iPart] = TM_NONE;
- else if (!mir_tstrcmpi(pch, _T("TM_CENTRE")))
+ else if (!mir_tstrcmpi(pch, L"TM_CENTRE"))
opt.transfMode[iPart] = TM_CENTRE;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_ALL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_ALL"))
opt.transfMode[iPart] = TM_STRECH_ALL;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_HORIZONTAL"))
opt.transfMode[iPart] = TM_STRECH_HORIZONTAL;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_VERTICAL"))
opt.transfMode[iPart] = TM_STRECH_VERTICAL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_ALL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_ALL"))
opt.transfMode[iPart] = TM_TILE_ALL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_HORIZONTAL"))
opt.transfMode[iPart] = TM_TILE_HORIZONTAL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_VERTICAL"))
opt.transfMode[iPart] = TM_TILE_VERTICAL;
else
opt.transfMode[iPart] = TM_NONE;
}
- else if (_tcsstr(buff, _T("left")))
+ else if (_tcsstr(buff, L"left"))
opt.margins[iPart].left = _ttoi(pch);
- else if (_tcsstr(buff, _T("top")))
+ else if (_tcsstr(buff, L"top"))
opt.margins[iPart].top = _ttoi(pch);
- else if (_tcsstr(buff, _T("right")))
+ else if (_tcsstr(buff, L"right"))
opt.margins[iPart].right = _ttoi(pch);
- else if (_tcsstr(buff, _T("bottom")))
+ else if (_tcsstr(buff, L"bottom"))
opt.margins[iPart].bottom = _ttoi(pch);
}
}
@@ -171,15 +171,15 @@ char *GetSettingName(TCHAR *szValue, char *szPostfix, char *buff, size_t buffsiz {
buff[0] = 0;
- if (_tcsstr(szValue, _T("traytitle")))
+ if (_tcsstr(szValue, L"traytitle"))
mir_snprintf(buff, buffsize, "FontTrayTitle%s", szPostfix);
- else if (_tcsstr(szValue, _T("title")))
+ else if (_tcsstr(szValue, L"title"))
mir_snprintf(buff, buffsize, "FontFirst%s", szPostfix);
- else if (_tcsstr(szValue, _T("label")))
+ else if (_tcsstr(szValue, L"label"))
mir_snprintf(buff, buffsize, "FontLabels%s", szPostfix);
- else if (_tcsstr(szValue, _T("value")))
+ else if (_tcsstr(szValue, L"value"))
mir_snprintf(buff, buffsize, "FontValues%s", szPostfix);
- else if (_tcsstr(szValue, _T("divider")))
+ else if (_tcsstr(szValue, L"divider"))
mir_snprintf(buff, buffsize, "Divider%s", szPostfix);
return buff[0] ? buff : NULL;
@@ -202,7 +202,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("face")))
+ if (_tcsstr(buff, L"face"))
{
if (GetSettingName(buff, "", szSetting, sizeof(szSetting) - 1))
{
@@ -212,7 +212,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) db_set_ts(0, MODULE, szSetting, pch);
}
}
- else if (_tcsstr(buff, _T("color")))
+ else if (_tcsstr(buff, L"color"))
{
if (GetSettingName(buff, "Col", szSetting, sizeof(szSetting) - 1))
{
@@ -231,7 +231,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) }
}
}
- else if (_tcsstr(buff, _T("size")))
+ else if (_tcsstr(buff, L"size"))
{
if (GetSettingName(buff, "Size", szSetting, sizeof(szSetting) - 1))
{
@@ -241,16 +241,16 @@ void ParseFontPart(FILE *fp, TCHAR *buff) ReleaseDC(0, hdc);
}
}
- else if (_tcsstr(buff, _T("effect")))
+ else if (_tcsstr(buff, L"effect"))
{
if (GetSettingName(buff, "Sty", szSetting, sizeof(szSetting) - 1))
{
BYTE effect = 0;
- if (_tcsstr(pch, _T("font_bold")))
+ if (_tcsstr(pch, L"font_bold"))
effect |= DBFONTF_BOLD;
- if (_tcsstr(pch, _T("font_italic")))
+ if (_tcsstr(pch, L"font_italic"))
effect |= DBFONTF_ITALIC;
- if (_tcsstr(pch, _T("font_underline")))
+ if (_tcsstr(pch, L"font_underline"))
effect |= DBFONTF_UNDERLINE;
db_set_b(0, MODULE, szSetting, effect);
@@ -280,23 +280,23 @@ void ParseAppearancePart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("general-padding")))
+ if (_tcsstr(buff, L"general-padding"))
opt.iPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("title-indent")))
+ else if (_tcsstr(buff, L"title-indent"))
opt.iTitleIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("text-indent")))
+ else if (_tcsstr(buff, L"text-indent"))
opt.iTextIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("value-indent")))
+ else if (_tcsstr(buff, L"value-indent"))
opt.iValueIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("text-padding")))
+ else if (_tcsstr(buff, L"text-padding"))
opt.iTextPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("outer-avatar-padding")))
+ else if (_tcsstr(buff, L"outer-avatar-padding"))
opt.iOuterAvatarPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("inner-avatar-padding")))
+ else if (_tcsstr(buff, L"inner-avatar-padding"))
opt.iInnerAvatarPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("sidebar-width")))
+ else if (_tcsstr(buff, L"sidebar-width"))
opt.iSidebarWidth = _ttoi(pch);
- else if (_tcsstr(buff, _T("opacity")))
+ else if (_tcsstr(buff, L"opacity"))
opt.iOpacity = _ttoi(pch);
}
}
@@ -322,9 +322,9 @@ void ParseOtherPart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("enable-coloring")))
+ if (_tcsstr(buff, L"enable-coloring"))
{
- if (_tcsstr(pch, _T("false")))
+ if (_tcsstr(pch, L"false"))
opt.iEnableColoring = -1;
}
}
@@ -351,10 +351,10 @@ void ParseSkinFile(TCHAR *szSkinName, bool bStartup, bool bOnlyPreview) SetCurrentDirectory(szSkinName);
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.tsf"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.tsf", &ffd);
if (hFind != INVALID_HANDLE_VALUE)
{
- FILE *fp = _tfopen(ffd.cFileName, _T("r"));
+ FILE *fp = _tfopen(ffd.cFileName, L"r");
if (fp)
{
myfgets(buff, 1024, fp);
@@ -362,34 +362,34 @@ void ParseSkinFile(TCHAR *szSkinName, bool bStartup, bool bOnlyPreview) {
if (buff[0] == '[')
{
- if (!mir_tstrcmp(_T("[about]"), buff))
+ if (!mir_tstrcmp(L"[about]", buff))
{
ParseAboutPart(fp, buff, szSkinName);
continue;
}
- else if (!mir_tstrcmp(_T("[other]"), buff))
+ else if (!mir_tstrcmp(L"[other]", buff))
{
ParseOtherPart(fp, buff);
continue;
}
else if (!bOnlyPreview)
{
- if (!mir_tstrcmp(_T("[background]"), buff))
+ if (!mir_tstrcmp(L"[background]", buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_BG);
continue;
}
- else if (!mir_tstrcmp(_T("[sidebar]"), buff))
+ else if (!mir_tstrcmp(L"[sidebar]", buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_SIDEBAR);
continue;
}
- else if (!bStartup && opt.bLoadFonts && !mir_tstrcmp(_T("[fonts]"), buff))
+ else if (!bStartup && opt.bLoadFonts && !mir_tstrcmp(L"[fonts]", buff))
{
ParseFontPart(fp, buff);
continue;
}
- else if (!bStartup && opt.bLoadProportions && !mir_tstrcmp(_T("[appearance]"), buff))
+ else if (!bStartup && opt.bLoadProportions && !mir_tstrcmp(L"[appearance]", buff))
{
ParseAppearancePart(fp, buff);
continue;
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 070583c60b..fb0674de07 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -96,21 +96,21 @@ void StripBBCodesInPlace(TCHAR *ptszText) if (iRead > iLen) break; - if (iLen - iRead >= 3 && (_tcsnicmp(ptszText + iRead, _T("[b]"), 3) == 0 || _tcsnicmp(ptszText + iRead, _T("[i]"), 3) == 0)) + if (iLen - iRead >= 3 && (_tcsnicmp(ptszText + iRead, L"[b]", 3) == 0 || _tcsnicmp(ptszText + iRead, L"[i]", 3) == 0)) iRead += 3; - else if (iLen - iRead >= 4 && (_tcsnicmp(ptszText + iRead, _T("[/b]"), 4) == 0 || _tcsnicmp(ptszText + iRead, _T("[/i]"), 4) == 0)) + else if (iLen - iRead >= 4 && (_tcsnicmp(ptszText + iRead, L"[/b]", 4) == 0 || _tcsnicmp(ptszText + iRead, L"[/i]", 4) == 0)) iRead += 4; - else if (iLen - iRead >= 6 && (_tcsnicmp(ptszText + iRead, _T("[color"), 6) == 0)) { + else if (iLen - iRead >= 6 && (_tcsnicmp(ptszText + iRead, L"[color", 6) == 0)) { while (iRead < iLen && ptszText[iRead] != ']') iRead++; iRead++;// skip the ']' } - else if (iLen - iRead >= 8 && (_tcsnicmp(ptszText + iRead, _T("[/color]"), 8) == 0)) + else if (iLen - iRead >= 8 && (_tcsnicmp(ptszText + iRead, L"[/color]", 8) == 0)) iRead += 8; - else if (iLen - iRead >= 5 && (_tcsnicmp(ptszText + iRead, _T("[size"), 5) == 0)) { + else if (iLen - iRead >= 5 && (_tcsnicmp(ptszText + iRead, L"[size", 5) == 0)) { while (iRead < iLen && ptszText[iRead] != ']') iRead++; iRead++;// skip the ']' } - else if (iLen - iRead >= 7 && (_tcsnicmp(ptszText + iRead, _T("[/size]"), 7) == 0)) + else if (iLen - iRead >= 7 && (_tcsnicmp(ptszText + iRead, L"[/size]", 7) == 0)) iRead += 7; else { if (ptszText[iRead] != ptszText[iWrite]) ptszText[iWrite] = ptszText[iRead]; @@ -250,20 +250,20 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff { bool recv = false; - if (!mir_tstrcmp(swzRawSpec, _T("uid"))) + if (!mir_tstrcmp(swzRawSpec, L"uid")) return Uid(hContact, 0, buff, bufflen); - if (!mir_tstrcmp(swzRawSpec, _T("proto"))) { + if (!mir_tstrcmp(swzRawSpec, L"proto")) { char *szProto = GetContactProto(hContact); if (szProto) { a2t(szProto, buff, bufflen); return true; } } - else if (!mir_tstrcmp(swzRawSpec, _T("account"))) { + else if (!mir_tstrcmp(swzRawSpec, L"account")) { char *szProto = Proto_GetBaseAccountName(hContact); if ((INT_PTR)szProto == CALLSERVICE_NOTFOUND) { - return GetSysSubstText(hContact, _T("proto"), buff, bufflen); + return GetSysSubstText(hContact, L"proto", buff, bufflen); } else if (szProto) { PROTOACCOUNT *pa = Proto_GetAccount(szProto); @@ -272,18 +272,18 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } else - return GetSysSubstText(hContact, _T("proto"), buff, bufflen); + return GetSysSubstText(hContact, L"proto", buff, bufflen); } } - else if (!mir_tstrcmp(swzRawSpec, _T("time"))) { - if (!printDateTimeByContact(hContact, _T("t"), buff, bufflen, TZF_KNOWNONLY)) + else if (!mir_tstrcmp(swzRawSpec, L"time")) { + if (!printDateTimeByContact(hContact, L"t", buff, bufflen, TZF_KNOWNONLY)) return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("uidname"))) { + else if (!mir_tstrcmp(swzRawSpec, L"uidname")) { char *szProto = GetContactProto(hContact); return UidName(szProto, buff, bufflen); } - else if (!mir_tstrcmp(swzRawSpec, _T("status_msg"))) { + else if (!mir_tstrcmp(swzRawSpec, L"status_msg")) { TCHAR *swzMsg = GetStatusMessageText(hContact); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -291,7 +291,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out")) { TCHAR *swzMsg = GetLastMessageText(hContact, recv); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -299,7 +299,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subname"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subname")) { // get contact list name of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact) @@ -310,32 +310,32 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff _tcsncpy(buff, swzNick, bufflen); return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subuid"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subuid")) { MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; return Uid(hSubContact, 0, buff, bufflen); } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subproto"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subproto")) { // get protocol of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; - return GetSysSubstText(hSubContact, _T("account"), buff, bufflen); + return GetSysSubstText(hSubContact, L"account", buff, bufflen); } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_time"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_time"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_time")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_time")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "t", buff, bufflen); return true; } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_date"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_date"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_date")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_date")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "d", buff, bufflen); return true; } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_reltime"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_reltime"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_reltime")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_reltime")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; DWORD t = (DWORD)time(0); @@ -348,7 +348,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff else mir_sntprintf(buff, bufflen, TranslateT("%dm"), m); return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_all")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_out")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) { + else if (!mir_tstrcmp(swzRawSpec, L"msg_count_all") || !mir_tstrcmp(swzRawSpec, L"msg_count_out") || !mir_tstrcmp(swzRawSpec, L"msg_count_in")) { DWORD dwCountOut, dwCountIn; DWORD dwMetaCountOut = 0, dwMetaCountIn = 0; DWORD dwLastTs, dwNewTs, dwRecountTs; @@ -406,12 +406,12 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff dwMetaCountIn += dwCountIn; } - if (!mir_tstrcmp(swzRawSpec, _T("msg_count_out"))) - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut); - else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountIn); + if (!mir_tstrcmp(swzRawSpec, L"msg_count_out")) + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountOut); + else if (!mir_tstrcmp(swzRawSpec, L"msg_count_in")) + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountIn); else - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut + dwMetaCountIn); + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountOut + dwMetaCountIn); return true; } @@ -533,7 +533,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (!last) last = p; while (p <= last + 1) { - len = (int)_tcscspn(p, _T(",")); + len = (int)_tcscspn(p, L","); t2a(p, sproto, len); sproto[len] = 0; p += len + 1; @@ -555,13 +555,13 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (p) { *p = 0; // clip swzAlt from swzVName p++; - if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("raw:"), 4) == 0) { // raw db substitution + if (mir_tstrlen(p) > 4 && _tcsncmp(p, L"raw:", 4) == 0) { // raw db substitution char raw_spec[LABEL_LEN]; p += 4; t2a(p, raw_spec, LABEL_LEN); GetRawSubstText(hContact, raw_spec, swzAlt, VALUE_LEN); } - else if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("sys:"), 4) == 0) { // 'system' substitution + else if (mir_tstrlen(p) > 4 && _tcsncmp(p, L"sys:", 4) == 0) { // 'system' substitution p += 4; GetSysSubstText(hContact, p, swzAlt, VALUE_LEN); } @@ -588,13 +588,13 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF } // get bSubst text - if (v > 4 && _tcsncmp(swzVName, _T("raw:"), 4) == 0) // raw db substitution + if (v > 4 && _tcsncmp(swzVName, L"raw:", 4) == 0) // raw db substitution { char raw_spec[LABEL_LEN]; t2a(&swzVName[4], raw_spec, LABEL_LEN); bSubst = GetRawSubstText(hContact, raw_spec, swzRep, VALUE_LEN); } - else if (v > 4 && _tcsncmp(swzVName, _T("sys:"), 4) == 0) // 'system' substitution + else if (v > 4 && _tcsncmp(swzVName, L"sys:", 4) == 0) // 'system' substitution { bSubst = GetSysSubstText(hContact, &swzVName[4], swzRep, VALUE_LEN); } @@ -679,7 +679,7 @@ void TruncateString(TCHAR *ptszText) if (ptszText && opt.iLimitCharCount > 3) { if ((int)mir_tstrlen(ptszText) > opt.iLimitCharCount) { ptszText[opt.iLimitCharCount - 3] = 0; - mir_tstrcat(ptszText, _T("...")); + mir_tstrcat(ptszText, L"..."); } } } diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index b660fb298a..125867150e 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -254,7 +254,7 @@ int ModulesLoaded(WPARAM, LPARAM) hFolderChanged = HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
- hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Tipper"), MIRANDA_PATHT _T("\\") _T(DEFAULT_SKIN_FOLDER));
+ hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Tipper"), MIRANDA_PATHT L"\\" _T(DEFAULT_SKIN_FOLDER));
FoldersGetCustomPathT(hSkinFolder, SKIN_FOLDER, _countof(SKIN_FOLDER), _T(DEFAULT_SKIN_FOLDER));
InitTipperSmileys();
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 8e85ebd902..b89c3c2b07 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -39,7 +39,7 @@ void AddTranslation(DBVTranslation *newTrans) char szSetting[256];
mir_snprintf(szSetting, sizeof(szSetting),"Trans_%s",szName);
- if (mir_tstrcmp(newTrans->swzName, _T("[No translation]")) == 0)
+ if (mir_tstrcmp(newTrans->swzName, L"[No translation]") == 0)
{
translations[iTransFuncsCount - 1].id = 0;
}
@@ -76,7 +76,7 @@ TCHAR* TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const c if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("d"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"d", buff, bufflen);
}
TCHAR* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -85,7 +85,7 @@ TCHAR* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const ch if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("D"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"D", buff, bufflen);
}
TCHAR* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -94,7 +94,7 @@ TCHAR* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char * if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("s"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"s", buff, bufflen);
}
TCHAR* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -103,7 +103,7 @@ TCHAR* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("t"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"t", buff, bufflen);
}
TCHAR* TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -158,9 +158,9 @@ TCHAR *ByteToYesNo(MCONTACT hContact, const char *szModuleName, const char *szSe if (dbv.type == DBVT_BYTE)
{
if (dbv.bVal != 0)
- _tcsncpy(buff, _T("Yes"), bufflen);
+ _tcsncpy(buff, L"Yes", bufflen);
else
- _tcsncpy(buff, _T("No"), bufflen);
+ _tcsncpy(buff, L"No", bufflen);
buff[bufflen - 1] = 0;
db_free(&dbv);
return buff;
@@ -204,7 +204,7 @@ TCHAR *DwordToIp(MCONTACT hContact, const char *szModuleName, const char *szSett DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
unsigned char *ipc = (unsigned char*)&ip;
- mir_sntprintf(buff, bufflen, _T("%u.%u.%u.%u"), ipc[3], ipc[2], ipc[1], ipc[0]);
+ mir_sntprintf(buff, bufflen, L"%u.%u.%u.%u", ipc[3], ipc[2], ipc[1], ipc[0]);
return buff;
}
return 0;
@@ -259,7 +259,7 @@ TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const cha time.tm_mon = month - 1;
time.tm_year = year - 1900;
- _tcsftime(buff, bufflen, _T("%x"), &time);
+ _tcsftime(buff, bufflen, L"%x", &time);
return buff;
@@ -306,7 +306,7 @@ TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char int age = now.wYear - year;
if (now.wMonth < month || (now.wMonth == month && now.wDay < day))
age--;
- mir_sntprintf(buff, bufflen, _T("%d"), age);
+ mir_sntprintf(buff, bufflen, L"%d", age);
return buff;
}
else
|