From 35e2289786a7f1542573d1a58ebc971970ea981c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Apr 2018 22:10:25 +0300 Subject: CLIST_INTERFACE::pfnGetContactDisplayName => Clist_GetContactDisplayName --- src/core/stdfile/src/file.cpp | 2 +- src/core/stdfile/src/filerecvdlg.cpp | 4 ++-- src/core/stdfile/src/filesenddlg.cpp | 2 +- src/core/stdfile/src/filexferdlg.cpp | 10 ++++------ 4 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 9982d6274c..089f5d999f 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -108,7 +108,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) Skin_PlaySound("RecvFile"); wchar_t szTooltip[256]; - mir_snwprintf(szTooltip, TranslateT("File from %s"), pcli->pfnGetContactDisplayName(hContact, 0)); + mir_snwprintf(szTooltip, TranslateT("File from %s"), Clist_GetContactDisplayName(hContact)); cle.szTooltip.w = szTooltip; cle.flags |= CLEF_UNICODE; diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 8efbb97dd2..36160ebdf0 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -136,7 +136,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, wchar_t *szDir, int cchDir, B REPLACEVARSARRAY rvaVarsToReplace[4]; rvaVarsToReplace[0].key.w = L"nick"; - rvaVarsToReplace[0].value.w = mir_wstrdup((wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0)); + rvaVarsToReplace[0].value.w = mir_wstrdup(Clist_GetContactDisplayName(hContact)); rvaVarsToReplace[1].key.w = L"userid"; rvaVarsToReplace[1].value.w = GetContactID(hContact); rvaVarsToReplace[2].key.w = L"proto"; @@ -203,7 +203,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l Button_SetIcon_IcoLib(hwndDlg, IDC_HISTORY, SKINICON_OTHER_HISTORY, LPGEN("View user's history")); Button_SetIcon_IcoLib(hwndDlg, IDC_USERMENU, SKINICON_OTHER_DOWNARROW, LPGEN("User menu")); - wchar_t *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0); + wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact); SetDlgItemText(hwndDlg, IDC_FROM, contactName); GetContactReceivedFilesDir(dat->hContact, szPath, _countof(szPath), TRUE); SetDlgItemText(hwndDlg, IDC_FILEDIR, szPath); diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp index 1a8bee4c54..51231895f0 100644 --- a/src/core/stdfile/src/filesenddlg.cpp +++ b/src/core/stdfile/src/filesenddlg.cpp @@ -235,7 +235,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SetFileListAndSizeControls(hwndDlg, dat); } - wchar_t *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0); + wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact); SetDlgItemText(hwndDlg, IDC_TO, contactName); ptrW id(Contact_GetInfo(CNF_UNIQUEID, dat->hContact)); diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index 37ae7a99e7..98c6f36fba 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -138,21 +138,19 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE if (dat->hIcon) DestroyIcon(dat->hIcon); dat->hIcon = nullptr; if (fn && (fts->totalFiles > 1)) { - mir_snwprintf(msg, L"%s: %s (%d %s %d)", - pcli->pfnGetContactDisplayName(fts->hContact, 0), - fn, fts->currentFileNumber + 1, TranslateT("of"), fts->totalFiles); + mir_snwprintf(msg, L"%s: %s (%d %s %d)", Clist_GetContactDisplayName(fts->hContact), fn, fts->currentFileNumber + 1, TranslateT("of"), fts->totalFiles); SHGetFileInfo(fn, FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON); dat->hIcon = shfi.hIcon; } else if (fn) { - mir_snwprintf(msg, L"%s: %s", pcli->pfnGetContactDisplayName(fts->hContact, 0), fn); + mir_snwprintf(msg, L"%s: %s", Clist_GetContactDisplayName(fts->hContact), fn); SHGetFileInfo(fn, FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON); dat->hIcon = shfi.hIcon; } else { - mir_wstrncpy(msg, pcli->pfnGetContactDisplayName(fts->hContact, 0), _countof(msg)); + mir_wstrncpy(msg, Clist_GetContactDisplayName(fts->hContact), _countof(msg)); HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_DOWNARROW); dat->hIcon = CopyIcon(hIcon); IcoLib_ReleaseIcon(hIcon, NULL); @@ -288,7 +286,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR Button_SetIcon_IcoLib(hwndDlg, IDCANCEL, SKINICON_OTHER_DELETE, LPGEN("Cancel")); - SetDlgItemText(hwndDlg, IDC_CONTACTNAME, pcli->pfnGetContactDisplayName(dat->hContact, 0)); + SetDlgItemText(hwndDlg, IDC_CONTACTNAME, Clist_GetContactDisplayName(dat->hContact)); if (!dat->waitingForAcceptance) SetTimer(hwndDlg, 1, 1000, nullptr); return TRUE; -- cgit v1.2.3