diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-05 22:10:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-05 22:10:25 +0300 |
commit | 35e2289786a7f1542573d1a58ebc971970ea981c (patch) | |
tree | da8887c793611fdbf6072fd477fd8c01c60b8b02 /plugins/Msg_Export | |
parent | f7c00d6dc53774d16b9721e79ed5d4017af63884 (diff) |
CLIST_INTERFACE::pfnGetContactDisplayName => Clist_GetContactDisplayName
Diffstat (limited to 'plugins/Msg_Export')
-rwxr-xr-x | plugins/Msg_Export/src/FileViewer.cpp | 2 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/main.cpp | 2 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 4 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 10 |
4 files changed, 8 insertions, 10 deletions
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index be585c029b..2933989a93 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -982,7 +982,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, wchar_t szFormat[200];
wchar_t szTitle[200];
if (GetWindowText(hwndDlg, szFormat, _countof(szFormat))) {
- const wchar_t *pszNick = pcli->pfnGetContactDisplayName(pclDlg->hContact, 0);
+ const wchar_t *pszNick = Clist_GetContactDisplayName(pclDlg->hContact);
tstring sPath = pclDlg->sPath;
string::size_type n = sPath.find_last_of('\\');
if (n != sPath.npos)
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 2afea9225a..94c7188e9c 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -18,7 +18,6 @@ #include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInstance = nullptr;
int hLangpack = 0;
@@ -183,7 +182,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 70da9b568c..64d2a01d83 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -92,7 +92,7 @@ public: int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
if (lParamSort == 1)
- return mir_wstrcmpi(pcli->pfnGetContactDisplayName(lParam1, 0), pcli->pfnGetContactDisplayName(lParam2, 0));
+ return mir_wstrcmpi(Clist_GetContactDisplayName(lParam1), Clist_GetContactDisplayName(lParam2));
if (lParamSort == 2)
return _DBGetString((MCONTACT)lParam1, "Protocol", "p", L"").compare(_DBGetString((MCONTACT)lParam2, "Protocol", "p", L""));
@@ -643,7 +643,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar sItem.mask = LVIF_TEXT;
sItem.iSubItem = 1;
- sItem.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ sItem.pszText = Clist_GetContactDisplayName(hContact);
ListView_SetItem(hMapUser, &sItem);
sItem.iSubItem = 2;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index b7baa46071..6112c82631 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -537,7 +537,7 @@ tstring GetFilePathFromUser(MCONTACT hContact) // Here we will try to avoide the (Unknown Contact) in cases where the protocol for
// this user has been removed.
- if (bNickUsed && (wcsstr(pcli->pfnGetContactDisplayName(hContact, 0), LPGENW("(Unknown Contact)")) != nullptr))
+ if (bNickUsed && (wcsstr(Clist_GetContactDisplayName(hContact), LPGENW("(Unknown Contact)")) != nullptr))
return sPrevFileName; // Then the filename must have changed from a correct path to one including the (Unknown Contact)
// file name has changed
@@ -561,7 +561,7 @@ tstring GetFilePathFromUser(MCONTACT hContact) bool bTryRename;
if (enRenameAction != eDAAutomatic) {
- tstring sRemoteUser = pcli->pfnGetContactDisplayName(hContact, 0);
+ tstring sRemoteUser = Clist_GetContactDisplayName(hContact);
mir_snwprintf(szTemp,
TranslateT("File name for the user \"%s\" has changed!\n\nfrom:\t%s\nto:\t%s\n\nDo you wish to rename file?"),
sRemoteUser.c_str(),
@@ -617,7 +617,7 @@ tstring GetFilePathFromUser(MCONTACT hContact) tstring FileNickFromHandle(MCONTACT hContact)
{
- tstring ret = pcli->pfnGetContactDisplayName(hContact, 0);
+ tstring ret = Clist_GetContactDisplayName(hContact);
string::size_type nCur = 0;
while ((nCur = ret.find_first_of(L":\\", nCur)) != ret.npos)
ret[nCur] = cBadCharReplace;
@@ -788,7 +788,7 @@ void UpdateFileToColWidth() clFileTo1ColWidth.clear();
for (auto &hContact : Contacts()) {
- tstring sNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ tstring sNick = Clist_GetContactDisplayName(hContact);
string::size_type &rnValue = clFileTo1ColWidth[GetFilePathFromUser(hContact)];
if (rnValue < sNick.size())
rnValue = sNick.size();
@@ -892,7 +892,7 @@ bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, tstring sFilePath, DBEVE }
else {
sLocalUser = ptrW(GetMyOwnNick(hContact));
- sRemoteUser = pcli->pfnGetContactDisplayName(hContact, 0);
+ sRemoteUser = Clist_GetContactDisplayName(hContact);
nFirstColumnWidth = max(sRemoteUser.size(), clFileTo1ColWidth[sFilePath]);
nFirstColumnWidth = max(sLocalUser.size(), nFirstColumnWidth);
nFirstColumnWidth += 2;
|