From d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 21:20:14 +0000 Subject: new sorting functions applied git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdclist/src/clcpaint.cpp | 2 +- src/core/stdclist/src/clistopts.cpp | 4 ++-- src/core/stdfile/fileexistsdlg.cpp | 2 +- src/core/stdurl/url.cpp | 2 +- src/core/stdurl/urldialogs.cpp | 4 ++-- src/core/stduserinfo/contactinfo.cpp | 6 +++--- src/core/stduserinfo/userinfo.cpp | 20 ++++++++++---------- 7 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/core') diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index d312d5ce4a..49be0fca84 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -132,7 +132,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) return status; for (int i = 0; i < pcli->hClcProtoCount; i++) - if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) + if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) return pcli->clcProto[i].dwStatus; return status; diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 4bff8fb660..68fb593cf6 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -31,7 +31,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && - lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) + mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); } @@ -133,7 +133,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP continue; item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM) accs[i]->tszAccountName); SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM) accs[i]); - if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName)) + if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName)) SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0); } db_free(&dbv); diff --git a/src/core/stdfile/fileexistsdlg.cpp b/src/core/stdfile/fileexistsdlg.cpp index 4bf7da405a..bf44d2e70b 100644 --- a/src/core/stdfile/fileexistsdlg.cpp +++ b/src/core/stdfile/fileexistsdlg.cpp @@ -161,7 +161,7 @@ void __cdecl LoadIconsAndTypesThread(void* param) SetDlgItemText(info->hwndDlg, IDC_NEWTYPE, fileInfo.szTypeName); SendDlgItemMessage(info->hwndDlg, IDC_EXISTINGICON, STM_SETICON, (WPARAM)fileInfo.hIcon, 0); szIconFile[0] = '\0'; - if (!lstrcmp(szExtension, _T("EXE"))) + if (!mir_tstrcmp(szExtension, _T("EXE"))) SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("2"), szIconFile, SIZEOF(szIconFile)); else { TCHAR szTypeName[MAX_PATH]; diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index 40cb58fcda..26775df7af 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -98,7 +98,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; char *szProto = GetContactProto(wParam); - if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto))) + if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto))) return 0; WindowList_Broadcast(hUrlWindowList, DM_UPDATETITLE, 0, 0); diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp index 1e11c7b2c5..779055f238 100644 --- a/src/core/stdurl/urldialogs.cpp +++ b/src/core/stdurl/urldialogs.cpp @@ -73,7 +73,7 @@ static void sttUpdateTitle(HWND hwndDlg, MCONTACT hContact) GetWindowText(hwndDlg, oldtitle, SIZEOF(oldtitle)); - if (lstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed + if (mir_tstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed SetWindowText(hwndDlg, newtitle); } @@ -352,7 +352,7 @@ static void AddBrowserPageToCombo(char *url, HWND hwndCombo) if (SendMessage(hwndCombo, CB_GETLBTEXTLEN, i, 0) >= SIZEOF(szExistingUrl)) continue; SendMessageA(hwndCombo, CB_GETLBTEXT, i, (LPARAM)szExistingUrl); - if ( !lstrcmpA(szExistingUrl, url)) return; + if ( !mir_strcmp(szExistingUrl, url)) return; } i = SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LPARAM)url); szItemData = mir_strdup(title); diff --git a/src/core/stduserinfo/contactinfo.cpp b/src/core/stduserinfo/contactinfo.cpp index 1d78f2cc13..06a9a6c2e7 100644 --- a/src/core/stduserinfo/contactinfo.cpp +++ b/src/core/stduserinfo/contactinfo.cpp @@ -68,7 +68,7 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam); if (szText[0]) SetWindowText(hwndDlg, TranslateT("Edit phone number")); TranslateDialogDefault(hwndDlg); - if (mir_strlen(szText)>4 && !lstrcmpA(szText+mir_strlen(szText)-4, " SMS")) { + if (mir_strlen(szText)>4 && !mir_strcmp(szText+mir_strlen(szText)-4, " SMS")) { CheckDlgButton(hwndDlg, IDC_SMS, BST_CHECKED); szText[mir_strlen(szText)-4] = '\0'; } @@ -328,7 +328,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if ( !db_get_ts(hContact, szProto, "Cellular", &dbv)) { lvi.pszText = TranslateT("Mobile"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); - if (mir_strlen(dbv.pszVal)>4 && !lstrcmpA(dbv.pszVal+mir_strlen(dbv.pszVal)-4, " SMS")) { + if (mir_strlen(dbv.pszVal)>4 && !mir_strcmp(dbv.pszVal+mir_strlen(dbv.pszVal)-4, " SMS")) { ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y")); dbv.ptszVal[mir_tstrlen(dbv.ptszVal)-4] = '\0'; } @@ -359,7 +359,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.pszText = idstr2; mir_sntprintf(idstr2, SIZEOF(idstr2), TranslateT("Custom %d"), i+1); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); - if (mir_tstrlen(dbv.ptszVal)>4 && !lstrcmp(dbv.ptszVal+mir_tstrlen(dbv.ptszVal)-4, _T(" SMS"))) { + if (mir_tstrlen(dbv.ptszVal)>4 && !mir_tstrcmp(dbv.ptszVal+mir_tstrlen(dbv.ptszVal)-4, _T(" SMS"))) { ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y")); dbv.ptszVal[mir_tstrlen(dbv.ptszVal)-4] = '\0'; } diff --git a/src/core/stduserinfo/userinfo.cpp b/src/core/stduserinfo/userinfo.cpp index 4c49f3ab64..e3a48d3837 100644 --- a/src/core/stduserinfo/userinfo.cpp +++ b/src/core/stduserinfo/userinfo.cpp @@ -78,18 +78,18 @@ static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2) { int res; TCHAR *s1 = getTitle(item1), *s2 = getTitle(item2); - if (!lstrcmp(s1, TranslateT("Summary"))) return -1; - if (!lstrcmp(s2, TranslateT("Summary"))) return 1; - if (res = lstrcmp(s1, s2)) return res; + if (!mir_tstrcmp(s1, TranslateT("Summary"))) return -1; + if (!mir_tstrcmp(s2, TranslateT("Summary"))) return 1; + if (res = mir_tstrcmp(s1, s2)) return res; s1 = getTab(item1), s2 = getTab(item2); if (s1 && !s2) return -1; if (!s1 && s2) return 1; if (!s1 && !s2) return 0; - if (s1 && !lstrcmp(s1, TranslateT("General"))) return -1; - if (s2 && !lstrcmp(s2, TranslateT("General"))) return 1; - return lstrcmp(s1, s2); + if (s1 && !mir_tstrcmp(s1, TranslateT("General"))) return -1; + if (s2 && !mir_tstrcmp(s2, TranslateT("General"))) return 1; + return mir_tstrcmp(s1, s2); } static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM) @@ -182,13 +182,13 @@ static void CreateDetailsTabs(HWND hwndDlg, DetailsData *dat, DetailsPageData *p TabCtrl_DeleteAllItems(hwndTab); for (int i = 0; i < dat->pageCount; i++) { DetailsPageData &odp = dat->opd[i]; - if (!odp.ptszTab || lstrcmp(odp.ptszTitle, ppg->ptszTitle)) + if (!odp.ptszTab || mir_tstrcmp(odp.ptszTitle, ppg->ptszTitle)) continue; tie.pszText = TranslateTH(odp.hLangpack, odp.ptszTab); tie.lParam = i; TabCtrl_InsertItem(hwndTab, pages, &tie); - if (!lstrcmp(odp.ptszTab, ppg->ptszTab)) + if (!mir_tstrcmp(odp.ptszTab, ppg->ptszTab)) sel = pages; pages++; } @@ -299,7 +299,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP p.ptszTab = odp[i].ptszTab; p.hLangpack = odp[i].hLangpack; - if (i && p.ptszTab && !lstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) { + if (i && p.ptszTab && !mir_tstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) { p.hItem = dat->opd[i - 1].hItem; continue; } @@ -313,7 +313,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP tvis.item.pszText = p.ptszTitle; else tvis.item.pszText = TranslateTH(p.hLangpack, p.ptszTitle); - if (ptszLastTab && !lstrcmp(tvis.item.pszText, ptszLastTab)) + if (ptszLastTab && !mir_tstrcmp(tvis.item.pszText, ptszLastTab)) dat->currentPage = i; p.hItem = TreeView_InsertItem(hwndTree, &tvis); } -- cgit v1.2.3