From 2f261839b60692e33d0e160344d0d636d49c90ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jul 2016 14:23:31 +0000 Subject: less TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/actions.cpp | 6 +- plugins/Popup/src/avatars.cpp | 4 +- plugins/Popup/src/bitmap_funcs.cpp | 10 ++-- plugins/Popup/src/common.h | 6 +- plugins/Popup/src/font.cpp | 44 +++++++-------- plugins/Popup/src/font.h | 2 +- plugins/Popup/src/formula.h | 6 +- plugins/Popup/src/history.cpp | 4 +- plugins/Popup/src/main.cpp | 2 +- plugins/Popup/src/notifications.cpp | 10 ++-- plugins/Popup/src/opt_adv.cpp | 10 ++-- plugins/Popup/src/opt_class.cpp | 8 +-- plugins/Popup/src/opt_gen.cpp | 36 ++++++------ plugins/Popup/src/opt_skins.cpp | 26 ++++----- plugins/Popup/src/opttree.cpp | 10 ++-- plugins/Popup/src/popup_thread.cpp | 2 +- plugins/Popup/src/popup_wnd2.cpp | 28 ++++----- plugins/Popup/src/services.cpp | 22 ++++---- plugins/Popup/src/skin.cpp | 110 ++++++++++++++++++------------------ 19 files changed, 173 insertions(+), 173 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 92ae2f282b..5a84d99d0e 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -236,9 +236,9 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM LVGROUP group = { 0 }; group.cbSize = sizeof(group); group.mask = LVGF_HEADER | LVGF_GROUPID; - LPTSTR wszGroup = mir_a2t(szGroup); + LPTSTR wszGroup = mir_a2u(szGroup); group.pszHeader = TranslateTS(wszGroup); - group.cchHeader = (int)mir_tstrlen(wszGroup); + group.cchHeader = (int)mir_wstrlen(wszGroup); grpId = group.iGroupId = groups.getCount(); ListView_InsertGroup(hwndList, -1, &group); mir_free(wszGroup); @@ -248,7 +248,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM LVITEM item = { 0 }; item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT | LVIF_STATE | LVIF_INDENT; item.iItem = i; - ptrT tszName(mir_a2t(szName)); + ptrW tszName(mir_a2u(szName)); item.pszText = TranslateTS(tszName); item.iImage = ImageList_AddIcon(hImgList, gActions[i]->lchIcon); item.lParam = i; diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp index 4f278f3572..73bd43ede4 100644 --- a/plugins/Popup/src/avatars.cpp +++ b/plugins/Popup/src/avatars.cpp @@ -28,8 +28,8 @@ PopupAvatar *PopupAvatar::create(MCONTACT hContact) if (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, L".gif")) + if (av && (mir_wstrlen(av->szFilename) > 4)) + if (!mir_wstrcmpi(av->szFilename + mir_wstrlen(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 9e2c094464..945be3e482 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -596,7 +596,7 @@ void MyBitmap::DrawIcon(HICON hic, int x, int y, int w, int h) void MyBitmap::Draw_Text(wchar_t *str, int x, int y) { - SIZE sz; GetTextExtentPoint32(this->getDC(), str, (int)mir_tstrlen(str), &sz); + SIZE sz; GetTextExtentPoint32(this->getDC(), str, (int)mir_wstrlen(str), &sz); RECT rc; SetRect(&rc, x, y, x + 10000, y + 10000); this->saveAlpha(x, y, sz.cx, sz.cy); DrawText(this->getDC(), str, -1, &rc, DT_LEFT | DT_TOP | DT_SINGLELINE | DT_NOPREFIX); @@ -680,7 +680,7 @@ bool MyBitmap::loadFromFile_pixel(const wchar_t *fn) { allocate(1, 1); int r, g, b, a = 255; - const wchar_t *p = fn + mir_tstrlen(L"pixel:"); + const wchar_t *p = fn + mir_wstrlen(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 wchar_t *fn) bool MyBitmap::loadFromFile_gradient(const wchar_t *fn) { - const wchar_t *p = fn + mir_tstrlen(L"gradient:"); + const wchar_t *p = fn + mir_wstrlen(L"gradient:"); if (*p == 'h') allocate(256, 1); else allocate(1, 256); @@ -724,10 +724,10 @@ bool MyBitmap::loadFromFile(const wchar_t *fn) { if (bits) freemem(); - if (!wcsncmp(fn, L"pixel:", mir_tstrlen(L"pixel:"))) + if (!wcsncmp(fn, L"pixel:", mir_wstrlen(L"pixel:"))) return loadFromFile_pixel(fn); - if (!wcsncmp(fn, L"gradient:", mir_tstrlen(L"gradient:"))) + if (!wcsncmp(fn, L"gradient:", mir_wstrlen(L"gradient:"))) return loadFromFile_gradient(fn); SIZE sz; diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index 28eac5417f..5fff5e0444 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -70,9 +70,9 @@ inline INT_PTR DBGetContactSettingStringX(MCONTACT hContact, const char *ModuleN break; case DBVT_TCHAR: if (!result) - ret = (INT_PTR)mir_tstrdup(dbv.ptszVal); + ret = (INT_PTR)mir_wstrdup(dbv.ptszVal); else - ret = (INT_PTR)mir_a2t(Default); + ret = (INT_PTR)mir_a2u(Default); break; } if (!result) @@ -89,7 +89,7 @@ inline void AddTooltipTranslated(HWND hwndToolTip, HWND hwnd, int id, RECT rc, c ti.uId = id; SendMessage(hwndToolTip, TTM_DELTOOL, 0, (LPARAM)&ti); - LPTSTR wtext = mir_a2t(text); + LPTSTR wtext = mir_a2u(text); ti.uFlags = TTF_SUBCLASS; ti.hwnd = hwnd; diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index 56b9c26eca..23a6156b55 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -30,52 +30,52 @@ void InitFonts() // Fonts FontIDT fid = { 0 }; fid.cbSize = sizeof(FontIDT); - mir_tstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.group)); + mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.group)); mir_strncpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(fid.dbSettingsGroup)); fid.flags = FIDF_DEFAULTVALID; fid.deffontsettings.charset = DEFAULT_CHARSET; fid.deffontsettings.size = -11; - mir_tstrncpy(fid.backgroundGroup, PU_FNT_AND_COLORW, _countof(fid.backgroundGroup)); - mir_tstrncpy(fid.backgroundName, PU_COL_BACK_NAME, _countof(fid.backgroundName)); - mir_tstrncpy(fid.deffontsettings.szFace, L"Tahoma", _countof(fid.deffontsettings.szFace)); + mir_wstrncpy(fid.backgroundGroup, PU_FNT_AND_COLORW, _countof(fid.backgroundGroup)); + mir_wstrncpy(fid.backgroundName, PU_COL_BACK_NAME, _countof(fid.backgroundName)); + mir_wstrncpy(fid.deffontsettings.szFace, L"Tahoma", _countof(fid.deffontsettings.szFace)); - mir_tstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name)); mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE); fid.deffontsettings.style = DBFONTF_BOLD; fid.deffontsettings.colour = RGB(0, 0, 0); FontRegisterT(&fid); - mir_tstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name)); mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_CLOCK); FontRegisterT(&fid); - mir_tstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name)); mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TEXT); fid.deffontsettings.style = 0; FontRegisterT(&fid); - mir_tstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name)); mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_ACTION); fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS; fid.deffontsettings.colour = RGB(0, 0, 255); FontRegisterT(&fid); - mir_tstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name)); mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION); fid.deffontsettings.style = DBFONTF_UNDERLINE; FontRegisterT(&fid); ColourIDT cid = { 0 }; cid.cbSize = sizeof(ColourIDT); - mir_tstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); + mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); mir_strncpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, _countof(cid.dbSettingsGroup)); - mir_tstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name)); + mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name)); mir_strncpy(cid.setting, PU_COL_BACK_SETTING, _countof(cid.setting)); cid.defcolour = SETTING_BACKCOLOUR_DEFAULT; ColourRegisterT(&cid); - mir_tstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name)); + mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name)); mir_strncpy(cid.setting, PU_COL_AVAT_SETTING, _countof(cid.setting)); cid.defcolour = SETTING_TEXTCOLOUR_DEFAULT; ColourRegisterT(&cid); @@ -95,36 +95,36 @@ void ReloadFonts() LOGFONT lf = { 0 }; FontIDT fid = { 0 }; fid.cbSize = sizeof(FontIDT); - mir_tstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.name)); + mir_wstrncpy(fid.group, PU_FNT_AND_COLORW, _countof(fid.name)); - mir_tstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_TITLE, _countof(fid.name)); fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf); fonts.title = CreateFontIndirect(&lf); - mir_tstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_CLOCK, _countof(fid.name)); fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf); fonts.clock = CreateFontIndirect(&lf); - mir_tstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name)); fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf); fonts.text = CreateFontIndirect(&lf); - mir_tstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_ACTION, _countof(fid.name)); fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf); fonts.action = CreateFontIndirect(&lf); - mir_tstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name)); + mir_wstrncpy(fid.name, PU_FNT_NAME_HOVERED_ACTION, _countof(fid.name)); fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf); fonts.actionHover = CreateFontIndirect(&lf); ColourIDT cid = { 0 }; cid.cbSize = sizeof(ColourIDT); - mir_tstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); - mir_tstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name)); + mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); + mir_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name)); fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf); - mir_tstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); - mir_tstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name)); + mir_wstrncpy(cid.group, PU_FNT_AND_COLORW, _countof(cid.group)); + mir_wstrncpy(cid.name, PU_COL_AVAT_NAME, _countof(cid.name)); fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf); // update class popupps(only temp at this point, must rework) diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h index 0967bb4c12..c94739c13f 100644 --- a/plugins/Popup/src/font.h +++ b/plugins/Popup/src/font.h @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PU_FNT_AND_COLOR_DB MODULNAME //use eg mir_strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB); #define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, _countof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....); -#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_tstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT +#define PU_FNT_NAME_TITLE LPGENW("Title") //use eg mir_wstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT #define PU_FNT_NAME_CLOCK LPGENW("Clock") #define PU_FNT_NAME_TEXT LPGENW("Text") #define PU_FNT_NAME_ACTION LPGENW("Action") diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h index 0abbc50565..65a9eae3ee 100644 --- a/plugins/Popup/src/formula.h +++ b/plugins/Popup/src/formula.h @@ -79,10 +79,10 @@ private: int eval_atom(wchar_t *&s, Args *args, bool *vars) const; public: - Formula() :m_str(mir_tstrdup(L"")) {} - Formula(wchar_t *s) :m_str(mir_tstrdup(s)) {} + Formula() :m_str(mir_wstrdup(L"")) {} + Formula(wchar_t *s) :m_str(mir_wstrdup(s)) {} ~Formula() { mir_free(m_str); } - void set(wchar_t *s){ mir_free(m_str); m_str = mir_tstrdup(s); } + void set(wchar_t *s){ mir_free(m_str); m_str = mir_wstrdup(s); } int eval(Args *args, bool *vars = 0) const; }; diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index daf8e90a73..4746c4d4a9 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -74,8 +74,8 @@ void PopupHistoryAdd(POPUPDATA2 *ppdNew) POPUPDATA2 *ppd = (POPUPDATA2*)mir_alloc(sizeof(POPUPDATA2)); *ppd = *ppdNew; if (ppd->flags & PU2_UNICODE) { - ppd->lptzTitle = mir_tstrdup(ppd->lpwzTitle); - ppd->lptzText = mir_tstrdup(ppd->lptzText); + ppd->lptzTitle = mir_wstrdup(ppd->lpwzTitle); + ppd->lptzText = mir_wstrdup(ppd->lptzText); } else { ppd->lpzTitle = mir_strdup(ppd->lpzTitle); diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index ff38a8977a..b572ae477c 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -265,7 +265,7 @@ static int ModulesLoaded(WPARAM, LPARAM) const PopupSkin *skin; if (skin = skins.getSkin(PopupOptions.SkinPack)) { mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_tstrdup(skin->getName()); + PopupOptions.SkinPack = mir_wstrdup(skin->getName()); skin->loadOpts(); } // init PopupEfects diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 9958db8c7d..ad176ca7ed 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -29,9 +29,9 @@ HANDLE g_hntfError, g_hntfWarning, g_hntfNotification; int TreeDataSortFunc(const POPUPTREEDATA *p1, const POPUPTREEDATA *p2) { - if (int cmp = mir_tstrcmp(p1->pszTreeRoot, p2->pszTreeRoot)) + if (int cmp = mir_wstrcmp(p1->pszTreeRoot, p2->pszTreeRoot)) return cmp; - return mir_tstrcmp(p1->pszDescription, p2->pszDescription); + return mir_wstrcmp(p1->pszDescription, p2->pszDescription); } LIST gTreeData(20, TreeDataSortFunc); @@ -172,8 +172,8 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) POPUPTREEDATA *ptd = (POPUPTREEDATA *)mir_alloc(sizeof(POPUPTREEDATA)); ptd->signature = PopupNotificationData_SIGNATURE; ptd->typ = 1; - ptd->pszTreeRoot = mir_a2t(notification->lpzGroup); - ptd->pszDescription = mir_a2t(notification->lpzName); + ptd->pszTreeRoot = mir_a2u(notification->lpzGroup); + ptd->pszDescription = mir_a2u(notification->lpzName); ptd->notification = *notification; ptd->hIcoLib = notification->lchIcoLib; if (!ptd->notification.lpzLAction) ptd->notification.lpzLAction = POPUP_ACTION_NOTHING; @@ -215,7 +215,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, BYTE typ) { for (int i = 0; i < gTreeData.getCount(); i++) { POPUPTREEDATA *p = gTreeData[i]; - if (p->typ == typ && (!group || (mir_tstrcmp(p->pszTreeRoot, group) == 0)) && (!name || (mir_tstrcmp(p->pszDescription, name) == 0))) + if (p->typ == typ && (!group || (mir_wstrcmp(p->pszTreeRoot, group) == 0)) && (!name || (mir_wstrcmp(p->pszDescription, name) == 0))) return p; } return NULL; diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 323bd1ce7b..b85db14921 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -32,7 +32,7 @@ LRESULT CALLBACK AlphaTrackBarWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA LIST g_lstPopupVfx(5, wcsicmp); void OptAdv_RegisterVfx(char *name) { - g_lstPopupVfx.insert(mir_a2t(name)); + g_lstPopupVfx.insert(mir_a2u(name)); } void OptAdv_UnregisterVfx() @@ -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, L"%d%%", Byte2Percentile(PopupOptions.Alpha)); + mir_snwprintf(tstr, L"%d%%", Byte2Percentile(PopupOptions.Alpha)); SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr); CheckDlgButton(hwnd, IDC_TRANS_OPAQUEONHOVER, PopupOptions.OpaqueOnHover ? BST_CHECKED : BST_UNCHECKED); { @@ -210,7 +210,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) { DWORD dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i])); ComboBox_SetItemData(hCtrl, dwItem, i); - if (PopupOptions.UseEffect && !mir_tstrcmp(g_lstPopupVfx[i], PopupOptions.Effect)) + if (PopupOptions.UseEffect && !mir_wstrcmp(g_lstPopupVfx[i], PopupOptions.Effect)) dwActiveItem = dwItem; } SendDlgItemMessage(hwnd, IDC_EFFECT, CB_SETCURSEL, dwActiveItem, 0); @@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case IDC_TRANS_SLIDER: PopupOptions.Alpha = (BYTE)SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_GETPOS, 0, 0); - mir_sntprintf(tstr, TranslateT("%d%%"), Byte2Percentile(PopupOptions.Alpha)); + mir_snwprintf(tstr, TranslateT("%d%%"), Byte2Percentile(PopupOptions.Alpha)); SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr); SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); break; @@ -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] : L""); + PopupOptions.Effect = mir_wstrdup((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 170603d799..29b2702137 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, L"%s/%s", p->pszTreeRoot, p->pszDescription); + mir_snwprintf(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, L"%s/%s", LPGENW("CLASS Plugins"), p->pszDescription); + mir_snwprintf(itemName, L"%s/%s", LPGENW("CLASS Plugins"), p->pszDescription); } OptTree_AddItem(hwndTree, itemName, (LPARAM)p, iconIndex); } @@ -266,7 +266,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l // combo left action (EXTRA) hCtrl = GetDlgItem(hwnd, IDC_LACTION); for (i = 0; i < ptd->notification.actionCount; ++i) { - psztAction = mir_a2t(ptd->notification.lpActions[i].lpzTitle); + psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle); mir_free(psztAction); psztAction = NULL; } @@ -274,7 +274,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l hCtrl = GetDlgItem(hwnd, IDC_RACTION); psztAction = NULL; for (i = 0; i < ptd->notification.actionCount; ++i) { - psztAction = mir_a2t(ptd->notification.lpActions[i].lpzTitle); + psztAction = mir_a2u(ptd->notification.lpActions[i].lpzTitle); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateTS(psztAction)), ptd->notification.lpActions[i].lpzTitle); mir_free(psztAction); psztAction = NULL; } diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 70272f8176..b2b6fba0e7 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -47,24 +47,24 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) if (!flag) return pos; options[pos].dwFlag = flag; options[pos].groupId = OPTTREE_CHECK; - options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(wchar_t) * mir_tstrlen(prefix) + 32); - options[pos].pszSettingName = mir_tstrdup(prefix); + options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(wchar_t) * mir_wstrlen(prefix) + 32); + options[pos].pszSettingName = mir_wstrdup(prefix); options[pos].iconIndex = 0; - mir_tstrcpy(options[pos].pszOptionName, prefix); - mir_tstrcat(options[pos].pszOptionName, L"/"); + mir_wstrcpy(options[pos].pszOptionName, prefix); + mir_wstrcat(options[pos].pszOptionName, L"/"); switch (flag) { - case PF2_IDLE: mir_tstrcat(options[pos].pszOptionName, LPGENW("Offline")); break; - case PF2_ONLINE: mir_tstrcat(options[pos].pszOptionName, LPGENW("Online")); break; - case PF2_INVISIBLE: mir_tstrcat(options[pos].pszOptionName, LPGENW("Invisible")); break; - case PF2_SHORTAWAY: mir_tstrcat(options[pos].pszOptionName, LPGENW("Away")); break; - case PF2_LONGAWAY: mir_tstrcat(options[pos].pszOptionName, LPGENW("Not available")); break; - case PF2_LIGHTDND: mir_tstrcat(options[pos].pszOptionName, LPGENW("Occupied")); break; - case PF2_HEAVYDND: mir_tstrcat(options[pos].pszOptionName, LPGENW("Do not disturb")); break; - case PF2_FREECHAT: mir_tstrcat(options[pos].pszOptionName, LPGENW("Free for chat")); break; - case PF2_OUTTOLUNCH: mir_tstrcat(options[pos].pszOptionName, LPGENW("Out to lunch")); break; - case PF2_ONTHEPHONE: mir_tstrcat(options[pos].pszOptionName, LPGENW("On the phone")); break; + case PF2_IDLE: mir_wstrcat(options[pos].pszOptionName, LPGENW("Offline")); break; + case PF2_ONLINE: mir_wstrcat(options[pos].pszOptionName, LPGENW("Online")); break; + case PF2_INVISIBLE: mir_wstrcat(options[pos].pszOptionName, LPGENW("Invisible")); break; + case PF2_SHORTAWAY: mir_wstrcat(options[pos].pszOptionName, LPGENW("Away")); break; + case PF2_LONGAWAY: mir_wstrcat(options[pos].pszOptionName, LPGENW("Not available")); break; + case PF2_LIGHTDND: mir_wstrcat(options[pos].pszOptionName, LPGENW("Occupied")); break; + case PF2_HEAVYDND: mir_wstrcat(options[pos].pszOptionName, LPGENW("Do not disturb")); break; + case PF2_FREECHAT: mir_wstrcat(options[pos].pszOptionName, LPGENW("Free for chat")); break; + case PF2_OUTTOLUNCH: mir_wstrcat(options[pos].pszOptionName, LPGENW("Out to lunch")); break; + case PF2_ONTHEPHONE: mir_wstrcat(options[pos].pszOptionName, LPGENW("On the phone")); break; } return pos + 1; } @@ -225,7 +225,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM continue; wchar_t prefix[128]; - mir_sntprintf(prefix, LPGENW("Protocol Status")L"/%s", protocols[i]->tszAccountName); + mir_snwprintf(prefix, LPGENW("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); wchar_t pszSettingName[256]; - mir_sntprintf(pszSettingName, LPGENW("Protocol Status")L"/%s", protocols[i]->tszAccountName); + mir_snwprintf(pszSettingName, LPGENW("Protocol Status")L"/%s", protocols[i]->tszAccountName); OptTree_SetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, db_get_dw(NULL, MODULNAME, prefix, 0), pszSettingName); } } @@ -529,7 +529,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM mir_snprintf(prefix, "Protocol Status/%s", protocols[i]->szModuleName); wchar_t pszSettingName[256]; - mir_sntprintf(pszSettingName, L"Protocol Status/%s", protocols[i]->tszAccountName); + mir_snwprintf(pszSettingName, L"Protocol Status/%s", protocols[i]->tszAccountName); db_set_dw(NULL, MODULNAME, prefix, OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, pszSettingName)); } } @@ -581,7 +581,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM void ErrorMSG(int minValue, int maxValue) { wchar_t str[128]; - mir_sntprintf(str, TranslateT("You cannot specify a value lower than %d and higher than %d."), minValue, maxValue); + mir_snwprintf(str, TranslateT("You cannot specify a value lower than %d and higher than %d."), minValue, maxValue); MSGERROR(str); } diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index a86b82c380..2274390955 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -48,7 +48,7 @@ void RegisterOptPrevBox() err = GetLastError(); if (!g_wndClass.cPopupPreviewBoxWndclass) { wchar_t msg[1024]; - mir_sntprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); + mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); MSGERROR(msg); } @@ -62,7 +62,7 @@ void RegisterOptPrevBox() err = GetLastError(); if (!g_wndClass.cPopupPlusDlgBox) { wchar_t msg[1024]; - mir_sntprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); + mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); MSGERROR(msg); } } @@ -184,9 +184,9 @@ 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(L"Skin options"); + options[pos].pszSettingName = mir_wstrdup(L"Skin options"); options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(wchar_t)*( - mir_tstrlen(options[pos].pszSettingName) + + mir_wstrlen(options[pos].pszSettingName) + mir_strlen(skin->getFlagName(i)) + 10)); wsprintf(options[pos].pszOptionName, L"%s/%hs", options[pos].pszSettingName, skin->getFlagName(i)); // !!!!!!!!!!!!! options[pos].bState = skin->getFlag(i) ? TRUE : FALSE; @@ -245,10 +245,10 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, options[pos].dwFlag = (1 << i); options[pos].groupId = OPTTREE_CHECK; options[pos].iconIndex = 0; - options[pos].pszSettingName = mir_tstrdup(LPGENW("Global settings")); + options[pos].pszSettingName = mir_wstrdup(LPGENW("Global settings")); options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(wchar_t)*( - mir_tstrlen(options[pos].pszSettingName) + - mir_tstrlen(mainOption[i]) + 10)); + mir_wstrlen(options[pos].pszSettingName) + + mir_wstrlen(mainOption[i]) + 10)); wsprintf(options[pos].pszOptionName, L"%s/%s", options[pos].pszSettingName, mainOption[i]); // !!!!!!!!!!!!! options[pos].bState = bCheck; pos++; @@ -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, L"Skin options") == 0) { + if (mir_wstrcmp(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, L"Global settings") == 0) { + else if (mir_wstrcmp(skinOptions[index].pszSettingName, L"Global settings") == 0) { switch (skinOptions[index].dwFlag) { case (1 << 0) : PopupOptions.DisplayTime = skinOptions[index].bState; @@ -416,9 +416,9 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR // make shure we have select skin (ListBox_SetCurSel may be fail) wchar_t szNewSkin[128]; ListBox_GetText(hCtrl, ListBox_GetCurSel(hCtrl), &szNewSkin); - if (mir_tstrcmp(pszOldSkin, szNewSkin) != 0) { + if (mir_wstrcmp(pszOldSkin, szNewSkin) != 0) { mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_tstrdup(szNewSkin); + PopupOptions.SkinPack = mir_wstrdup(szNewSkin); } const PopupSkin *skin = 0; @@ -440,7 +440,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR { // Skin list change mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_tstrdup((wchar_t *)SendDlgItemMessage( + PopupOptions.SkinPack = mir_wstrdup((wchar_t *)SendDlgItemMessage( hwndDlg, IDC_SKINLIST, LB_GETITEMDATA, @@ -449,7 +449,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR const PopupSkin *skin = 0; if (skin = skins.getSkin(PopupOptions.SkinPack)) { mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_tstrdup(skin->getName()); + PopupOptions.SkinPack = mir_wstrdup(skin->getName()); // update Skin Option List bDlgInit = false; diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index c86ec17fb2..cc2e48e141 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -85,7 +85,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const wcha while (tvi.hItem) { TreeView_GetItem(hwndTree, &tvi); - if (!mir_tstrcmp(tvi.pszText, name)) + if (!mir_wstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -101,7 +101,7 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, LPTSTR name, LPARAM lParam, int iconInd int sectionLevel = 0; HTREEITEM hSection = NULL, result = NULL; - mir_tstrcpy(itemName, name); + mir_wstrcpy(itemName, name); sectionName = itemName; while (sectionName) { @@ -176,7 +176,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, int *res int sectionLevel = 0; HTREEITEM hSection = NULL; - mir_tstrcpy(itemName, options[indx].pszOptionName); + mir_wstrcpy(itemName, options[indx].pszOptionName); sectionName = itemName; while (sectionName) { @@ -324,7 +324,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op int i; for (i = 0; i < optionCount; ++i) { if ((!options[i].pszSettingName && !pszSettingName) || - (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName))) + (options[i].pszSettingName && pszSettingName && !mir_wstrcmp(options[i].pszSettingName, pszSettingName))) { TVITEM tvi = { 0 }; tvi.mask = TVIF_HANDLE | TVIF_IMAGE; @@ -342,7 +342,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt HWND hwndTree = GetDlgItem(hwnd, idcTree); for (int i = 0; i < optionCount; ++i) { if ((!options[i].pszSettingName && !pszSettingName) || - (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName))) + (options[i].pszSettingName && pszSettingName && !mir_wstrcmp(options[i].pszSettingName, pszSettingName))) { TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index a2a42b263d..54dc146040 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -232,7 +232,7 @@ static unsigned __stdcall PopupThread(void *) err = GetLastError(); if (!g_wndClass.cPopupThreadManagerWnd) { wchar_t msg[1024]; - mir_sntprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); + mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); MSGERROR(msg); } diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index b64c225c26..a31ce9b23e 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -61,7 +61,7 @@ bool LoadPopupWnd2() if (!g_wndClass.cPopupWnd2) { res = false; wchar_t msg[1024]; - mir_sntprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); + mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); MessageBox(NULL, msg, MODULNAME_LONG, MB_ICONSTOP | MB_OK); } @@ -76,7 +76,7 @@ bool LoadPopupWnd2() err = GetLastError(); if (!g_wndClass.cPopupEditBox) { wchar_t msg[2048]; - mir_sntprintf(msg, TranslateT("Failed to register custom edit box window class.\r\n\r\ncbSize: %i\r\nstyle: %p\r\nlpfnWndProc: %i\r\ncbClsExtra: %i\r\ncbWndExtra: %i\r\nhInstance: %i\r\nhIcon: %i\r\nhCursor: %i\r\nhbrBackground: %i\r\nlpszMenuName: %s\r\nlpszClassName: %s\r\nhIconSm: %i\r\n"), + mir_snwprintf(msg, TranslateT("Failed to register custom edit box window class.\r\n\r\ncbSize: %i\r\nstyle: %p\r\nlpfnWndProc: %i\r\ncbClsExtra: %i\r\ncbWndExtra: %i\r\nhInstance: %i\r\nhIcon: %i\r\nhCursor: %i\r\nhbrBackground: %i\r\nlpszMenuName: %s\r\nlpszClassName: %s\r\nhIconSm: %i\r\n"), wclw.cbSize, wclw.style, wclw.lpfnWndProc, wclw.cbClsExtra, wclw.cbWndExtra, wclw.hInstance, wclw.hIcon, wclw.hCursor, wclw.hbrBackground, wclw.lpszMenuName, wclw.lpszClassName, wclw.hIconSm); @@ -101,7 +101,7 @@ bool LoadPopupWnd2() if (!g_wndClass.cPopupMenuHostWnd) { res = false; wchar_t msg[1024]; - mir_sntprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); + mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); MSGERROR(msg); } @@ -261,7 +261,7 @@ void PopupWnd2::update() if (*m_time && skin->useInternalClock()) { SetTextColor(hdc, m_clClock); HFONT hfnSave = (HFONT)SelectObject(m_bmpBase->getDC(), fonts.clock); - SIZE sz; GetTextExtentPoint32(m_bmpBase->getDC(), m_time, (int)mir_tstrlen(m_time), &sz); + SIZE sz; GetTextExtentPoint32(m_bmpBase->getDC(), m_time, (int)mir_wstrlen(m_time), &sz); m_bmpBase->Draw_Text(m_time, this->m_sz.cx - sz.cx - STYLE_SZ_GAP - skin->getRightGap(), STYLE_SZ_GAP); SelectObject(m_bmpBase->getDC(), hfnSave); } @@ -688,8 +688,8 @@ void PopupWnd2::updateData(POPUPDATAW_V2 *ppd) if (m_textType == TT_NONE) m_textType = TT_UNICODE; - replaceStrT(m_lptzTitle, ppd->lptzContactName); - replaceStrT(m_lptzText, ppd->lptzText); + replaceStrW(m_lptzTitle, ppd->lptzContactName); + replaceStrW(m_lptzText, ppd->lptzText); setIcon(ppd->lchIcon); m_hNotification = ppd->hNotification; @@ -717,12 +717,12 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd) if (ppd->flags & PU2_UNICODE) { if (m_textType == TT_NONE) m_textType = TT_UNICODE; - replaceStrT(m_lptzTitle, ppd->lptzTitle); - replaceStrT(m_lptzText, ppd->lptzText); + replaceStrW(m_lptzTitle, ppd->lptzTitle); + replaceStrW(m_lptzText, ppd->lptzText); } else { - replaceStrT(m_lptzTitle, NULL); - replaceStrT(m_lptzText, NULL); + replaceStrW(m_lptzTitle, NULL); + replaceStrW(m_lptzText, NULL); } setIcon(ppd->lchIcon); @@ -733,7 +733,7 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd) m_customPopup = (ppd->flags & PU2_CUSTOM_POPUP) != 0; m_hbmAvatar = ppd->hbmAvatar; - m_lpzSkin = mir_a2t(ppd->lpzSkin); + m_lpzSkin = mir_a2u(ppd->lpzSkin); if (m_options->DisplayTime) { if (ppd->dwTimestamp) @@ -768,7 +768,7 @@ void PopupWnd2::buildMText() void PopupWnd2::updateText(wchar_t *text) { if (m_lptzText) { - replaceStrT(m_lptzText, text); + replaceStrW(m_lptzText, text); if (m_textType == TT_MTEXT) buildMText(); } @@ -778,7 +778,7 @@ void PopupWnd2::updateText(wchar_t *text) void PopupWnd2::updateTitle(wchar_t *title) { if (m_lptzTitle) { - replaceStrT(m_lptzTitle, title); + replaceStrW(m_lptzTitle, title); if (m_textType == TT_MTEXT) buildMText(); } @@ -985,7 +985,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara EmptyClipboard(); HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (tszText.GetLength() + 1) * sizeof(wchar_t)); wchar_t *buffer = (wchar_t *)GlobalLock(clipbuffer); - mir_tstrcpy(buffer, tszText); + mir_wstrcpy(buffer, tszText); GlobalUnlock(clipbuffer); SetClipboardData(CF_UNICODETEXT, clipbuffer); CloseClipboard(); diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index 676ac0beab..23f5ac5026 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -364,15 +364,15 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) ptd->signature = 0/*PopupNotificationData_SIGNATURE*/; ptd->typ = 2; memcpy(&ptd->pupClass, pc, sizeof(POPUPCLASS)); - ptd->pszTreeRoot = mir_a2t(pc->pszName); + ptd->pszTreeRoot = mir_a2u(pc->pszName); ptd->pupClass.pszName = mir_strdup(pc->pszName); if (pc->flags & PCF_UNICODE) { ptd->pupClass.pwszDescription = mir_wstrdup(pc->pwszDescription); - ptd->pszDescription = mir_u2t(pc->pwszDescription); + ptd->pszDescription = mir_wstrdup(pc->pwszDescription); } else { ptd->pupClass.pszDescription = mir_strdup(pc->pszDescription); - ptd->pszDescription = mir_a2t(pc->pszDescription); + ptd->pszDescription = mir_a2u(pc->pszDescription); } LoadClassSettings(ptd, PU_MODULCLASS); @@ -381,13 +381,13 @@ 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, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName); + mir_snwprintf(fid.group, _A2W(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, L"Verdana", _countof(fid.deffontsettings.szFace) - 1); - mir_tstrncpy(fid.name, PU_FNT_NAME_TEXT, _countof(fid.name) - 1); + mir_wstrncpy(fid.deffontsettings.szFace, L"Verdana", _countof(fid.deffontsettings.szFace) - 1); + mir_wstrncpy(fid.name, 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" fid.deffontsettings.style = 0; @@ -399,9 +399,9 @@ 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, _A2W(PU_FNT_AND_COLOR) L"/%S", ptd->pupClass.pszName); + mir_snwprintf(cid.group, _A2W(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_wstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name)); mir_snprintf(cid.setting, "%s/BgCol", ptd->pupClass.pszName); cid.defcolour = fonts.clBack; ColourRegisterT(&cid); @@ -438,7 +438,7 @@ INT_PTR Popup_CreateClassPopup(WPARAM wParam, LPARAM lParam) if (wParam) pc = (POPUPCLASS*)wParam; else { - LPTSTR group = mir_a2t(pdc->pszClassName); + LPTSTR group = mir_a2u(pdc->pszClassName); POPUPTREEDATA *ptd = (POPUPTREEDATA *)FindTreeData(group, NULL, 2); if (ptd) pc = &ptd->pupClass; @@ -481,13 +481,13 @@ INT_PTR Popup_LoadSkin(WPARAM, LPARAM lParam) if (lParam) { mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_a2t((char*)lParam); + PopupOptions.SkinPack = mir_a2u((char*)lParam); } const PopupSkin *skin = 0; if (skin = skins.getSkin(PopupOptions.SkinPack)) { mir_free(PopupOptions.SkinPack); - PopupOptions.SkinPack = mir_tstrdup(skin->getName()); + PopupOptions.SkinPack = mir_wstrdup(skin->getName()); } return 1; diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index 242bf7b4c2..73756e4e51 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -33,7 +33,7 @@ PopupSkin::PopupSkin(LPCTSTR aName) for (int i = 0; i < 32; i++) m_flag_names[i] = NULL; m_elements = 0; - m_name = aName ? mir_tstrdup(aName) : NULL; + m_name = aName ? mir_wstrdup(aName) : NULL; } PopupSkin::~PopupSkin() @@ -61,9 +61,9 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const else ++name; SIZE szText, szSpace; - LPTSTR wname = mir_a2t(name); + LPTSTR wname = mir_a2u(name); wchar_t *str = TranslateTS(wname); - GetTextExtentPoint32(hdc, str, (int)mir_tstrlen(str), &szText); + GetTextExtentPoint32(hdc, str, (int)mir_wstrlen(str), &szText); mir_free(wname); GetTextExtentPoint32(hdc, L" ", 1, &szSpace); @@ -124,9 +124,9 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h GetTextExtentPoint32(bmp->getDC(), L" ", 1, &szSpace); - LPTSTR wname = mir_a2t(name); + LPTSTR wname = mir_a2u(name); wchar_t *str = TranslateTS(wname); - GetTextExtentPoint32(bmp->getDC(), str, (int)mir_tstrlen(str), &szText); + GetTextExtentPoint32(bmp->getDC(), str, (int)mir_wstrlen(str), &szText); bmp->Draw_Text(str, (PopupOptions.actions&ACT_LARGE) ? (x + szSpace.cx + 32) : (x + szSpace.cx + 16), max(y + 2, y + 2 + (((PopupOptions.actions&ACT_LARGE) ? 32 : 16) - szText.cy) / 2)); @@ -197,7 +197,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options } else { // normal clock HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock); - SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_tstrlen(wnd->getTime()), &sz); + SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_wstrlen(wnd->getTime()), &sz); SelectObject(hdc, hfnSave); wnd->getArgs()->add("clock.width", sz.cx + 2 * STYLE_SZ_GAP); wnd->getArgs()->add("clock.height", sz.cy); @@ -239,7 +239,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options case PopupWnd2::TT_UNICODE: { RECT rc; SetRect(&rc, 0, 0, szNew.cx, 0); - DrawTextEx(hdc, wnd->getText(), (int)mir_tstrlen(wnd->getText()), &rc, + DrawTextEx(hdc, wnd->getText(), (int)mir_wstrlen(wnd->getText()), &rc, DT_CALCRECT | DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL); szNew.cx = rc.right; szNew.cy = rc.bottom; @@ -282,7 +282,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options case PopupWnd2::TT_UNICODE: { RECT rc; SetRect(&rc, 0, 0, szNew.cx, 0); - DrawTextEx(hdc, wnd->getTitle(), (int)mir_tstrlen(wnd->getTitle()), &rc, + DrawTextEx(hdc, wnd->getTitle(), (int)mir_wstrlen(wnd->getTitle()), &rc, DT_CALCRECT | DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL); szNew.cx = rc.right; szNew.cy = rc.bottom; @@ -345,7 +345,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options else { HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock); SIZE szClock; - GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_tstrlen(wnd->getTime()), &szClock); + GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_wstrlen(wnd->getTime()), &szClock); SelectObject(hdc, hfnSave); wnd->getArgs()->add("clock.width", szClock.cx + 2 * STYLE_SZ_GAP); wnd->getArgs()->add("clock.height", szClock.cy); @@ -439,7 +439,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DW } else { HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock); - SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_tstrlen(wnd->getTime()), &sz); + SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), (int)mir_wstrlen(wnd->getTime()), &sz); SelectObject(hdc, hfnSave); STYLE_SZ_CLOCK = sz.cx + 2 * STYLE_SZ_GAP; } @@ -501,7 +501,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DW case PopupWnd2::TT_UNICODE: { RECT rc; SetRect(&rc, pt.x, pt.y, pt.x + sz.cx, pt.y + sz.cy); - DrawTextEx(hdc, wnd->getText(), (int)mir_tstrlen(wnd->getText()), &rc, + DrawTextEx(hdc, wnd->getText(), (int)mir_wstrlen(wnd->getText()), &rc, DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL); } break; @@ -549,7 +549,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DW { HFONT hFntSave = (HFONT)SelectObject(hdc, fonts.title); RECT rc; SetRect(&rc, pt.x, pt.y, pt.x + sz.cx, pt.y + sz.cy); - DrawTextEx(hdc, wnd->getTitle(), (int)mir_tstrlen(wnd->getTitle()), &rc, + DrawTextEx(hdc, wnd->getTitle(), (int)mir_wstrlen(wnd->getTitle()), &rc, DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL); SelectObject(hdc, hFntSave); } @@ -689,7 +689,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, POPUPOPTIONS *options, DW SetTextColor(hdc, wnd->getClockColor()); HFONT hfnSave = (HFONT)SelectObject(bmp->getDC(), fonts.clock); - GetTextExtentPoint32(bmp->getDC(), wnd->getTime(), (int)mir_tstrlen(wnd->getTime()), &sz); + GetTextExtentPoint32(bmp->getDC(), wnd->getTime(), (int)mir_wstrlen(wnd->getTime()), &sz); bmp->Draw_Text(wnd->getTime(), x, y); SelectObject(bmp->getDC(), hfnSave); } @@ -748,7 +748,7 @@ void PopupSkin::loadOptions(std::wistream &f) f.ignore(1024, '\n'); continue; } - if (!mir_tstrcmp(buf, L"option")) { + if (!mir_wstrcmp(buf, L"option")) { int id, val; f >> id >> val; f.getline(buf, 1024); @@ -758,16 +758,16 @@ void PopupSkin::loadOptions(std::wistream &f) wchar_t *p = buf; while (isspace(*p)) p++; - wchar_t *q = p + mir_tstrlen(p) - 1; + wchar_t *q = p + mir_wstrlen(p) - 1; while ((q >= p) && isspace(*q)) *q-- = 0; - m_flag_names[id] = mir_t2a(p); + m_flag_names[id] = mir_u2a(p); if (val) m_flags |= 1 << id; else m_flags &= ~(1 << id); } - else if (!mir_tstrcmp(buf, L"end")) + else if (!mir_wstrcmp(buf, L"end")) break; } delete[] buf; @@ -840,40 +840,40 @@ void PopupSkin::loadSkin(std::wistream &f) continue; } - if (!mir_tstrcmp(buf, L"popup-version")) { + if (!mir_wstrcmp(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, L"padding-right")) { + else if (!mir_wstrcmp(buf, L"padding-right")) { f >> m_right_gap; } - else if (!mir_tstrcmp(buf, L"padding-bottom")) { + else if (!mir_wstrcmp(buf, L"padding-bottom")) { f >> m_bottom_gap; } - else if (!mir_tstrcmp(buf, L"shadow-region-opacity")) { + else if (!mir_wstrcmp(buf, L"shadow-region-opacity")) { f >> m_shadow_region_opacity; } - else if (!mir_tstrcmp(buf, L"legacy-region-opacity")) { + else if (!mir_wstrcmp(buf, L"legacy-region-opacity")) { f >> m_legacy_region_opacity; } - else if (!mir_tstrcmp(buf, L"w")) { + else if (!mir_wstrcmp(buf, L"w")) { f.getline(buf, 1024); m_fw.set(buf); } - else if (!mir_tstrcmp(buf, L"h")) { + else if (!mir_wstrcmp(buf, L"h")) { f.getline(buf, 1024); m_fh.set(buf); } - else if (!mir_tstrcmp(buf, L"object")) { + else if (!mir_wstrcmp(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, L"options")) { + else if (!mir_wstrcmp(buf, L"options")) { loadOptions(f); } } @@ -928,76 +928,76 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) continue; } - if (!mir_tstrcmp(buf, L"type")) { + if (!mir_wstrcmp(buf, L"type")) { f >> buf; - if (!mir_tstrcmp(buf, L"icon")) + if (!mir_wstrcmp(buf, L"icon")) element->type = (element->type & ~ST_TYPEMASK) | ST_ICON; - else if (!mir_tstrcmp(buf, L"bitmap")) + else if (!mir_wstrcmp(buf, L"bitmap")) element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP; - else if (!mir_tstrcmp(buf, L"text")) { + else if (!mir_wstrcmp(buf, L"text")) { element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } - else if (!mir_tstrcmp(buf, L"title")) { + else if (!mir_wstrcmp(buf, L"title")) { element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } - else if (!mir_tstrcmp(buf, L"avatar")) { + else if (!mir_wstrcmp(buf, L"avatar")) { element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR; } - else if (!mir_tstrcmp(buf, L"clock")) { + else if (!mir_wstrcmp(buf, L"clock")) { element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } } - else if (!mir_tstrcmp(buf, L"source")) { + else if (!mir_wstrcmp(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, L"mono")) { + else if (!mir_wstrcmp(buf, L"mono")) { element->type |= ST_MONO; } - else if (!mir_tstrcmp(buf, L"layer")) { + else if (!mir_wstrcmp(buf, L"layer")) { element->type |= ST_BLEND; } - else if (!mir_tstrcmp(buf, L"proportional")) { + else if (!mir_wstrcmp(buf, L"proportional")) { f >> element->proportional; } - else if (!mir_tstrcmp(buf, L"x")) { + else if (!mir_wstrcmp(buf, L"x")) { f.getline(buf, 1024); element->fx.set(buf); element->type &= ~ST_BADPOS; } - else if (!mir_tstrcmp(buf, L"y")) { + else if (!mir_wstrcmp(buf, L"y")) { f.getline(buf, 1024); element->fy.set(buf); element->type &= ~ST_BADPOS; } - else if (!mir_tstrcmp(buf, L"w")) { + else if (!mir_wstrcmp(buf, L"w")) { f.getline(buf, 1024); element->fw.set(buf); } - else if (!mir_tstrcmp(buf, L"h")) { + else if (!mir_wstrcmp(buf, L"h")) { f.getline(buf, 1024); element->fh.set(buf); } - else if (!mir_tstrcmp(buf, L"ifset")) { + else if (!mir_wstrcmp(buf, L"ifset")) { int id; f >> id; id--; element->flag_mask |= 1 << id; element->flags |= 1 << id; } - else if (!mir_tstrcmp(buf, L"ifnotset")) { + else if (!mir_wstrcmp(buf, L"ifnotset")) { int id; f >> id; id--; element->flag_mask |= 1 << id; element->flags &= ~(1 << id); } - else if (!mir_tstrcmp(buf, L"color")) { + else if (!mir_wstrcmp(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, L"clocksize")) { + else if (!mir_wstrcmp(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, L"end")) { + else if (!mir_wstrcmp(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(L"* Popup Classic"); + m_skins->name = mir_wstrdup(L"* Popup Classic"); m_skins->dir = new wchar_t[1024]; - mir_tstrcpy(m_skins->dir, L"res:classic.popupskin"); + mir_wstrcpy(m_skins->dir, L"res:classic.popupskin"); m_skins->skin = 0; wchar_t dir[1024] = { '\0' }; @@ -1098,7 +1098,7 @@ bool Skins::load() return false; } else { - mir_tstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir)); + mir_wstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir)); DWORD fa = GetFileAttributes(dir); if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY)) return false; @@ -1111,13 +1111,13 @@ bool Skins::load() WIN32_FIND_DATA ffd; HANDLE hFind = FindFirstFile(L"*.*", &ffd); while (hFind != INVALID_HANDLE_VALUE) { - if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(L".", ffd.cFileName) && mir_tstrcmp(L"..", ffd.cFileName)) { + if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_wstrcmp(L".", ffd.cFileName) && mir_wstrcmp(L"..", ffd.cFileName)) { SetCurrentDirectory(ffd.cFileName); skin = new SKINLIST; skin->next = m_skins; m_skins = skin; - m_skins->name = mir_tstrdup(ffd.cFileName); + m_skins->name = mir_wstrdup(ffd.cFileName); m_skins->dir = new wchar_t[1024]; GetCurrentDirectory(1024, m_skins->dir); m_skins->skin = 0; @@ -1139,9 +1139,9 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) { SKINLIST *any = 0; for (SKINLIST *p = m_skins; p; p = p->next) { - if (!mir_tstrcmp(p->name, L"* Popup Classic") || !any) + if (!mir_wstrcmp(p->name, L"* Popup Classic") || !any) any = p; - if (!mir_tstrcmpi(p->name, name)) { + if (!mir_wstrcmpi(p->name, name)) { any = p; break; } @@ -1166,7 +1166,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) void Skins::loadActiveSkin() { for (SKINLIST *p = m_skins; p; p = p->next) - if (!mir_tstrcmpi(p->name, PopupOptions.SkinPack)) { + if (!mir_wstrcmpi(p->name, PopupOptions.SkinPack)) { if (p->skin) break; @@ -1179,7 +1179,7 @@ void Skins::loadActiveSkin() void Skins::freeAllButActive() { for (SKINLIST *p = m_skins; p; p = p->next) - if (mir_tstrcmpi(p->name, PopupOptions.SkinPack)) { + if (mir_wstrcmpi(p->name, PopupOptions.SkinPack)) { delete p->skin; p->skin = NULL; } -- cgit v1.2.3