summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/Popup
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (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/Popup')
-rw-r--r--plugins/Popup/src/avatars.cpp2
-rw-r--r--plugins/Popup/src/bitmap_funcs.cpp8
-rw-r--r--plugins/Popup/src/common.h2
-rw-r--r--plugins/Popup/src/font.cpp2
-rw-r--r--plugins/Popup/src/formula.h2
-rw-r--r--plugins/Popup/src/history.cpp4
-rw-r--r--plugins/Popup/src/main.cpp6
-rw-r--r--plugins/Popup/src/opt_adv.cpp4
-rw-r--r--plugins/Popup/src/opt_class.cpp4
-rw-r--r--plugins/Popup/src/opt_gen.cpp16
-rw-r--r--plugins/Popup/src/opt_skins.cpp20
-rw-r--r--plugins/Popup/src/popup_thread.cpp4
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp22
-rw-r--r--plugins/Popup/src/services.cpp6
-rw-r--r--plugins/Popup/src/skin.cpp86
15 files changed, 94 insertions, 94 deletions
diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp
index 4af7fe944a..4f278f3572 100644
--- a/plugins/Popup/src/avatars.cpp
+++ b/plugins/Popup/src/avatars.cpp
@@ -29,7 +29,7 @@ PopupAvatar *PopupAvatar::create(MCONTACT hContact)
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (av && (mir_tstrlen(av->szFilename) > 4))
- if (!mir_tstrcmpi(av->szFilename + mir_tstrlen(av->szFilename) - 4, _T(".gif")))
+ if (!mir_tstrcmpi(av->szFilename + mir_tstrlen(av->szFilename) - 4, L".gif"))
if (db_get_b(NULL, MODULNAME, "EnableGifAnimation", 1) && GDIPlus_IsAnimatedGIF(av->szFilename))
return new GifAvatar(hContact);
}
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp
index a4f87e9c28..547ab99a0f 100644
--- a/plugins/Popup/src/bitmap_funcs.cpp
+++ b/plugins/Popup/src/bitmap_funcs.cpp
@@ -680,7 +680,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn)
{
allocate(1, 1);
int r, g, b, a = 255;
- const TCHAR *p = fn + mir_tstrlen(_T("pixel:"));
+ const TCHAR *p = fn + mir_tstrlen(L"pixel:");
r = (hex2dec(p[0]) << 4) + hex2dec(p[1]);
g = (hex2dec(p[2]) << 4) + hex2dec(p[3]);
b = (hex2dec(p[4]) << 4) + hex2dec(p[5]);
@@ -690,7 +690,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn)
bool MyBitmap::loadFromFile_gradient(const TCHAR *fn)
{
- const TCHAR *p = fn + mir_tstrlen(_T("gradient:"));
+ const TCHAR *p = fn + mir_tstrlen(L"gradient:");
if (*p == 'h') allocate(256, 1);
else allocate(1, 256);
@@ -724,10 +724,10 @@ bool MyBitmap::loadFromFile(const TCHAR *fn)
{
if (bits) freemem();
- if (!_tcsncmp(fn, _T("pixel:"), mir_tstrlen(_T("pixel:"))))
+ if (!_tcsncmp(fn, L"pixel:", mir_tstrlen(L"pixel:")))
return loadFromFile_pixel(fn);
- if (!_tcsncmp(fn, _T("gradient:"), mir_tstrlen(_T("gradient:"))))
+ if (!_tcsncmp(fn, L"gradient:", mir_tstrlen(L"gradient:")))
return loadFromFile_gradient(fn);
SIZE sz;
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h
index df079a3c9d..28eac5417f 100644
--- a/plugins/Popup/src/common.h
+++ b/plugins/Popup/src/common.h
@@ -42,7 +42,7 @@ inline void GetBmpSize(HBITMAP hbm, SIZE *sz)
inline void DebugMsg(LPTSTR msg){
if (PopupOptions.debug){
- MessageBox(NULL, msg, _T("debug"), MB_OK);
+ MessageBox(NULL, msg, L"debug", MB_OK);
}
}
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index 9a256efe23..5c76722063 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -37,7 +37,7 @@ void InitFonts()
fid.deffontsettings.size = -11;
mir_tstrncpy(fid.backgroundGroup, _T(PU_FNT_AND_COLOR), _countof(fid.backgroundGroup));
mir_tstrncpy(fid.backgroundName, PU_COL_BACK_NAME, _countof(fid.backgroundName));
- mir_tstrncpy(fid.deffontsettings.szFace, _T("Tahoma"), _countof(fid.deffontsettings.szFace));
+ mir_tstrncpy(fid.deffontsettings.szFace, L"Tahoma", _countof(fid.deffontsettings.szFace));
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TITLE), _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h
index 7be33d1d23..a73908dd77 100644
--- a/plugins/Popup/src/formula.h
+++ b/plugins/Popup/src/formula.h
@@ -79,7 +79,7 @@ private:
int eval_atom(TCHAR *&s, Args *args, bool *vars) const;
public:
- Formula() :m_str(mir_tstrdup(_T(""))) {}
+ Formula() :m_str(mir_tstrdup(L"")) {}
Formula(TCHAR *s) :m_str(mir_tstrdup(s)) {}
~Formula() { mir_free(m_str); }
void set(TCHAR *s){ mir_free(m_str); m_str = mir_tstrdup(s); }
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp
index e341bc103b..daf8e90a73 100644
--- a/plugins/Popup/src/history.cpp
+++ b/plugins/Popup/src/history.cpp
@@ -128,7 +128,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
oldWidth = 0;
HWND hwndList = GetDlgItem(hwnd, IDC_POPUP_LIST);
for (int i = 0; i < arPopupHistory.getCount(); ++i)
- ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, _T("")), 0);
+ ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, L""), 0);
Window_SetIcon_IcoLib(hwnd, GetIconHandle(IDI_HISTORY));
@@ -392,7 +392,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
PostMessage(hwnd, UM_RESIZELIST, 0, 0);
return TRUE;
}
- ListBox_SetItemData(hwndLog, ListBox_AddString(hwndLog, _T("")), 0);
+ ListBox_SetItemData(hwndLog, ListBox_AddString(hwndLog, L""), 0);
}
return TRUE;
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 793b33f097..39e20dae06 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -259,7 +259,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
// hook TopToolBar
HookEvent(ME_TTB_MODULELOADED, TTBLoaded);
// Folder plugin support
- folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT _T("\\Skins\\Popup"));
+ folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT L"\\Skins\\Popup");
// load skin
skins.load();
const PopupSkin *skin;
@@ -331,7 +331,7 @@ MIRAPI int Load(void)
LoadGDIPlus();
// Transparent and animation routines
- hDwmapiDll = LoadLibrary(_T("dwmapi.dll"));
+ hDwmapiDll = LoadLibrary(L"dwmapi.dll");
MyDwmEnableBlurBehindWindow = 0;
if (hDwmapiDll)
MyDwmEnableBlurBehindWindow = (HRESULT(WINAPI *)(HWND, DWM_BLURBEHIND *))GetProcAddress(hDwmapiDll, "DwmEnableBlurBehindWindow");
@@ -429,7 +429,7 @@ MIRAPI int Unload(void)
SrmmMenu_Unload();
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupWnd2), hInst);
- UnregisterClass(_T("PopupEditBox"), hInst);
+ UnregisterClass(L"PopupEditBox", hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupMenuHostWnd), hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupThreadManagerWnd), hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupPreviewBoxWndclass), hInst);
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index 461aa3d278..48c3c75b59 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -161,7 +161,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETPOS, TRUE, PopupOptions.Alpha);
mir_subclassWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER), AlphaTrackBarWndProc);
- mir_sntprintf(tstr, _T("%d%%"), Byte2Percentile(PopupOptions.Alpha));
+ mir_sntprintf(tstr, L"%d%%", Byte2Percentile(PopupOptions.Alpha));
SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr);
CheckDlgButton(hwnd, IDC_TRANS_OPAQUEONHOVER, PopupOptions.OpaqueOnHover ? BST_CHECKED : BST_UNCHECKED);
{
@@ -341,7 +341,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int iEffect = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
PopupOptions.UseEffect = (iEffect != -2) ? TRUE : FALSE;
mir_free(PopupOptions.Effect);
- PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : _T(""));
+ PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : L"");
BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1), enable);
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index 8c6a1943a9..abfb394d88 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -191,11 +191,11 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (p->typ == 1) { // Treeview part for typ 1 (notification)
iconIndex = ImageList_ReplaceIcon(hImgLst, -1, IcoLib_GetIconByHandle(p->hIcoLib));
- mir_sntprintf(itemName, _T("%s/%s"), p->pszTreeRoot, p->pszDescription);
+ mir_sntprintf(itemName, L"%s/%s", p->pszTreeRoot, p->pszDescription);
}
else { // Treeview part typ 2 (popup class api)
iconIndex = ImageList_ReplaceIcon(hImgLst, -1, p->pupClass.hIcon);
- mir_sntprintf(itemName, _T("%s/%s"), LPGENT("CLASS Plugins"), p->pszDescription);
+ mir_sntprintf(itemName, L"%s/%s", LPGENT("CLASS Plugins"), p->pszDescription);
}
OptTree_AddItem(hwndTree, itemName, (LPARAM)p, iconIndex);
}
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index 200a2c6467..d10a95f507 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -52,7 +52,7 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag)
options[pos].iconIndex = 0;
mir_tstrcpy(options[pos].pszOptionName, prefix);
- mir_tstrcat(options[pos].pszOptionName, _T("/"));
+ mir_tstrcat(options[pos].pszOptionName, L"/");
switch (flag)
{
case PF2_IDLE: mir_tstrcat(options[pos].pszOptionName, LPGENT("Offline")); break;
@@ -181,7 +181,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup area"), BATF_TCHAR);
+ SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_TCHAR);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_RESIZE));
}
// Spreading combobox
@@ -225,7 +225,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
continue;
TCHAR prefix[128];
- mir_sntprintf(prefix, LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(prefix, LPGENT("Protocol Status")L"/%s", protocols[i]->tszAccountName);
pos = AddStatusModes(statusOptions, pos, prefix, protoFlags);
}
}
@@ -243,7 +243,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
mir_snprintf(prefix, "Protocol Status/%s", protocols[i]->szModuleName);
TCHAR pszSettingName[256];
- mir_sntprintf(pszSettingName, LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(pszSettingName, LPGENT("Protocol Status")L"/%s", protocols[i]->tszAccountName);
OptTree_SetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, db_get_dw(NULL, MODULNAME, prefix, 0), pszSettingName);
}
}
@@ -529,11 +529,11 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
mir_snprintf(prefix, "Protocol Status/%s", protocols[i]->szModuleName);
TCHAR pszSettingName[256];
- mir_sntprintf(pszSettingName, _T("Protocol Status/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(pszSettingName, L"Protocol Status/%s", protocols[i]->tszAccountName);
db_set_dw(NULL, MODULNAME, prefix, OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, pszSettingName));
}
}
- db_set_dw(NULL, MODULNAME, "Global Status", OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, _T("Global Status")));
+ db_set_dw(NULL, MODULNAME, "Global Status", OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, L"Global Status"));
}
return TRUE;
}
@@ -626,11 +626,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hFontTitle, TRUE);
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)_T("OK"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_OK));
SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)_T("Cancel"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_CLOSE));
SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 70284a3f37..867d70319b 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -54,9 +54,9 @@ void RegisterOptPrevBox()
// register custom class for dialog box with drop-shadow attribute
// "#32770" stays for class name of default system dialog box
- GetClassInfoEx(hInst, _T("#32770"), &wcl);
+ GetClassInfoEx(hInst, L"#32770", &wcl);
wcl.hInstance = hInst;
- wcl.lpszClassName = _T("PopupPlusDlgBox");
+ wcl.lpszClassName = L"PopupPlusDlgBox";
wcl.style |= CS_DROPSHADOW;
g_wndClass.cPopupPlusDlgBox = RegisterClassEx(&wcl);
err = GetLastError();
@@ -184,11 +184,11 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos
options[pos].dwFlag = (DWORD)(1 << (i - 1));
options[pos].groupId = OPTTREE_CHECK;
options[pos].iconIndex = 0;
- options[pos].pszSettingName = mir_tstrdup(_T("Skin options"));
+ options[pos].pszSettingName = mir_tstrdup(L"Skin options");
options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
mir_tstrlen(options[pos].pszSettingName) +
mir_strlen(skin->getFlagName(i)) + 10));
- wsprintf(options[pos].pszOptionName, _T("%s/%hs"), options[pos].pszSettingName, skin->getFlagName(i)); // !!!!!!!!!!!!!
+ wsprintf(options[pos].pszOptionName, L"%s/%hs", options[pos].pszSettingName, skin->getFlagName(i)); // !!!!!!!!!!!!!
options[pos].bState = skin->getFlag(i) ? TRUE : FALSE;
options[pos].Data = i; // skin flag index
*dwGlobalOptions |= skin->getFlag(i) ? (1 << (i - 1)) : 0;
@@ -203,7 +203,7 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos
static LPTSTR mainOption[] = {
LPGENT("Show clock"),
LPGENT("Drop shadow effect"),
- LPGENT("Drop shadow effect") _T("/") LPGENT("non rectangular"),
+ LPGENT("Drop shadow effect") L"/" LPGENT("non rectangular"),
LPGENT("Enable Aero Glass (Vista+)"),
LPGENT("Use Windows colors"),
LPGENT("Use advanced text render") };
@@ -249,7 +249,7 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos,
options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
mir_tstrlen(options[pos].pszSettingName) +
mir_tstrlen(mainOption[i]) + 10));
- wsprintf(options[pos].pszOptionName, _T("%s/%s"), options[pos].pszSettingName, mainOption[i]); // !!!!!!!!!!!!!
+ wsprintf(options[pos].pszOptionName, L"%s/%s", options[pos].pszSettingName, mainOption[i]); // !!!!!!!!!!!!!
options[pos].bState = bCheck;
pos++;
}
@@ -282,11 +282,11 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn
char prefix[128];
mir_snprintf(prefix, "skin.%S", PopupOptions.SkinPack);
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
- db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
+ db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), L"Skin options");
// check "Global Settings"
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
- dwGlobalOptions, _T("Global settings"));
+ dwGlobalOptions, L"Global settings");
return true;
}
@@ -314,13 +314,13 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int index = -1;
OptTree_ProcessMessage(hwndDlg, msg, wParam, lParam, &index, IDC_SKIN_LIST_OPT, skinOptions, skinOptionsCount);
if (index != -1) {
- if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
+ if (mir_tstrcmp(skinOptions[index].pszSettingName, L"Skin options") == 0) {
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack)) {
skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false);
}
}
- else if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
+ else if (mir_tstrcmp(skinOptions[index].pszSettingName, L"Global settings") == 0) {
switch (skinOptions[index].dwFlag) {
case (1 << 0) :
PopupOptions.DisplayTime = skinOptions[index].bState;
diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp
index 0a0c468aaa..6b2a5e70bd 100644
--- a/plugins/Popup/src/popup_thread.cpp
+++ b/plugins/Popup/src/popup_thread.cpp
@@ -226,7 +226,7 @@ static unsigned __stdcall PopupThread(void *)
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("PopupThreadManagerWnd");
+ wcl.lpszClassName = L"PopupThreadManagerWnd";
wcl.hIconSm = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
g_wndClass.cPopupThreadManagerWnd = RegisterClassEx(&wcl);
err = GetLastError();
@@ -236,7 +236,7 @@ static unsigned __stdcall PopupThread(void *)
MSGERROR(msg);
}
- gHwndManager = CreateWindow(_T("PopupThreadManagerWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
+ gHwndManager = CreateWindow(L"PopupThreadManagerWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowPos(gHwndManager, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
MSG msg;
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index d0db367d5a..1527c641de 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -67,10 +67,10 @@ bool LoadPopupWnd2()
WNDCLASSEX wclw = { 0 };
wclw.cbSize = sizeof(wclw);
- if (!GetClassInfoEx(NULL, _T("EDIT"), &wclw))
+ if (!GetClassInfoEx(NULL, L"EDIT", &wclw))
MSGERROR(TranslateT("Failed to GetClassInfoExW from EDIT class."));
wclw.hInstance = hInst;
- wclw.lpszClassName = _T("PopupEditBox");
+ wclw.lpszClassName = L"PopupEditBox";
wclw.style |= CS_DROPSHADOW;
g_wndClass.cPopupEditBox = RegisterClassEx(&wclw);
err = GetLastError();
@@ -94,7 +94,7 @@ bool LoadPopupWnd2()
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("PopupMenuHostWnd");
+ wcl.lpszClassName = L"PopupMenuHostWnd";
wcl.hIconSm = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
g_wndClass.cPopupMenuHostWnd = RegisterClassEx(&wcl);
err = GetLastError();
@@ -105,7 +105,7 @@ bool LoadPopupWnd2()
MSGERROR(msg);
}
- ghwndMenuHost = CreateWindow(_T("PopupMenuHostWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
+ ghwndMenuHost = CreateWindow(L"PopupMenuHostWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowPos(ghwndMenuHost, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
INITCOMMONCONTROLSEX iccex;
@@ -697,7 +697,7 @@ void PopupWnd2::updateData(POPUPDATAW_V2 *ppd)
m_PluginWindowProc = ppd->PluginWindowProc;
if (m_options->DisplayTime)
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), m_time, _countof(m_time));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", m_time, _countof(m_time));
else m_time[0] = 0;
fixDefaults();
@@ -737,9 +737,9 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd)
if (m_options->DisplayTime) {
if (ppd->dwTimestamp)
- TimeZone_ToStringT(ppd->dwTimestamp, _T("t"), m_time, _countof(m_time));
+ TimeZone_ToStringT(ppd->dwTimestamp, L"t", m_time, _countof(m_time));
else
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), m_time, _countof(m_time));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", m_time, _countof(m_time));
}
else m_time[0] = 0;
@@ -919,7 +919,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
GetWindowRect(m_hwnd, &rc);
{
HWND hwndEditBox = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
- g_wndClass.cPopupEditBox ? _T("PopupEditBox") : _T("EDIT"),
+ g_wndClass.cPopupEditBox ? L"PopupEditBox" : L"EDIT",
NULL,
WS_BORDER | WS_POPUP | WS_VISIBLE | ES_AUTOVSCROLL | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL | ES_WANTRETURN,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInst, NULL);
@@ -977,9 +977,9 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
- CMString tszText(FORMAT, _T("%s\n\n%s"),
- (m_lptzTitle) ? m_lptzTitle : _T(""),
- (m_lptzText) ? m_lptzText : _T(""));
+ CMString tszText(FORMAT, L"%s\n\n%s",
+ (m_lptzTitle) ? m_lptzTitle : L"",
+ (m_lptzText) ? m_lptzText : L"");
if (OpenClipboard(m_hwnd)) {
EmptyClipboard();
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 4be78c8a12..ce5b1da030 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -381,12 +381,12 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
FontIDT fid = { 0 };
fid.cbSize = sizeof(FontIDT);
- mir_sntprintf(fid.group, _T(PU_FNT_AND_COLOR)_T("/%S"), ptd->pupClass.pszName);
+ mir_sntprintf(fid.group, _T(PU_FNT_AND_COLOR)L"/%S", ptd->pupClass.pszName);
mir_strncpy(fid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup) - 1);
fid.flags = FIDF_DEFAULTVALID;
fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
- mir_tstrncpy(fid.deffontsettings.szFace, _T("Verdana"), _countof(fid.deffontsettings.szFace) - 1);
+ mir_tstrncpy(fid.deffontsettings.szFace, L"Verdana", _countof(fid.deffontsettings.szFace) - 1);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TEXT), _countof(fid.name) - 1);
mir_strncpy(fid.prefix, setting, _countof(fid.prefix));
mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
@@ -399,7 +399,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam)
ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
ColourIDT cid = { 0 };
cid.cbSize = sizeof(ColourIDT);
- mir_sntprintf(cid.group, _T(PU_FNT_AND_COLOR)_T("/%S"), ptd->pupClass.pszName);
+ mir_sntprintf(cid.group, _T(PU_FNT_AND_COLOR)L"/%S", ptd->pupClass.pszName);
mir_strncpy(cid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup));
mir_tstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_snprintf(cid.setting, "%s/BgCol", ptd->pupClass.pszName);
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index f2d1e715de..96913d57cf 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -65,7 +65,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const
TCHAR *str = TranslateTS(wname);
GetTextExtentPoint32(hdc, str, (int)mir_tstrlen(str), &szText);
mir_free(wname);
- GetTextExtentPoint32(hdc, _T(" "), 1, &szSpace);
+ GetTextExtentPoint32(hdc, L" ", 1, &szSpace);
sz.cy = max(sz.cy, szText.cy);
sz.cx += szSpace.cx;
@@ -122,7 +122,7 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h
SetTextColor(bmp->getDC(), hover ? fonts.clActionHover : fonts.clAction);
SetBkMode(bmp->getDC(), TRANSPARENT);
- GetTextExtentPoint32(bmp->getDC(), _T(" "), 1, &szSpace);
+ GetTextExtentPoint32(bmp->getDC(), L" ", 1, &szSpace);
LPTSTR wname = mir_a2t(name);
TCHAR *str = TranslateTS(wname);
@@ -748,7 +748,7 @@ void PopupSkin::loadOptions(std::wistream &f)
f.ignore(1024, '\n');
continue;
}
- if (!mir_tstrcmp(buf, _T("option"))) {
+ if (!mir_tstrcmp(buf, L"option")) {
int id, val;
f >> id >> val;
f.getline(buf, 1024);
@@ -767,7 +767,7 @@ void PopupSkin::loadOptions(std::wistream &f)
else
m_flags &= ~(1 << id);
}
- else if (!mir_tstrcmp(buf, _T("end")))
+ else if (!mir_tstrcmp(buf, L"end"))
break;
}
delete[] buf;
@@ -783,8 +783,8 @@ bool PopupSkin::load(LPCTSTR dir)
}
m_flags = 0;
- if (!_tcsncmp(_T("res:"), dir, 4)) // resource
- loadSkin(dir + 4, _T("Skin"));
+ if (!_tcsncmp(L"res:", dir, 4)) // resource
+ loadSkin(dir + 4, L"Skin");
else { // filesystem
// skin info
TCHAR dir_save[1024];
@@ -799,7 +799,7 @@ bool PopupSkin::load(LPCTSTR dir)
}
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.popupskin"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.popupskin", &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
loadSkin(ffd.cFileName);
if (!FindNextFile(hFind, &ffd))
@@ -840,40 +840,40 @@ void PopupSkin::loadSkin(std::wistream &f)
continue;
}
- if (!mir_tstrcmp(buf, _T("popup-version"))) {
+ if (!mir_tstrcmp(buf, L"popup-version")) {
f >> m_popup_version;
m_popup_version = PLUGIN_MAKE_VERSION((m_popup_version / 1000000) % 100, (m_popup_version / 10000) % 100, (m_popup_version / 100) % 100, (m_popup_version / 1) % 100);
if (!isCompatible())
break;
}
- else if (!mir_tstrcmp(buf, _T("padding-right"))) {
+ else if (!mir_tstrcmp(buf, L"padding-right")) {
f >> m_right_gap;
}
- else if (!mir_tstrcmp(buf, _T("padding-bottom"))) {
+ else if (!mir_tstrcmp(buf, L"padding-bottom")) {
f >> m_bottom_gap;
}
- else if (!mir_tstrcmp(buf, _T("shadow-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, L"shadow-region-opacity")) {
f >> m_shadow_region_opacity;
}
- else if (!mir_tstrcmp(buf, _T("legacy-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, L"legacy-region-opacity")) {
f >> m_legacy_region_opacity;
}
- else if (!mir_tstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, L"w")) {
f.getline(buf, 1024);
m_fw.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, L"h")) {
f.getline(buf, 1024);
m_fh.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("object"))) {
+ else if (!mir_tstrcmp(buf, L"object")) {
head->next = loadObject(f);
if (head->next && ((head->next->type & ST_TYPEMASK) == ST_CLOCK))
m_internalClock = false;
head = head->next;
head->next = NULL;
}
- else if (!mir_tstrcmp(buf, _T("options"))) {
+ else if (!mir_tstrcmp(buf, L"options")) {
loadOptions(f);
}
}
@@ -928,76 +928,76 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f)
continue;
}
- if (!mir_tstrcmp(buf, _T("type"))) {
+ if (!mir_tstrcmp(buf, L"type")) {
f >> buf;
- if (!mir_tstrcmp(buf, _T("icon")))
+ if (!mir_tstrcmp(buf, L"icon"))
element->type = (element->type & ~ST_TYPEMASK) | ST_ICON;
- else if (!mir_tstrcmp(buf, _T("bitmap")))
+ else if (!mir_tstrcmp(buf, L"bitmap"))
element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP;
- else if (!mir_tstrcmp(buf, _T("text"))) {
+ else if (!mir_tstrcmp(buf, L"text")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!mir_tstrcmp(buf, _T("title"))) {
+ else if (!mir_tstrcmp(buf, L"title")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!mir_tstrcmp(buf, _T("avatar"))) {
+ else if (!mir_tstrcmp(buf, L"avatar")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR;
}
- else if (!mir_tstrcmp(buf, _T("clock"))) {
+ else if (!mir_tstrcmp(buf, L"clock")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
}
- else if (!mir_tstrcmp(buf, _T("source"))) {
+ else if (!mir_tstrcmp(buf, L"source")) {
f >> buf;
if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK))
element->myBmp = new MyBitmap(buf);
}
- else if (!mir_tstrcmp(buf, _T("mono"))) {
+ else if (!mir_tstrcmp(buf, L"mono")) {
element->type |= ST_MONO;
}
- else if (!mir_tstrcmp(buf, _T("layer"))) {
+ else if (!mir_tstrcmp(buf, L"layer")) {
element->type |= ST_BLEND;
}
- else if (!mir_tstrcmp(buf, _T("proportional"))) {
+ else if (!mir_tstrcmp(buf, L"proportional")) {
f >> element->proportional;
}
- else if (!mir_tstrcmp(buf, _T("x"))) {
+ else if (!mir_tstrcmp(buf, L"x")) {
f.getline(buf, 1024);
element->fx.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!mir_tstrcmp(buf, _T("y"))) {
+ else if (!mir_tstrcmp(buf, L"y")) {
f.getline(buf, 1024);
element->fy.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!mir_tstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, L"w")) {
f.getline(buf, 1024);
element->fw.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, L"h")) {
f.getline(buf, 1024);
element->fh.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("ifset"))) {
+ else if (!mir_tstrcmp(buf, L"ifset")) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags |= 1 << id;
}
- else if (!mir_tstrcmp(buf, _T("ifnotset"))) {
+ else if (!mir_tstrcmp(buf, L"ifnotset")) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags &= ~(1 << id);
}
- else if (!mir_tstrcmp(buf, _T("color"))) {
+ else if (!mir_tstrcmp(buf, L"color")) {
if (((element->type & ST_TYPEMASK) != ST_TEXT) &&
((element->type & ST_TYPEMASK) != ST_TITLE) &&
((element->type & ST_TYPEMASK) != ST_CLOCK)) continue;
@@ -1006,7 +1006,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f)
f >> r >> g >> b;
element->textColor = RGB(r, g, b);
}
- else if (!mir_tstrcmp(buf, _T("clocksize"))) {
+ else if (!mir_tstrcmp(buf, L"clocksize")) {
element->clockstart[0] = 0;
f >> element->clocksize[0];
for (int i = 1; i < CLOCK_ITEMS; i++) {
@@ -1014,7 +1014,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f)
f >> element->clocksize[i];
}
}
- else if (!mir_tstrcmp(buf, _T("end"))) {
+ else if (!mir_tstrcmp(buf, L"end")) {
break;
}
}
@@ -1086,9 +1086,9 @@ bool Skins::load()
SKINLIST *skin = new SKINLIST;
skin->next = m_skins;
m_skins = skin;
- m_skins->name = mir_tstrdup(_T("* Popup Classic"));
+ m_skins->name = mir_tstrdup(L"* Popup Classic");
m_skins->dir = new TCHAR[1024];
- mir_tstrcpy(m_skins->dir, _T("res:classic.popupskin"));
+ mir_tstrcpy(m_skins->dir, L"res:classic.popupskin");
m_skins->skin = 0;
TCHAR dir[1024] = { '\0' };
@@ -1098,7 +1098,7 @@ bool Skins::load()
return false;
}
else {
- mir_tstrncpy(dir, VARST(_T("%miranda_path%\\skins\\popup")), _countof(dir));
+ mir_tstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir));
DWORD fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;
@@ -1109,9 +1109,9 @@ bool Skins::load()
SetCurrentDirectory(dir);
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);
skin = new SKINLIST;
@@ -1122,7 +1122,7 @@ bool Skins::load()
GetCurrentDirectory(1024, m_skins->dir);
m_skins->skin = 0;
- SetCurrentDirectory(_T(".."));
+ SetCurrentDirectory(L"..");
}
if (!FindNextFile(hFind, &ffd))
@@ -1139,7 +1139,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name)
{
SKINLIST *any = 0;
for (SKINLIST *p = m_skins; p; p = p->next) {
- if (!mir_tstrcmp(p->name, _T("* Popup Classic")) || !any)
+ if (!mir_tstrcmp(p->name, L"* Popup Classic") || !any)
any = p;
if (!mir_tstrcmpi(p->name, name)) {
any = p;