diff options
Diffstat (limited to 'plugins/ModernOpt/src')
-rw-r--r-- | plugins/ModernOpt/src/modernopt.cpp | 16 | ||||
-rw-r--r-- | plugins/ModernOpt/src/mopt_selector.cpp | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index 8ef64ff744..9f7716d456 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -121,7 +121,7 @@ static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const if (obj1->optObject.lptzSubsection && obj2->optObject.lptzSubsection)
{
- int c = mir_tstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection);
+ int c = mir_wstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection);
if (c) return c;
}
@@ -376,7 +376,7 @@ static int lstrcmp_null(wchar_t *p1, wchar_t *p2) if (!p1 && !p2) return 0;
if (!p1) return -1;
if (!p2) return 1;
- return mir_tstrcmp(p1, p2);
+ return mir_wstrcmp(p1, p2);
}
static void ModernOptUI_ShowPage(HWND hwndDlg, struct ModernOptionsData *dat, int iPage)
@@ -540,14 +540,14 @@ static INT_PTR svcModernOpt_AddObject(WPARAM wParam, LPARAM lParam) case MODERNOPT_TYPE_SUBSECTIONPAGE:
objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
- mir_u2t(obj->lpwzSubsection) :
- mir_a2t(obj->lpzSubsection);
+ mir_wstrdup(obj->lpwzSubsection) :
+ mir_a2u(obj->lpzSubsection);
break;
case MODERNOPT_TYPE_IGNOREOBJECT:
objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
- mir_u2t(obj->lpwzSubsection) :
- mir_a2t(obj->lpzSubsection);
+ mir_wstrdup(obj->lpwzSubsection) :
+ mir_a2u(obj->lpzSubsection);
objCopy->optObject.lpzIgnoreModule = mir_strdup(obj->lpzIgnoreModule);
objCopy->optObject.lpzIgnoreSetting = mir_strdup(obj->lpzIgnoreSetting);
objCopy->optObject.dwIgnoreBit = obj->dwIgnoreBit;
@@ -559,8 +559,8 @@ static INT_PTR svcModernOpt_AddObject(WPARAM wParam, LPARAM lParam) objCopy->optObject.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_SKINS);
objCopy->optObject.pfnDlgProc = ModernOptSelector_DlgProc;
objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
- mir_u2t(obj->lpwzSubsection) :
- mir_a2t(obj->lpzSubsection);
+ mir_wstrdup(obj->lpwzSubsection) :
+ mir_a2u(obj->lpzSubsection);
objCopy->optObject.lpzThemeExtension = mir_strdup(obj->lpzThemeExtension);
objCopy->optObject.lpzThemeModuleName = mir_strdup(obj->lpzThemeModuleName);
break;
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 5e97984584..24c7ebb47c 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -81,7 +81,7 @@ struct TSkinListItem TSkinListItem(wchar_t *fn)
{
- title = mir_tstrdup(fn);
+ title = mir_wstrdup(fn);
if (wchar_t *p = wcsrchr(title, '.'))
*p = 0;
@@ -91,9 +91,9 @@ struct TSkinListItem path = (wchar_t *)mir_alloc(MAX_PATH * sizeof(wchar_t));
PathToRelativeT(curPath, path);
- size_t length = mir_tstrlen(curPath) + mir_tstrlen(fn) + 2;
+ size_t length = mir_wstrlen(curPath) + mir_wstrlen(fn) + 2;
filename = (wchar_t *)mir_alloc(length * sizeof(wchar_t));
- mir_sntprintf(filename, length, L"%s\\%s", curPath, fn);
+ mir_snwprintf(filename, length, L"%s\\%s", curPath, fn);
}
~TSkinListItem()
@@ -123,8 +123,8 @@ struct TSelectorData static bool CheckExt(wchar_t *fn, wchar_t *ext, int n)
{
- size_t l = mir_tstrlen(fn);
- return (l > n) && !mir_tstrcmp(fn + l - n, ext);
+ size_t l = mir_wstrlen(fn);
+ return (l > n) && !mir_wstrcmp(fn + l - n, ext);
}
static void BuildSkinList(HWND hwndList, wchar_t *szExt, int nExtLength = -1, bool start = true)
@@ -135,7 +135,7 @@ static void BuildSkinList(HWND hwndList, wchar_t *szExt, int nExtLength = -1, bo if (wchar_t *p = wcsrchr(mirPath, '\\')) *p = 0;
SetCurrentDirectory(mirPath);
SendMessage(hwndList, LB_RESETCONTENT, 0, 0);
- nExtLength = (int)mir_tstrlen(szExt);
+ nExtLength = (int)mir_wstrlen(szExt);
SendMessage(hwndList, WM_SETREDRAW, FALSE, 0);
}
@@ -143,7 +143,7 @@ static void BuildSkinList(HWND hwndList, wchar_t *szExt, int nExtLength = -1, bo HANDLE h = FindFirstFile(L"*.*", &ffd);
if (h != INVALID_HANDLE_VALUE) {
do {
- if (!mir_tstrcmp(ffd.cFileName, L"") || !mir_tstrcmp(ffd.cFileName, L".") || !mir_tstrcmp(ffd.cFileName, L".."))
+ if (!mir_wstrcmp(ffd.cFileName, L"") || !mir_wstrcmp(ffd.cFileName, L".") || !mir_wstrcmp(ffd.cFileName, L".."))
continue;
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
@@ -300,7 +300,7 @@ INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wPara int cxIcon = GetSystemMetrics(SM_CXSMICON);
int cyIcon = GetSystemMetrics(SM_CYSMICON);
- if (sd->active && !mir_tstrcmp(sd->active, dat->filename)) {
+ if (sd->active && !mir_wstrcmp(sd->active, dat->filename)) {
DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top + lps->rcItem.bottom - cyIcon) / 2,
Skin_LoadIcon(SKINICON_OTHER_EMPTYBLOB),
cxIcon, cyIcon, 0, NULL, DI_NORMAL);
|