summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-05 22:10:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-05 22:10:25 +0300
commit35e2289786a7f1542573d1a58ebc971970ea981c (patch)
treeda8887c793611fdbf6072fd477fd8c01c60b8b02
parentf7c00d6dc53774d16b9721e79ed5d4017af63884 (diff)
CLIST_INTERFACE::pfnGetContactDisplayName => Clist_GetContactDisplayName
-rw-r--r--include/delphi/m_clist.inc5
-rw-r--r--include/delphi/m_clistint.inc1
-rw-r--r--include/m_clist.h8
-rw-r--r--include/m_clistint.h4
-rw-r--r--libs/win32/mir_app.libbin149678 -> 149958 bytes
-rw-r--r--libs/win64/mir_app.libbin145212 -> 145472 bytes
-rw-r--r--plugins/AVS/src/main.cpp3
-rw-r--r--plugins/AVS/src/options.cpp2
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp4
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/AvatarHistory/src/popup.cpp6
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp4
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp12
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp8
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp4
-rw-r--r--plugins/Clist_blind/src/contact.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp4
-rw-r--r--plugins/Clist_nicer/src/clc.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/CmdLine/src/utils.cpp2
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/ContactsPlus/src/send.cpp2
-rw-r--r--plugins/ContactsPlus/src/utils.cpp2
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp2
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp2
-rw-r--r--plugins/FavContacts/src/favlist.h2
-rw-r--r--plugins/FavContacts/src/http_api.cpp2
-rw-r--r--plugins/FavContacts/src/main.cpp3
-rw-r--r--plugins/FavContacts/src/menu.cpp4
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp4
-rw-r--r--plugins/FloatingContacts/src/main.cpp6
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_dlg.cpp2
-rw-r--r--plugins/HistoryStats/src/main.cpp2
-rw-r--r--plugins/HistoryStats/src/mirandahistory.cpp2
-rw-r--r--plugins/HistoryStats/src/settingsserializer.cpp2
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp2
-rw-r--r--plugins/ImportTXT/importtxtdlg.pas2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp2
-rw-r--r--plugins/ListeningTo/src/main.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MirFox/src/MirandaInterface.cpp3
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp2
-rw-r--r--plugins/MirOTR/src/dllmain.cpp2
-rw-r--r--plugins/MirOTR/src/utils.cpp4
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp2
-rwxr-xr-xplugins/Msg_Export/src/FileViewer.cpp2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp2
-rwxr-xr-xplugins/Msg_Export/src/options.cpp4
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp10
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/ReadAwayMsg.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp2
-rw-r--r--plugins/NewEventNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp10
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/xstatus.cpp6
-rwxr-xr-xplugins/New_GPG/src/init.cpp3
-rwxr-xr-xplugins/New_GPG/src/messages.cpp66
-rwxr-xr-xplugins/New_GPG/src/options.cpp6
-rwxr-xr-xplugins/New_GPG/src/ui.cpp2
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp18
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp4
-rw-r--r--plugins/QuickMessages/src/Utils.cpp2
-rw-r--r--plugins/QuickMessages/src/main.cpp2
-rw-r--r--plugins/QuickSearch/i_ok.inc2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/SMS/src/options.cpp2
-rw-r--r--plugins/SMS/src/receive.cpp4
-rw-r--r--plugins/SMS/src/recvdlg.cpp2
-rw-r--r--plugins/SMS/src/senddlg.cpp6
-rw-r--r--plugins/Scriver/src/infobar.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp6
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp6
-rw-r--r--plugins/Scriver/src/msgtimedout.cpp2
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp4
-rw-r--r--plugins/SecureIM/src/crypt_popups.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp2
-rw-r--r--plugins/SeenPlugin/src/history.cpp4
-rw-r--r--plugins/SeenPlugin/src/main.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Options.cpp2
-rw-r--r--plugins/ShellExt/src/main.cpp2
-rw-r--r--plugins/ShellExt/src/shlcom.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp2
-rw-r--r--plugins/Spamotron/src/utils.cpp2
-rw-r--r--plugins/SplashScreen/src/debug.h2
-rw-r--r--plugins/SplashScreen/src/main.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp4
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp2
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp4
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/srmm.cpp2
-rw-r--r--plugins/TabSRMM/src/trayicon.cpp2
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp2
-rw-r--r--plugins/TipperYM/src/popwin.cpp4
-rw-r--r--plugins/TipperYM/src/subst.cpp2
-rw-r--r--plugins/TipperYM/src/tipper.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp2
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp2
-rw-r--r--plugins/UserInfoEx/src/mir_db.h3
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp12
-rw-r--r--plugins/Utils.pas/mircontacts.pas2
-rw-r--r--plugins/Variables/src/main.cpp2
-rw-r--r--plugins/Variables/src/parse_miranda.cpp2
-rw-r--r--plugins/Watrack/proto/proto.pas2
-rw-r--r--plugins/Weather/src/weather_mwin.cpp2
-rw-r--r--plugins/WebView/src/main.cpp2
-rw-r--r--plugins/WebView/src/webview_alerts.cpp2
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp3
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp4
-rw-r--r--plugins/WhenWasIt/src/notifiers.cpp8
-rw-r--r--plugins/WinterSpeak/src/UserInformation.cpp4
-rw-r--r--plugins/WinterSpeak/src/main.cpp2
-rw-r--r--plugins/XSoundNotify/src/dialog.cpp2
-rw-r--r--plugins/XSoundNotify/src/options.cpp2
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp2
-rw-r--r--plugins/YARelay/src/main.cpp4
-rw-r--r--plugins/YARelay/src/options.cpp2
-rw-r--r--plugins/wbOSD/src/events.cpp8
-rw-r--r--plugins/wbOSD/src/main.cpp2
-rw-r--r--protocols/FacebookRM/src/main.cpp2
-rw-r--r--protocols/FacebookRM/src/process.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/IcqOscarJ/src/init.cpp2
-rw-r--r--protocols/IcqOscarJ/src/stdpackets.cpp2
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp4
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_events.cpp2
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp2
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp2
-rw-r--r--protocols/MRA/src/MraChat.cpp4
-rw-r--r--protocols/MRA/src/MraProto.cpp2
-rw-r--r--protocols/MRA/src/MraSelectEMail.cpp2
-rw-r--r--protocols/MRA/src/Mra_functions.cpp2
-rw-r--r--protocols/MRA/src/Mra_menus.cpp2
-rw-r--r--protocols/MRA/src/Mra_proto.cpp6
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
-rw-r--r--protocols/MSN/src/msn_std.cpp2
-rw-r--r--protocols/Sametime/src/sametime.cpp2
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_dialogs.cpp10
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp4
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp9
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdaway/src/main.cpp2
-rw-r--r--src/core/stdclist/src/contact.cpp4
-rw-r--r--src/core/stdfile/src/file.cpp2
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp4
-rw-r--r--src/core/stdfile/src/filesenddlg.cpp2
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp10
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp4
-rw-r--r--src/core/stdmsg/src/msglog.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp6
-rw-r--r--src/core/stdmsg/src/tabs.cpp2
-rw-r--r--src/core/stduihist/src/history.cpp2
-rw-r--r--src/core/stduihist/src/main.cpp2
-rw-r--r--src/core/stduserinfo/src/main.cpp2
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp2
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
-rw-r--r--src/mir_app/src/addcontact.cpp4
-rw-r--r--src/mir_app/src/chat_tools.cpp2
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clc.h1
-rw-r--r--src/mir_app/src/clcitems.cpp4
-rw-r--r--src/mir_app/src/clcutils.cpp2
-rw-r--r--src/mir_app/src/clistcore.cpp1
-rw-r--r--src/mir_app/src/clistsettings.cpp2
-rw-r--r--src/mir_app/src/clui.cpp2
-rw-r--r--src/mir_app/src/db_events.cpp4
-rw-r--r--src/mir_app/src/meta_addto.cpp4
-rw-r--r--src/mir_app/src/meta_edit.cpp6
-rw-r--r--src/mir_app/src/meta_menu.cpp2
-rw-r--r--src/mir_app/src/meta_services.cpp2
-rw-r--r--src/mir_app/src/meta_utils.cpp4
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/path.cpp18
212 files changed, 321 insertions, 410 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 7d9c279396..e71cc3e622 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -155,6 +155,11 @@ const
function Clist_GetContactIcon(hContact:TMCONTACT) : integer; stdcall; external AppDll;
{
+ returns a static display name for a contact
+ }
+ function Clist_GetContactDisplayName(hContact:TMCONTACT; mode:int):PWideChar; stdcall; external AppDll;
+
+ {
wParam : 0
lParam : 0
Affect : Toggles the show/hide status of the contact list
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 37b83db0e3..809a18cd3a 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -384,7 +384,6 @@ type
pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
- pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):PWideChar; cdecl;
pfnInvalidateDisplayNameCacheEntry : procedure (hContact:TMCONTACT); cdecl;
(* clisttray.c *)
diff --git a/include/m_clist.h b/include/m_clist.h
index fb41feefc9..463ce493c2 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -480,6 +480,14 @@ EXTERN_C MIR_APP_DLL(int) Clist_ContactChangeGroup(MCONTACT hContact, MGROUP hGr
EXTERN_C MIR_APP_DLL(int) Clist_ContactCompare(MCONTACT hContact1, MCONTACT hContact2);
/////////////////////////////////////////////////////////////////////////////////////////
+// returns a static display name for a contact
+
+#define GCDNF_NOMYHANDLE 1 // will never return the user's custom name
+#define GCDNF_NOCACHE 4 // will not use the cache
+
+EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, int mode = 0);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// DRAG-N-DROP SUPPORT
/////////////////////////////////////////////////////////////////////////////////////////
// a contact is being dragged outside the main window
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 2cf393a059..2c7d9ec763 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -391,10 +391,6 @@ struct CLIST_INTERFACE
void (*pfnCheckCacheItem)(ClcCacheEntry*);
void (*pfnFreeCacheItem)(ClcCacheEntry*);
- #define GCDNF_NOMYHANDLE 1 // will never return the user's custom name
- #define GCDNF_NOCACHE 4 // will not use the cache
-
- wchar_t* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
void (*pfnInvalidateDisplayNameCacheEntry)(MCONTACT hContact);
/* clisttray.c */
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 69153d2fd8..494deb0944 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index cc9950341e..5fcf370069 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index e98e60b23a..d36bac1e4e 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
-
HINSTANCE g_hInst = nullptr;
HICON g_hIcon = nullptr;
bool g_shutDown = false;
@@ -385,7 +383,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
LoadACC();
return LoadAvatarModule();
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index d540b4ef83..e02a04cbd8 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -492,7 +492,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
TranslateDialogDefault(hwndDlg);
if (hContact) {
wchar_t szTitle[512];
- mir_snwprintf(szTitle, TranslateT("Set avatar options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTitle, TranslateT("Set avatar options for %s"), Clist_GetContactDisplayName(hContact));
SetWindowText(hwndDlg, szTitle);
}
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index 81de39ed09..1ee20d6f8f 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -67,7 +67,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
void ShowPopup(MCONTACT hContact, const wchar_t *msg)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- wchar_t *lpzContactName = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact);
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 4bbd6495e5..987d5cf803 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -125,7 +125,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
else
FillAvatarListFromFiles(hwndList, data->hContact);
- wchar_t *displayName = pcli->pfnGetContactDisplayName(data->hContact, 0);
+ wchar_t *displayName = Clist_GetContactDisplayName(data->hContact);
if (displayName) {
wchar_t title[MAX_PATH];
mir_snwprintf(title, TranslateT("Avatar history for %s"), displayName);
@@ -530,7 +530,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact)
wcsncpy_s(file, (wcsrchr(fn, '\\') + 1), _TRUNCATE);
ofn.lpstrFile = file;
- wchar_t *displayName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *displayName = Clist_GetContactDisplayName(hContact);
wchar_t title[MAX_PATH];
if (displayName) {
mir_snwprintf(title, TranslateT("Save avatar for %s"), displayName);
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index 3e1d86f3f8..476171afdd 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -23,7 +23,6 @@ Avatar History Plugin
*/
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
DWORD mirVer;
@@ -291,7 +290,6 @@ static INT_PTR CALLBACK FirstRunDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
CoInitialize(nullptr);
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index 6d4ef5c8ab..2b5dfd3165 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -104,8 +104,7 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip
if (title != nullptr)
mir_wstrncpy(ppd.lptzContactName, title, _countof(ppd.lptzContactName));
else if (hContact != NULL)
- mir_wstrncpy(ppd.lptzContactName, (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0),
- _countof(ppd.lptzContactName));
+ mir_wstrncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), _countof(ppd.lptzContactName));
if (description != nullptr)
mir_wstrncpy(ppd.lptzText, description, _countof(ppd.lptzText));
@@ -163,8 +162,7 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip
PUAddPopupT(&ppd);
}
else {
- MessageBox(nullptr, description, title ? title : (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0),
- MB_OK);
+ MessageBox(nullptr, description, title ? title : Clist_GetContactDisplayName(hContact), MB_OK);
}
}
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 3b0723658f..0b18e83ab5 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
#define MS_HISTORY_DELETEALLCONTACTHISTORY "BasicHistory/DeleteAllContactHistory"
@@ -243,7 +242,6 @@ int ModulesLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
hTaskMainMenu = nullptr;
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index 829d636c96..4906732d31 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -343,7 +343,7 @@ void HistoryEventList::InitNames()
{
wchar_t str[200];
if (m_hContact) {
- wcscpy_s(m_contactName, pcli->pfnGetContactDisplayName(m_hContact, 0));
+ wcscpy_s(m_contactName, Clist_GetContactDisplayName(m_hContact));
mir_snwprintf(str, TranslateT("History for %s"), m_contactName);
}
else {
@@ -389,7 +389,7 @@ void HistoryEventList::AddGroup(const EventIndex& ev)
std::wstring HistoryEventList::GetContactName()
{
if (m_hContact)
- return pcli->pfnGetContactDisplayName(m_hContact, 0);
+ return Clist_GetContactDisplayName(m_hContact);
return TranslateT("System");
}
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 030fbeb15c..85b579f761 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -229,7 +229,7 @@ bool isContactGoneFor(MCONTACT hContact, int days)
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- mir_snwprintf(ppd.lptzContactName, TranslateT("Hiding %s (%S)"), pcli->pfnGetContactDisplayName(hContact, 0), GetContactProto(hContact));
+ mir_snwprintf(ppd.lptzContactName, TranslateT("Hiding %s (%S)"), Clist_GetContactDisplayName(hContact), GetContactProto(hContact));
mir_snwprintf(ppd.lptzText, TranslateT("%d days since last message"), daysSinceMessage);
if (!options.iUsePopupColors) {
@@ -263,7 +263,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- wcsncpy(ppd.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
+ wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
wcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -282,7 +282,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message)
cle.pszService = "BuddyExpectator/actionReturned";
cle.flags = CLEF_UNICODE;
- wchar_t* nick = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t* nick = Clist_GetContactDisplayName(hContact);
wchar_t tmpMsg[512];
mir_snwprintf(tmpMsg, L"%s %s", nick, message);
cle.szTooltip.w = tmpMsg;
@@ -300,7 +300,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message)
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- wcsncpy(ppd.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
+ wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
wcsncpy(ppd.lptzText, message, MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
@@ -319,7 +319,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message)
cle.hIcon = hIcon;
cle.pszService = "BuddyExpectator/actionStillAbsent";
- wchar_t* nick = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t* nick = Clist_GetContactDisplayName(hContact);
wchar_t tmpMsg[512];
mir_snwprintf(tmpMsg, L"%s %s", nick, message);
cle.szTooltip.w = tmpMsg;
@@ -483,7 +483,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam)
ppd.lchContact = hContact;
ppd.lchIcon = IcoLib_GetIcon("enabled_icon");
- wcsncpy(ppd.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
+ wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
wcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors) {
ppd.colorBack = options.iPopupColorBack;
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index 8ae3ed9b05..724d740347 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
wchar_t name[300];
- mir_snwprintf(name, L"%s (%s)", pcli->pfnGetContactDisplayName(hContact, 0), _A2T(szProto));
+ mir_snwprintf(name, L"%s (%s)", Clist_GetContactDisplayName(hContact), _A2T(szProto));
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
@@ -524,7 +524,7 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_TIMER:
{
wchar_t message[1024];
- mir_snwprintf(message, TranslateT("Pounce being sent to %s in %d seconds"), pcli->pfnGetContactDisplayName(spdps->hContact, 0), spdps->timer);
+ mir_snwprintf(message, TranslateT("Pounce being sent to %s in %d seconds"), Clist_GetContactDisplayName(spdps->hContact), spdps->timer);
SetDlgItemText(hwnd, LBL_CONTACT, message);
}
spdps->timer--;
@@ -601,12 +601,12 @@ void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess)
HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), nullptr, PounceSentDlgProc, hContact);
wchar_t msg[256];
if (SentSuccess) {
- mir_snwprintf(msg, TranslateT("Message successfully sent to %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(msg, TranslateT("Message successfully sent to %s"), Clist_GetContactDisplayName(hContact));
SetDlgItemText(hwnd, IDOK, TranslateT("OK"));
ShowWindow(GetDlgItem(hwnd, IDCANCEL), 0);
}
else {
- mir_snwprintf(msg, TranslateT("Message failed to send to %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(msg, TranslateT("Message failed to send to %s"), Clist_GetContactDisplayName(hContact));
SetDlgItemText(hwnd, IDOK, TranslateT("Retry"));
}
SetDlgItemText(hwnd, LBL_CONTACT, msg);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 7cb321e292..0f8e9fe5af 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -1,6 +1,5 @@
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE hInst;
MWindowList hWindowList;
@@ -231,7 +230,6 @@ INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, UserOnlineSettingChanged);
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 13d278ad16..2e1b3c7a7e 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -19,7 +19,6 @@
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE g_hInstance;
HANDLE g_hMainThread;
HGENMENU g_hTogglePopupsMenuItem;
@@ -167,7 +166,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd)
ppd.lchIcon = Skin_LoadProtoIcon(szProto, db_get_w(sd->hContact, szProto, "Status", ID_STATUS_OFFLINE));
pdata->hIcon = nullptr;
}
- wcsncpy(ppd.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(sd->hContact, 0), _countof(ppd.lptzContactName) - 1);
+ wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(sd->hContact), _countof(ppd.lptzContactName) - 1);
wcsncpy(ppd.lptzText, PopupText, _countof(ppd.lptzText) - 1);
ppd.colorBack = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFBGCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_BGCOLOUR));
ppd.colorText = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFTEXTCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_TEXTCOLOUR));
@@ -351,7 +350,6 @@ int MirandaLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
diff --git a/plugins/Clist_blind/src/contact.cpp b/plugins/Clist_blind/src/contact.cpp
index cb28daae58..f9881fcd1b 100644
--- a/plugins/Clist_blind/src/contact.cpp
+++ b/plugins/Clist_blind/src/contact.cpp
@@ -84,10 +84,10 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
}
wchar_t namea[128];
- wchar_t *nameb = pcli->pfnGetContactDisplayName(a, 0);
+ wchar_t *nameb = Clist_GetContactDisplayName(a);
wcsncpy_s(namea, nameb, _TRUNCATE);
namea[ _countof(namea)-1 ] = 0;
- nameb = pcli->pfnGetContactDisplayName(b, 0);
+ nameb = Clist_GetContactDisplayName(b);
//otherwise just compare names
return mir_wstrcmpi(namea, nameb);
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 428faca9e7..7be75f489f 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -474,7 +474,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
return;
ClcCacheEntry *pdnce = contact->pce;
- wchar_t *name = pcli->pfnGetContactDisplayName(contact->hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(contact->hContact);
if (dat->first_line_append_nick && !dat->bForceInDialog) {
DBVARIANT dbv = { 0 };
if (!db_get_ws(pdnce->hContact, pdnce->szProto, "Nick", &dbv)) {
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index 00a773967a..063a41c14b 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -283,7 +283,7 @@ void cliBeginRenameSelection(HWND hwnd, ClcData *dat)
if (contact->type == CLCIT_GROUP)
dat->hwndRenameEdit = CreateWindow(L"EDIT", contact->szText, WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, nullptr, g_hInst, nullptr);
else
- dat->hwndRenameEdit = CreateWindow(L"EDIT", pcli->pfnGetContactDisplayName(contact->hContact, 0), WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, nullptr, g_hInst, nullptr);
+ dat->hwndRenameEdit = CreateWindow(L"EDIT", Clist_GetContactDisplayName(contact->hContact), WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, nullptr, g_hInst, nullptr);
SetWindowLongPtr(dat->hwndRenameEdit, GWL_STYLE, GetWindowLongPtr(dat->hwndRenameEdit, GWL_STYLE)&(~WS_CAPTION) | WS_BORDER);
SetWindowLongPtr(dat->hwndRenameEdit, GWLP_USERDATA, (LONG_PTR)dat);
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 0278b00bbb..290b7fbf04 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -109,7 +109,7 @@ CListEvent* cli_AddEvent(CLISTEVENT *cle)
}
char *szProto = GetContactProto(p->hContact);
- wchar_t *szName = pcli->pfnGetContactDisplayName(p->hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(p->hContact);
if (szProto && szName) {
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) malloc(sizeof(struct NotifyMenuItemExData));
if (nmi) {
@@ -287,7 +287,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);
rc.left += 26;
if (g_CluiData.hUpdateContact != 0) {
- wchar_t *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(g_CluiData.hUpdateContact);
int iIcon = Clist_GetContactIcon(g_CluiData.hUpdateContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -302,7 +302,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
GetMenuItemInfo(g_CluiData.hMenuNotify, iCount - 1, TRUE, &mii);
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
- wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(nmi->hContact);
int iIcon = Clist_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index 0349d110f8..1dbfe85f35 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -43,7 +43,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
if (pdnce->hContact == 0) { //selfcontact
if (!pdnce->tszName)
- pdnce->tszName = pcli->pfnGetContactDisplayName(0, GCDNF_NOCACHE);
+ pdnce->tszName = Clist_GetContactDisplayName(0, GCDNF_NOCACHE);
return;
}
@@ -54,7 +54,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce)
}
if (pdnce->tszName == nullptr) {
- pdnce->tszName = pcli->pfnGetContactDisplayName(pdnce->hContact, GCDNF_NOCACHE);
+ pdnce->tszName = Clist_GetContactDisplayName(pdnce->hContact, GCDNF_NOCACHE);
pdnce->m_bIsUnknown = !mir_wstrcmp(pdnce->tszName, UnknownConctactTranslatedName);
}
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 9f87d88961..ca0c6c673c 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -404,7 +404,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case INTM_NAMECHANGED:
if (!Clist_FindItem(hwnd, dat, wParam, &contact, nullptr, nullptr))
break;
- mir_wstrncpy(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), _countof(contact->szText));
+ mir_wstrncpy(contact->szText, Clist_GetContactDisplayName(wParam), _countof(contact->szText));
RTL_DetectAndSet(contact, 0);
@@ -490,7 +490,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
contact->proto = GetContactProto(wParam);
pcli->pfnInvalidateDisplayNameCacheEntry(wParam);
- mir_wstrncpy(contact->szText, pcli->pfnGetContactDisplayName(wParam, 0), _countof(contact->szText));
+ mir_wstrncpy(contact->szText, Clist_GetContactDisplayName(wParam), _countof(contact->szText));
RTL_DetectAndSet(contact, 0);
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 5a8ff6e979..82a98901a8 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -271,7 +271,7 @@ void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
memset(infoTypeC2, 0, sizeof(infoTypeC2));
if (contact == nullptr) {
- szText = pcli->pfnGetContactDisplayName(hContact, 0);
+ szText = Clist_GetContactDisplayName(hContact);
p = cfg::getCache(hContact, nullptr);
}
else {
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index 88dbc9f368..b95a9d2a19 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -200,7 +200,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
rc->left += 26;
int iCount = GetMenuItemCount(cfg::dat.hMenuNotify);
if (cfg::dat.hUpdateContact != 0) {
- wchar_t *szName = pcli->pfnGetContactDisplayName(cfg::dat.hUpdateContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(cfg::dat.hUpdateContact);
int iIcon = Clist_GetContactIcon(cfg::dat.hUpdateContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -215,7 +215,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
GetMenuItemInfo(cfg::dat.hMenuNotify, iCount - 1, TRUE, &mii);
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
- wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(nmi->hContact);
int iIcon = Clist_GetContactIcon(nmi->hContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 1e8ab1e3df..d697cb6728 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -253,7 +253,7 @@ CListEvent* AddEvent(CLISTEVENT *cle)
}
char *szProto = GetContactProto(p->hContact);
- wchar_t *szName = pcli->pfnGetContactDisplayName(p->hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(p->hContact);
if (szProto && szName) {
NotifyMenuItemExData *nmi = (NotifyMenuItemExData*)malloc(sizeof(NotifyMenuItemExData));
if (nmi) {
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index 2ac282d1a3..104594bea5 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -101,7 +101,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
DWORD dwFlags = db_get_dw(hContact, "CList", "CLN_Flags", 0);
BYTE bSecondLine = db_get_b(hContact, "CList", "CLN_2ndline", -1);
- mir_snwprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : Clist_GetContactDisplayName(hContact));
SetWindowText(hWnd, szTitle);
Window_SetSkinIcon_IcoLib(hWnd, SKINICON_OTHER_MIRANDA);
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index 6304a1498a..b0e8c552c1 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -175,7 +175,7 @@ MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
GetContactProto(hContact, cProtocol, sizeof(cProtocol));
ptrW szHandle(GetContactID(hContact, cProtocol));
- wchar_t *tmp = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *tmp = Clist_GetContactDisplayName(hContact);
wcsncpy_s(dispName, tmp, _TRUNCATE);
if ((szHandle) && ((mir_wstrcmpi(szHandle, szID) == 0) || (mir_wstrcmpi(dispName, szID) == 0)) && ((szProto == nullptr) || (_stricmp(szProto, cProtocol) == 0)))
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index e536d8ef43..16bfe8a35f 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -73,7 +73,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent)
{
//add event to the contact list
wchar_t caToolTip[128];
- mir_snwprintf(caToolTip, L"%s %s", TranslateT("Contacts received from"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(caToolTip, L"%s %s", TranslateT("Contacts received from"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.hContact = hContact;
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp
index 6176597a39..430bbe36b3 100644
--- a/plugins/ContactsPlus/src/send.cpp
+++ b/plugins/ContactsPlus/src/send.cpp
@@ -411,7 +411,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
int i;
for (i = 0; i < ackData->nContacts; i++) {
// prepare data & count size
- maSend[i].mcaNick = mir_utf8encodeW(pcli->pfnGetContactDisplayName(ackData->aContacts[i], 0));
+ maSend[i].mcaNick = mir_utf8encodeW(Clist_GetContactDisplayName(ackData->aContacts[i]));
maSend[i].mcaUIN = mir_utf8encodeW(ptrW(GetContactUID(ackData->aContacts[i])));
dbei.cbBlob += (DWORD)strlennull(maSend[i].mcaUIN) + (DWORD)strlennull((char*)maSend[i].mcaNick) + 2;
}
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp
index ac3b711eec..a3dd0e8a84 100644
--- a/plugins/ContactsPlus/src/utils.cpp
+++ b/plugins/ContactsPlus/src/utils.cpp
@@ -112,7 +112,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, wchar_t *pszTitleStart)
char *szProto = GetContactProto(hContact);
if (szProto) {
ptrW uid(GetContactUID(hContact));
- wchar_t *contactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(hContact);
wchar_t oldTitle[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, _countof(oldTitle));
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index ea90b234a8..48e0ea97ea 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -384,7 +383,6 @@ int Shutdown(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp
index 5e732ad0dd..a1f8efc728 100644
--- a/plugins/FTPFileYM/src/job_generic.cpp
+++ b/plugins/FTPFileYM/src/job_generic.cpp
@@ -236,7 +236,7 @@ void GenericJob::refreshTab(bool bTabChanged)
if (bTabChanged) {
if (m_hContact != NULL) {
SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PROTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadProtoIcon(GetContactProto(m_hContact), ID_STATUS_ONLINE));
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_CONTACT, pcli->pfnGetContactDisplayName(m_hContact, 0));
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_CONTACT, Clist_GetContactDisplayName(m_hContact));
}
else {
SendDlgItemMessage(uDlg->m_hwnd, IDC_BTN_PROTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("main"));
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h
index c1836b44d6..58c5b5cc01 100644
--- a/plugins/FavContacts/src/favlist.h
+++ b/plugins/FavContacts/src/favlist.h
@@ -17,7 +17,7 @@ public:
bManual(_bManual),
fRate(_fRate)
{
- name = mir_wstrdup(pcli->pfnGetContactDisplayName(hContact, 0));
+ name = mir_wstrdup(Clist_GetContactDisplayName(hContact));
if (g_Options.bUseGroups) {
if ((group = db_get_wsa(hContact, "CList", "Group")) == nullptr)
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp
index d71e1c536d..c3c97ca5b5 100644
--- a/plugins/FavContacts/src/http_api.cpp
+++ b/plugins/FavContacts/src/http_api.cpp
@@ -74,7 +74,7 @@ public:
for (int i = 0; i < favList.getCount(); ++i)
{
MCONTACT hContact = favList[i]->getHandle();
- wchar_t *name = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
AVATARCACHEENTRY *avatar = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
int status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 149a9527ad..dedc1cb097 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "http_api.h"
-CLIST_INTERFACE *pcli;
-
HINSTANCE g_hInst;
int hLangpack;
@@ -67,7 +65,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
g_contactCache = new CContactCache;
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 8ccf417fa5..04335bf433 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -89,7 +89,7 @@ static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
mir_free(title);
}
- wchar_t *name = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
if (!options->bSysColors) SelectObject(hdc, g_Options.hfntName);
GetTextExtentPoint32(hdc, name, (int)mir_wstrlen(name), &sz);
@@ -301,7 +301,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = nullp
}
if (true) {
- wchar_t *name = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
if (!options->bSysColors)
SelectObject(hdcTemp, g_Options.hfntName);
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 5011cb57f8..4ca7a5f496 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -99,7 +99,7 @@ void MakePopupMsg(HWND hDlg, MCONTACT hContact, wchar_t *msg)
POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SMALLICON));
- mir_wstrcpy(ppd.lpwzContactName, pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_wstrcpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact));
mir_wstrcpy(ppd.lpwzText, msg);
ppd.colorBack = GetSysColor(COLOR_INFOBK);
ppd.colorText = GetSysColor(COLOR_INFOTEXT);
@@ -211,7 +211,7 @@ void FILEECHO::updateTitle()
{
char newtitle[256];
- char *contactName = _T2A(pcli->pfnGetContactDisplayName(hContact, 0));
+ char *contactName = _T2A(Clist_GetContactDisplayName(hContact));
if (iState == STATE_OPERATE && chunkCount != 0)
mir_snprintf(newtitle, "%d%% - %s: %s", chunkSent * 100 / chunkCount, Translate(szFEMode[inSend]), contactName);
else
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 46aafdfbad..dd95992094 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -164,7 +164,7 @@ static int OnContactDrag(WPARAM hContact, LPARAM)
int idStatus = GetContactStatus(hContact);
if (!fcOpt.bHideAll && !HideOnFullScreen() && (!fcOpt.bHideOffline || IsStatusVisible(idStatus)) && (!fcOpt.bHideWhenCListShow || !bIsCListShow)) {
- CreateThumbWnd(pcli->pfnGetContactDisplayName(hContact, 0), hContact, pt.x, pt.y);
+ CreateThumbWnd(Clist_GetContactDisplayName(hContact), hContact, pt.x, pt.y);
ThumbInfo *pNewThumb = thumbList.FindThumbByContact(hContact);
ShowWindow(pNewThumb->hwnd, SW_SHOWNA);
hNewContact = hContact;
@@ -412,7 +412,7 @@ static LRESULT __stdcall CommWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
case WM_REFRESH_CONTACT:
if (pThumb) {
- wcsncpy(pThumb->ptszName, pcli->pfnGetContactDisplayName(pThumb->hContact, 0), USERNAME_LEN - 1);
+ wcsncpy(pThumb->ptszName, Clist_GetContactDisplayName(pThumb->hContact), USERNAME_LEN - 1);
pThumb->RefreshContactStatus((int)lParam);
pThumb->ResizeThumb();
}
@@ -763,7 +763,7 @@ static void LoadContact(MCONTACT hContact)
DWORD dwPos = db_get_dw(hContact, MODULE, "ThumbsPos", (DWORD)-1);
if (dwPos != -1) {
- wchar_t *ptName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *ptName = Clist_GetContactDisplayName(hContact);
if (ptName != nullptr) {
int nX = DB_POS_GETX(dwPos);
int nY = DB_POS_GETY(dwPos);
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 9799c022fa..f834250c3f 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -19,7 +19,6 @@
// Global variables
HINSTANCE hInst;
-CLIST_INTERFACE *pcli;
MWindowList hWindowList;
HCURSOR splitCursor;
@@ -47,7 +46,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
index e039b792c8..a450c3ef7d 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
@@ -76,7 +76,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
SetClassLongPtr(hDlg, GCLP_HICON, (LONG_PTR)LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON)));
WindowList_Add(hWindowList, hDlg, DlgParam->hContact);
- mir_snwprintf(title, L"%s [%s]", TranslateT("Linklist plugin"), pcli->pfnGetContactDisplayName(DlgParam->hContact, 0));
+ mir_snwprintf(title, L"%s [%s]", TranslateT("Linklist plugin"), Clist_GetContactDisplayName(DlgParam->hContact));
SetWindowText(hDlg, title);
GetFilterText(listMenu, filter, _countof(filter));
SetDlgItemText(hDlg, IDC_STATUS, filter);
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 7f64ab6243..432ae9ce7e 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -11,7 +11,6 @@
#include "iconlib.h"
#include "dlgconfigure.h"
-CLIST_INTERFACE *pcli;
HINSTANCE g_hInst;
int hLangpack;
@@ -402,7 +401,6 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&g_pluginInfoEx);
- pcli = Clist_GetInterface();
// init COM, needed for GUID generation
CoInitialize(nullptr);
diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp
index 6caea4fb75..e2488cc4ee 100644
--- a/plugins/HistoryStats/src/mirandahistory.cpp
+++ b/plugins/HistoryStats/src/mirandahistory.cpp
@@ -66,7 +66,7 @@ void MirandaHistory::readContacts()
if (!pProtoName)
pProtoName = con::ProtoUnknown; // MEMO: alternative would be "break;"
- ext::string curNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ ext::string curNick = Clist_GetContactDisplayName(hContact);
// retrieve protocol
const ext::a::string curProtoName = pProtoName;
diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp
index cb6015eb8a..5696dc73a4 100644
--- a/plugins/HistoryStats/src/settingsserializer.cpp
+++ b/plugins/HistoryStats/src/settingsserializer.cpp
@@ -17,7 +17,7 @@ void SettingsSerializer::readFromDB()
{
clearColumns();
- ext::string defaultNick = pcli->pfnGetContactDisplayName(0, 0);
+ ext::string defaultNick = Clist_GetContactDisplayName(0);
SettingsTree settingsTree;
// read version tag
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index b9d8106bb0..331f640f8e 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -201,7 +201,7 @@ wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
if (str != nullptr)
return str;
- str = pcli->pfnGetContactDisplayName(hContact, 0);
+ str = Clist_GetContactDisplayName(hContact);
if (str != nullptr)
return mir_wstrdup(str);
diff --git a/plugins/ImportTXT/importtxtdlg.pas b/plugins/ImportTXT/importtxtdlg.pas
index 04927c61ab..3acb77f0a7 100644
--- a/plugins/ImportTXT/importtxtdlg.pas
+++ b/plugins/ImportTXT/importtxtdlg.pas
@@ -93,7 +93,7 @@ begin
WM_INITDIALOG:
begin
TranslateDialogDefault(Dialog);
- tempwstr := cli^.pfnGetContactDisplayName(lParam,0);
+ tempwstr := Clist_GetContactDisplayName(lParam,0);
s := WideFormat(TranslateWideString('Import history to %s (%s)'), [tempwstr, GetContactID(lParam)]);
SetWindowTextW(Dialog, PWideChar(s));
SendMessage(Dialog, WM_SETICON, ICON_SMALL, LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DEFAULT)));
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 79ba940b61..1873a51419 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -425,7 +425,7 @@ static void ReplaceVars(Buffer<wchar_t> *buffer, MCONTACT hContact, wchar_t **va
if (buffer->str[j] == '%') {
size_t foundLen = i - j + 1;
if (foundLen == 9 && wcsncmp(&buffer->str[j], L"%contact%", 9) == 0) {
- buffer->replace(j, i + 1, pcli->pfnGetContactDisplayName(hContact, 0));
+ buffer->replace(j, i + 1, Clist_GetContactDisplayName(hContact));
}
else if (foundLen == 6 && wcsncmp(&buffer->str[j], L"%date%", 6) == 0) {
wchar_t tmp[128];
diff --git a/plugins/ListeningTo/src/main.cpp b/plugins/ListeningTo/src/main.cpp
index d3ca7b9aa0..d175c983b9 100644
--- a/plugins/ListeningTo/src/main.cpp
+++ b/plugins/ListeningTo/src/main.cpp
@@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
HINSTANCE hInst;
-CLIST_INTERFACE *pcli;
int hLangpack;
PLUGININFOEX pluginInfo = {
@@ -56,7 +55,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
CoInitialize(nullptr);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 1637f3223e..c322ef8006 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -205,7 +205,7 @@ static void ShowPopup(char* szText, wchar_t* tszText, MCONTACT hContact)
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ppd.lchContact = hContact;
- wcsncpy(ppd.lptzContactName, pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME - 1);
+ wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME - 1);
wcsncpy(ppd.lptzText, text, MAX_SECONDLINE - 1);
ppd.iSeconds = -1;
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp
index 95d9d0feb5..b4f2f6ef0b 100644
--- a/plugins/MirFox/src/MirandaInterface.cpp
+++ b/plugins/MirFox/src/MirandaInterface.cpp
@@ -2,8 +2,6 @@
#include "version.h"
#include "mirandaInterface.h"
-CLIST_INTERFACE *pcli;
-
//Miranda - handle from DllMain
HINSTANCE hInst;
@@ -148,7 +146,6 @@ static int OnShutdown(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index 9a29cf99d7..a58df3d5f0 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -135,7 +135,7 @@ MirfoxData::setContactDisplayName(MirandaContact* mirandaContact){
}
} else {
// standard miranda way for another protocols
- mirandaContact->contactNameW = pcli->pfnGetContactDisplayName(mirandaContact->contactHandle, 0);
+ mirandaContact->contactNameW = Clist_GetContactDisplayName(mirandaContact->contactHandle);
}
if (getAddAccountToContactNameCheckbox()){
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index f3bc0c756c..16ff5afaa8 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -1,7 +1,6 @@
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HANDLE hEventWindow;
HINSTANCE hInst;
@@ -60,7 +59,6 @@ extern "C" __declspec(dllexport) int Load(void)
DEBUGOUTA("LOAD MIROTR");
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
InitIcons();
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index acad664c75..a89ef8121f 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -94,13 +94,13 @@ char* contact_get_id(MCONTACT hContact, bool bNameOnError)
{
ptrW pszUniqueID(Contact_GetInfo(CNF_UNIQUEID, hContact));
if (!pszUniqueID && bNameOnError)
- pszUniqueID = mir_wstrdup(pcli->pfnGetContactDisplayName(hContact, 0));
+ pszUniqueID = mir_wstrdup(Clist_GetContactDisplayName(hContact));
return mir_u2a(pszUniqueID);
}
__inline const wchar_t* contact_get_nameT(MCONTACT hContact) {
- return pcli->pfnGetContactDisplayName(hContact, 0);
+ return Clist_GetContactDisplayName(hContact);
}
wchar_t* ProtoGetNickname(const char* proto)
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index fb5a268077..acc7bf0a3e 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -431,7 +431,7 @@ bool CAppletManager::ActivateChatScreen(MCONTACT hContact)
tstring CAppletManager::GetContactDisplayname(MCONTACT hContact, bool bShortened)
{
if (!bShortened || !CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF))
- return pcli->pfnGetContactDisplayName(hContact, 0);
+ return Clist_GetContactDisplayName(hContact);
tstring strNick = GetContactDisplayname(hContact, false);
if (strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET))
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;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index c7b3d346b8..a88cec226b 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -42,7 +42,6 @@
#include "version.h"
HINSTANCE g_hInstance;
-CLIST_INTERFACE *pcli;
int hLangpack;
HANDLE g_hTopToolbarbutton;
@@ -319,7 +318,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM)
// the protocol supports status message sending for current status, or autoreplying
if ((Flag1 & PF1_MODEMSGSEND && CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iMode)) ||
((Flag1 & PF1_IM) == PF1_IM && (i < 0 || !g_AutoreplyOptPage.GetDBValueCopy(StatusModeList[i].DisableReplyCtlID))))
- mir_snwprintf(szSetStr, TranslateT("Set %s message for the contact"), Clist_GetStatusModeDescription(iMode, 0), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szSetStr, TranslateT("Set %s message for the contact"), Clist_GetStatusModeDescription(iMode, 0), Clist_GetContactDisplayName(hContact));
// the protocol supports status message reading for contact's status
if (Flag1 & PF1_MODEMSGRECV && CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iContactMode)) {
@@ -498,7 +497,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam)
Result = db_get_s(NULL, VarParseData.szProto, "Nick", (wchar_t*)nullptr);
if (Result == nullptr)
- Result = pcli->pfnGetContactDisplayName(NULL, 0);
+ Result = Clist_GetContactDisplayName(0);
if (Result == nullptr)
Result = TranslateT("Stranger");
@@ -708,7 +707,6 @@ int MirandaLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index a5330645b9..a473696887 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -368,7 +368,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact)
TVINSERTSTRUCT tvIns;
memset(&tvIns, 0, sizeof(tvIns));
tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", L""));
- tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ tvIns.item.pszText = Clist_GetContactDisplayName(hContact);
tvIns.hInsertAfter = TVI_ROOT;
tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
tvIns.item.iImage = tvIns.item.iSelectedImage = Clist_GetContactIcon(hContact);
diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
index 79e477625a..c65196fc67 100644
--- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp
@@ -63,7 +63,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
WindowList_Add(g_hReadWndList, hwndDlg, awayData->hContact);
wchar_t str[256], format[128];
- wchar_t *contactName = pcli->pfnGetContactDisplayName(awayData->hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(awayData->hContact);
char *szProto = GetContactProto(awayData->hContact);
wchar_t *status = Clist_GetStatusModeDescription(db_get_w(awayData->hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
GetWindowText(hwndDlg, format, _countof(format));
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index 62c7243fdb..1d9f70b544 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -789,7 +789,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
WindowTitle += L" ";
}
- WindowTitle += pcli->pfnGetContactDisplayName(hContact, 0);
+ WindowTitle += Clist_GetContactDisplayName(hContact);
if (!IsAnICQProto(GetContactProto(hContact))) {
WindowTitle += L" ";
WindowTitle += TranslateT("available autoreply only");
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 83e0469cac..b0d7d859c2 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -469,7 +469,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U
wcsncpy(pudw.lptzText, TranslateW(sampleEvent), MAX_SECONDLINE);
}
else { // get the needed event data
- wcsncpy(pudw.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
+ wcsncpy(pudw.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
wcsncpy(pudw.lptzText, ptrW(GetEventPreview(&dbe)), MAX_SECONDLINE);
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 39faa19528..edf5edcdb2 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -211,7 +211,7 @@ wchar_t* GetStr(STATUSMSGINFO *n, const wchar_t *tmplt)
if (n->hContact == NULL)
res.Append(TranslateT("Contact"));
else
- res.Append(pcli->pfnGetContactDisplayName(n->hContact, 0));
+ res.Append(Clist_GetContactDisplayName(n->hContact));
break;
case 's':
@@ -438,7 +438,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
if (opt.BlinkIcon && !opt.TempDisabled) {
HICON hIcon = opt.BlinkIcon_Status ? Skin_LoadProtoIcon(szProto, newStatus) : Skin_LoadIcon(SKINICON_OTHER_USERONLINE);
wchar_t str[256];
- mir_snwprintf(str, TranslateT("%s is now %s"), pcli->pfnGetContactDisplayName(hContact, 0), StatusList[Index(newStatus)].lpzStandardText);
+ mir_snwprintf(str, TranslateT("%s is now %s"), Clist_GetContactDisplayName(hContact), StatusList[Index(newStatus)].lpzStandardText);
BlinkIcon(hContact, hIcon, str);
}
@@ -455,7 +455,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
GetTimeFormat(LOCALE_USER_DEFAULT, 0, nullptr, L"HH':'mm", stzTime, _countof(stzTime));
GetDateFormat(LOCALE_USER_DEFAULT, 0, nullptr, L"dd/MM/yyyy", stzDate, _countof(stzDate));
mir_snwprintf(stzText, TranslateT("%s, %s. %s changed status to %s (was %s)\r\n"),
- stzDate, stzTime, pcli->pfnGetContactDisplayName(hContact, 0), StatusList[Index(newStatus)].lpzStandardText,
+ stzDate, stzTime, Clist_GetContactDisplayName(hContact), StatusList[Index(newStatus)].lpzStandardText,
StatusList[Index(oldStatus)].lpzStandardText);
LogToFile(stzText);
}
@@ -728,7 +728,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
if (opt.BlinkIcon && opt.BlinkIcon_ForMsgs && !opt.TempDisabled) {
HICON hIcon = opt.BlinkIcon_Status ? Skin_LoadProtoIcon(szProto, db_get_w(hContact, szProto, "Status", ID_STATUS_ONLINE)) : Skin_LoadIcon(SKINICON_OTHER_USERONLINE);
wchar_t str[256];
- mir_snwprintf(str, TranslateT("%s changed status message to %s"), pcli->pfnGetContactDisplayName(hContact, 0), smi.newstatusmsg);
+ mir_snwprintf(str, TranslateT("%s changed status message to %s"), Clist_GetContactDisplayName(hContact), smi.newstatusmsg);
BlinkIcon(hContact, hIcon, str);
}
@@ -755,7 +755,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
else
str = GetStr(&smi, templates.LogSMsgChanged);
- mir_snwprintf(stzText, L"%s, %s. %s %s\r\n", stzDate, stzTime, pcli->pfnGetContactDisplayName(hContact, 0), str);
+ mir_snwprintf(stzText, L"%s, %s. %s %s\r\n", stzDate, stzTime, Clist_GetContactDisplayName(hContact), str);
LogToFile(stzText);
mir_free(str);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index c0765dddb9..a0062327b3 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -26,7 +26,7 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = hIcon;
- CMStringW buf(pcli->pfnGetContactDisplayName(hContact, 0));
+ CMStringW buf(Clist_GetContactDisplayName(hContact));
// add group name to popup title
if (opt.ShowGroup) {
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp
index 0267704979..6bcc4a7b05 100644
--- a/plugins/NewXstatusNotify/src/xstatus.cpp
+++ b/plugins/NewXstatusNotify/src/xstatus.cpp
@@ -122,7 +122,7 @@ CMStringW ReplaceVars(XSTATUSCHANGE *xsc, const wchar_t *tmplt)
if (xsc->hContact == NULL)
res.Append(TranslateT("Contact"));
else
- res.Append(pcli->pfnGetContactDisplayName(xsc->hContact, 0));
+ res.Append(Clist_GetContactDisplayName(xsc->hContact));
break;
default:
@@ -223,7 +223,7 @@ void BlinkXStatusIcon(XSTATUSCHANGE *xsc)
HICON hIcon = nullptr;
wchar_t str[256] = { 0 };
wchar_t stzType[32];
- mir_snwprintf(str, TranslateT("%s changed %s"), pcli->pfnGetContactDisplayName(xsc->hContact, 0), GetStatusTypeAsString(xsc->type, stzType));
+ mir_snwprintf(str, TranslateT("%s changed %s"), Clist_GetContactDisplayName(xsc->hContact), GetStatusTypeAsString(xsc->type, stzType));
if (opt.BlinkIcon_Status) {
DBVARIANT dbv;
@@ -334,7 +334,7 @@ void LogChangeToFile(XSTATUSCHANGE *xsc)
}
mir_snwprintf(stzText, L"%s, %s. %s %s\r\n", stzDate, stzTime,
- pcli->pfnGetContactDisplayName(xsc->hContact, 0), ReplaceVars(xsc, Template).GetString());
+ Clist_GetContactDisplayName(xsc->hContact), ReplaceVars(xsc, Template).GetString());
LogToFile(stzText);
}
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 1aec1f4c5f..e83731181b 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -17,10 +17,8 @@
#include "stdafx.h"
//global variables
-CLIST_INTERFACE *pcli;
int hLangpack = 0;
-
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -154,7 +152,6 @@ static int OnModulesLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 23be122459..d4086b8f1a 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -32,7 +32,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
if (!isContactSecured(hContact))
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: received encrypted message from: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with turned off encryption");
+ globals.debuglog << std::string(time_str() + ": info: received encrypted message from: " + toUTF8(Clist_GetContactDisplayName(hContact)) + " with turned off encryption");
if (MessageBox(nullptr, TranslateT("We received encrypted message from contact with encryption turned off.\nDo you want to turn on encryption for this contact?"), TranslateT("Warning"), MB_YESNO) == IDYES)
{
if (!isContactHaveKey(hContact))
@@ -62,7 +62,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
}
}
else if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: received encrypted message from: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: received encrypted message from: " + toUTF8(Clist_GetContactDisplayName(hContact)));
boost::algorithm::erase_all(str, "\r");
s2 += mir_wstrlen(L"-----END PGP MESSAGE-----");
@@ -114,13 +114,13 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
dbsetting += "_Password";
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L"");
if (pass[0] && globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in database for key ID: " + inkeyid + ", trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password in database for key ID: " + inkeyid + ", trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(hContact)) + " with password");
}
else
{
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L"");
if (pass[0] && globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(hContact)) + " with password");
}
if (pass && pass[0]) {
cmd.push_back(L"--passphrase");
@@ -129,12 +129,12 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
else if (globals.password && globals.password[0])
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(hContact)) + " with password");
cmd.push_back(L"--passphrase");
cmd.push_back(globals.password);
}
else if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: passwords not found in database or memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with out password");
+ globals.debuglog << std::string(time_str() + ": info: passwords not found in database or memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(hContact)) + " with out password");
mir_free(pass);
mir_free(inkeyid);
}
@@ -199,7 +199,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
while (out.find("public key decryption failed: bad passphrase") != string::npos)
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: failed to decrypt messaage from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " password needed, trying to get one");
+ globals.debuglog << std::string(time_str() + ": info: failed to decrypt messaage from " + toUTF8(Clist_GetContactDisplayName(hContact)) + " password needed, trying to get one");
if (globals._terminate) {
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
@@ -221,7 +221,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
if (globals.password)
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(hContact)));
std::vector<wstring> tmp3;
tmp3.push_back(L"--passphrase");
tmp3.push_back(globals.password);
@@ -396,7 +396,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
else
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: blocked pgp message to metacontact:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: blocked pgp message to metacontact:" + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
return 0;
}
}
@@ -405,13 +405,13 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if (globals.bAutoExchange && (str.find(L"-----PGP KEY RESPONSE-----") != wstring::npos))
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange): parsing key response:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange): parsing key response:" + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
s2 = str.find(L"-----END PGP PUBLIC KEY BLOCK-----");
s1 = str.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----");
if (s1 != wstring::npos && s2 != wstring::npos)
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange): found pubkey block:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange): found pubkey block:" + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
s2 += mir_wstrlen(L"-----END PGP PUBLIC KEY BLOCK-----");
db_set_ws(ccs->hContact, szGPGModuleName, "GPGPubKey", str.substr(s1, s2 - s1).c_str());
{ //gpg execute block
@@ -553,7 +553,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if ((s2 != wstring::npos) && (s1 != wstring::npos))
{ //this is public key
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: received key from: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: received key from: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
s1 = 0;
while ((s1 = str.find(L"\r", s1)) != wstring::npos)
str.erase(s1, 1);
@@ -561,15 +561,15 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
s2 += mir_wstrlen(L"-----END PGP PUBLIC KEY BLOCK-----");
else if (((s2 = str.find(L"-----BEGIN PGP PRIVATE KEY BLOCK-----")) != wstring::npos) && ((s1 = str.find(L"-----END PGP PRIVATE KEY BLOCK-----")) != wstring::npos))
s2 += mir_wstrlen(L"-----END PGP PRIVATE KEY BLOCK-----");
- CDlgNewKey *d = new CDlgNewKey(ccs->hContact, str.substr(s1, s2 - s1));
- d->Show();
+ CDlgNewKey *d = new CDlgNewKey(ccs->hContact, str.substr(s1, s2 - s1));
+ d->Show();
HistoryLog(ccs->hContact, db_event(msg, 0, 0, dbflags));
return 0;
}
if (globals.bAutoExchange && strstr(msg, "-----PGP KEY REQUEST-----") && globals.gpg_valid && globals.gpg_keyexist)
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange): received key request from: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange): received key request from: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
ptrA tmp(UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""));
if (tmp[0]) {
@@ -644,7 +644,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
wstring str = toUTF16(msg);
if (globals.bStripTags && globals.bAppendTags) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: stripping tags in outgoing message, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: stripping tags in outgoing message, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
strip_tags(str);
}
/* for(std::wstring::size_type i = str.find(L"\r\n"); i != std::wstring::npos; i = str.find(L"\r\n", i+1))
@@ -828,7 +828,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
}
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": adding event to contact: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " on send message.");
+ globals.debuglog << std::string(time_str() + ": adding event to contact: " + toUTF8(Clist_GetContactDisplayName(hContact)) + " on send message.");
fix_line_term(str);
sent_msgs.push_back((HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str()));
@@ -844,21 +844,21 @@ INT_PTR SendMsgSvc(WPARAM w, LPARAM l)
char *msg = (char*)ccs->lParam;
if (!msg) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: failed to get message data, name: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: failed to get message data, name: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
return Proto_ChainSend(w, ccs);
}
if (strstr(msg, "-----BEGIN PGP MESSAGE-----")) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: encrypted messge, let it go, name: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: encrypted messge, let it go, name: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
return Proto_ChainSend(w, ccs);
}
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: contact have key, name: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: contact have key, name: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
if (globals.bDebugLog && db_mc_isMeta(ccs->hContact))
- globals.debuglog << std::string(time_str() + ": info: protocol is metacontacts, name: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: protocol is metacontacts, name: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
if (!isContactSecured(ccs->hContact) || db_mc_isMeta(ccs->hContact)) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: contact not secured, name: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: contact not secured, name: " + toUTF8(Clist_GetContactDisplayName(ccs->hContact)));
return Proto_ChainSend(w, ccs);
}
return returnNoError(ccs->hContact);
@@ -878,13 +878,13 @@ int HookSendMsg(WPARAM w, LPARAM l)
if (isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.w.c.
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(send handler): block pgp message event, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(send handler): block pgp message event, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
return 1;
}
if (globals.bAutoExchange && (strstr((char*)dbei->pBlob, "-----PGP KEY RESPONSE-----") || strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----"))) ///do not show service data in history
{
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(send handler): block pgp key request/response event, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(send handler): block pgp key request/response event, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
return 1;
}
}
@@ -893,26 +893,26 @@ int HookSendMsg(WPARAM w, LPARAM l)
if (!isContactHaveKey(hContact)) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: contact have not key, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: contact have not key, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
if (globals.bAutoExchange && !strstr((char*)dbei->pBlob, "-----PGP KEY REQUEST-----") && !strstr((char*)dbei->pBlob, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && globals.gpg_valid) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: checking for autoexchange possibility, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: checking for autoexchange possibility, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
LPSTR proto = GetContactProto(hContact);
DWORD uin = db_get_dw(hContact, proto, "UIN", 0);
if (uin) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange): protocol looks like icq, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange): protocol looks like icq, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
char *proto2 = GetContactProto(hContact);
if (ProtoServiceExists(proto2, PS_ICQ_CHECKCAPABILITY)) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange, icq): checking for autoexchange icq capability, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange, icq): checking for autoexchange icq capability, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
ICQ_CUSTOMCAP cap = { 0 };
strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
if (CallProtoService(proto2, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange, icq): sending key requiest, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange, icq): sending key requiest, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
globals.hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -924,7 +924,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
wchar_t *jid = UniGetContactSettingUtf(hContact, proto, "jid", L"");
if (jid[0]) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange): protocol looks like jabber, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange): protocol looks like jabber, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
for(auto p : globals.Accounts)
{
wchar_t *caps = p->getJabberInterface()->GetResourceFeatures(jid);
@@ -939,7 +939,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
mir_free(caps);
if (str.find(L"GPG_Key_Auto_Exchange:0") != string::npos) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(autoexchange, jabber): autoexchange capability found, sending key request, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(autoexchange, jabber): autoexchange capability found, sending key request, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
globals.hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
@@ -972,7 +972,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
}
if (!isContactSecured(hContact)) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": event message: \"" + (char*)dbei->pBlob + "\" passed event filter, contact " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " is unsecured");
+ globals.debuglog << std::string(time_str() + ": event message: \"" + (char*)dbei->pBlob + "\" passed event filter, contact " + toUTF8(Clist_GetContactDisplayName(hContact)) + " is unsecured");
return 0;
}
if (!(dbei->flags & DBEF_SENT) && db_mc_isMeta((MCONTACT)w)) {
@@ -981,7 +981,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
tmp[28] = '\0';
if (strstr(tmp, "-----BEGIN PGP MESSAGE-----")) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info(send handler): block pgp message event, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info(send handler): block pgp message event, name: " + toUTF8(Clist_GetContactDisplayName(hContact)));
return 1;
}
}
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index 4985da33cb..0fa5890093 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -61,7 +61,7 @@ public:
int i = 1;
for (auto &hContact : Contacts()) {
if (isContactHaveKey(hContact)) {
- wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
int row = list_USERLIST.AddItem(L"", 0);
list_USERLIST.SetItemText(row, 0, name);
@@ -589,7 +589,7 @@ public:
MCONTACT hcnt = db_mc_tryMeta(hContact);
{
wstring msg = TranslateT("Load Public GPG Key for ");
- msg += pcli->pfnGetContactDisplayName(hcnt, 0);
+ msg += Clist_GetContactDisplayName(hcnt, 0);
this->SetCaption(msg.c_str());
}
if (!hcnt) {
@@ -642,7 +642,7 @@ public:
str.append(tmp3);
mir_free(tmp3);
string msg = Translate("Load Public GPG Key for ");
- msg += _T2A(pcli->pfnGetContactDisplayName(hcnt, 0));
+ msg += _T2A(Clist_GetContactDisplayName(hcnt));
msg += " (Key ID: ";
msg += globals.hcontact_data[hcnt].key_in_prescense;
msg += Translate(" found in presence, and exists in keyring.)");
diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp
index d9677fd529..396869d09d 100755
--- a/plugins/New_GPG/src/ui.cpp
+++ b/plugins/New_GPG/src/ui.cpp
@@ -916,7 +916,7 @@ void CDlgNewKey::OnInitDialog()
btn_IMPORT.SetText(tmp[0] ? TranslateT("Replace") : TranslateT("Accept"));
mir_free(tmp);
tmp = new wchar_t[256];
- mir_snwprintf(tmp, 255 * sizeof(wchar_t), TranslateT("Received key from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(tmp, 255 * sizeof(wchar_t), TranslateT("Received key from %s"), Clist_GetContactDisplayName(hContact));
lbl_KEY_FROM.SetText(tmp);
mir_free(tmp);
}
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 3781161311..33de2251a7 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -320,12 +320,12 @@ int onProtoAck(WPARAM, LPARAM l)
dbsetting += "_Password";
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L"");
if (mir_wstrlen(pass) > 0 && globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in database for key ID: " + keyid + ", trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password in database for key ID: " + keyid + ", trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)) + " with password");
}
else {
pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L"");
if (mir_wstrlen(pass) > 0 && globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)) + " with password");
}
if (mir_wstrlen(pass) > 0) {
cmd.push_back(L"--passphrase");
@@ -333,12 +333,12 @@ int onProtoAck(WPARAM, LPARAM l)
}
else if (globals.password) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with password");
+ globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)) + " with password");
cmd.push_back(L"--passphrase");
cmd.push_back(globals.password);
}
else if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: passwords not found in database or memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with out password");
+ globals.debuglog << std::string(time_str() + ": info: passwords not found in database or memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)) + " with out password");
mir_free(pass);
mir_free(keyid);
}
@@ -352,7 +352,7 @@ int onProtoAck(WPARAM, LPARAM l)
return 0;
while (out.find("public key decryption failed: bad passphrase") != string::npos) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: failed to decrypt messaage from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " password needed, trying to get one");
+ globals.debuglog << std::string(time_str() + ": info: failed to decrypt messaage from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)) + " password needed, trying to get one");
if (globals._terminate)
break;
{ //save inkey id
@@ -370,7 +370,7 @@ int onProtoAck(WPARAM, LPARAM l)
std::vector<wstring> cmd2 = cmd;
if (globals.password) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": info: found password in memory, trying to decrypt message from " + toUTF8(Clist_GetContactDisplayName(ack->hContact)));
std::vector<wstring> tmp;
tmp.push_back(L"--passphrase");
tmp.push_back(globals.password);
@@ -945,7 +945,7 @@ bool isContactSecured(MCONTACT hContact)
BYTE gpg_enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
if (!gpg_enc) {
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": encryption is turned off for " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": encryption is turned off for " + toUTF8(Clist_GetContactDisplayName(hContact)));
return false;
}
if (!db_mc_isMeta(hContact)) {
@@ -953,13 +953,13 @@ bool isContactSecured(MCONTACT hContact)
if (!key[0]) {
mir_free(key);
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": encryption is turned off for " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": encryption is turned off for " + toUTF8(Clist_GetContactDisplayName(hContact)));
return false;
}
mir_free(key);
}
if (globals.bDebugLog)
- globals.debuglog << std::string(time_str() + ": encryption is turned on for " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
+ globals.debuglog << std::string(time_str() + ": encryption is turned on for " + toUTF8(Clist_GetContactDisplayName(hContact)));
return true;
}
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 2246e107cf..3712093624 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -434,7 +434,7 @@ int Preview()
void Nudge_ShowPopup(CNudgeElement*, MCONTACT hContact, wchar_t * Message)
{
hContact = db_mc_tryMeta(hContact);
- wchar_t *lpzContactName = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact);
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
POPUPDATACLASS NudgePopup = { 0 };
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 4b4c689f3c..1addb3196b 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -35,7 +35,6 @@ PLUGININFOEX pluginInfo = {
{0xf93ba59c, 0x4f48, 0x4f2e, {0x8a, 0x91, 0x77, 0xa2, 0x80, 0x15, 0x27, 0xa3}}
};
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
HIMAGELIST hIml;
int hLangpack = 0;
@@ -77,7 +76,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
CreateServiceFunction(MS_QC_SHOW_DIALOG, ShowDialog);
@@ -384,7 +382,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all)
}
// Make contact name
- wchar_t *tmp = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *tmp = (wchar_t *)Clist_GetContactDisplayName(hContact);
mir_wstrncpy(contact->szname, tmp, _countof(contact->szname));
PROTOACCOUNT *acc = Proto_GetAccount(pszProto);
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index ba4cccf945..77a2cea691 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -471,7 +471,7 @@ wchar_t* ParseString(MCONTACT hContact, wchar_t* ptszQValIn, wchar_t* ptszText,
break;
case 'n':
- ptszName = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ ptszName = Clist_GetContactDisplayName(hContact);
NameLenght = (int)mir_wstrlen(ptszName);
p = (wchar_t *)realloc(tempQValue, (QVSize + NameLenght + 1) * sizeof(wchar_t));
if (!p)
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp
index 5502ea2d14..0b70c4aa66 100644
--- a/plugins/QuickMessages/src/main.cpp
+++ b/plugins/QuickMessages/src/main.cpp
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hinstance;
int hLangpack;
@@ -289,7 +288,6 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD, LPVOID)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, PluginInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc
index c57c721dc7..52c0d450c9 100644
--- a/plugins/QuickSearch/i_ok.inc
+++ b/plugins/QuickSearch/i_ok.inc
@@ -369,7 +369,7 @@ begin
end;
QSTO_DISPLAYNAME: begin
- StrDupW(res.text,cli^.pfnGetContactDisplayName(hContact, 0));
+ StrDupW(res.text,Clist_GetContactDisplayName(hContact, 0));
end;
QSTO_LASTEVENT: begin
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 01c1330e71..8a8cbf3003 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -229,7 +229,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
for (auto curContact = DlgDat->Contacts->begin(); curContact != DlgDat->Contacts->end(); curContact++) {
if (curContact->second != NULL && db_get_b(curContact->second, MODULENAME, dbLastUC_IgnoreContact, 0) == 0) {
- wchar_t *cname = (wchar_t*)pcli->pfnGetContactDisplayName(curContact->second, 0);
+ wchar_t *cname = Clist_GetContactDisplayName(curContact->second);
if (cname == nullptr)
continue;
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 77c4b1c1e9..92542c268e 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -79,7 +79,7 @@ int SendSMSMenuCommand(WPARAM wParam, LPARAM)
for (auto &hContact : Contacts()) {
if (GetContactPhonesCount(hContact)) {
- SendDlgItemMessage(hwndSendSms, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(hContact, 0));
+ SendDlgItemMessage(hwndSendSms, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)Clist_GetContactDisplayName(hContact));
SendSMSWindowSMSContactAdd(hwndSendSms, hContact);
}
}
diff --git a/plugins/SMS/src/options.cpp b/plugins/SMS/src/options.cpp
index 38f51ea4d6..015929ec5f 100644
--- a/plugins/SMS/src/options.cpp
+++ b/plugins/SMS/src/options.cpp
@@ -38,7 +38,7 @@ INT_PTR CALLBACK DlgProcEditorOptions(HWND hWndDlg, UINT msg, WPARAM wParam, LPA
TranslateDialogDefault(hWndDlg);
if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,_countof(tszSign),nullptr)==FALSE)
- mir_snwprintf(tszSign, TranslateT("From %s:\r\n\r\n"), pcli->pfnGetContactDisplayName(0, 0));
+ mir_snwprintf(tszSign, TranslateT("From %s:\r\n\r\n"), Clist_GetContactDisplayName(0));
SetDlgItemText(hWndDlg,IDC_SIGNATURE,tszSign);
{
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index a0b41f4106..55c1a491b5 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -231,7 +231,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
}
else {
memcpy(pszServiceFunctionName, SMS_READ, sizeof(SMS_READ));
- mir_snwprintf(szToolTip, TranslateT("SMS Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szToolTip, TranslateT("SMS Message from %s"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.flags = CLEF_UNICODE;
@@ -254,7 +254,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
UINT iIcon;
if (GetDataFromMessage((LPSTR)dbei.pBlob, dbei.cbBlob, nullptr, nullptr, 0, nullptr, &iIcon)) {
memcpy(pszServiceFunctionName, SMS_READ_ACK, sizeof(SMS_READ_ACK));
- mir_snwprintf(szToolTip, TranslateT("SMS Confirmation from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szToolTip, TranslateT("SMS Confirmation from %s"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.flags = CLEF_UNICODE;
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp
index 5dd2df908c..1ec5d5bbc5 100644
--- a/plugins/SMS/src/recvdlg.cpp
+++ b/plugins/SMS/src/recvdlg.cpp
@@ -209,7 +209,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s
dwPhoneSize++;
}
- lpwszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
+ lpwszContactDisplayName = Clist_GetContactDisplayName(hContact);
mir_snwprintf(wszTitle, L"%s - %s", lpwszContactDisplayName, lpwszTitlepart);
MultiByteToWideChar(CP_UTF8, 0, lpszMessage, (int)dwMessageSize, lpwszMessage, (int)dwMessageSize + MAX_PATH);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index 99d0012e80..db9051097e 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -557,7 +557,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact)
ListMTItemAdd(&ssSMSSettings.lmtSendSMSWindowsListMT, &psswdWindowData->lmtListMTItem, psswdWindowData);
ListMTUnLock(&ssSMSSettings.lmtSendSMSWindowsListMT);
- LPTSTR lptszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
+ LPTSTR lptszContactDisplayName = Clist_GetContactDisplayName(hContact);
wchar_t tszTitle[MAX_PATH];
mir_snwprintf(tszTitle, L"%s - %s", lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd, tszTitle);
@@ -1016,7 +1016,7 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact, LPSTR lpszModule, LPSTR
dwPhoneSize = CopyNumberW(tszPhone + 1, tszPhoneRaw, dwPhoneSize);
if (IsPhoneW(tszPhone, dwPhoneSize)) {
if (tvis.hParent == nullptr) {
- tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ tvis.item.pszText = Clist_GetContactDisplayName(hContact);
tvis.hParent = TreeView_InsertItem(hWndList, &tvis);
}
tvis.item.pszText = tszPhone;
@@ -1031,7 +1031,7 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact, LPSTR lpszModule, LPSTR
dwPhoneSize = CopyNumberW(tszPhone + 1, tszPhoneRaw, dwPhoneSize);
if (IsPhoneW(tszPhone, dwPhoneSize)) {
if (tvis.hParent == nullptr) {
- tvis.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ tvis.item.pszText = Clist_GetContactDisplayName(hContact);
tvis.hParent = TreeView_InsertItem(hWndList, &tvis);
}
tvis.item.pszText = tszPhone;
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 3a38cc1f97..1bb6d077c0 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -88,7 +88,7 @@ void CSrmmWindow::RefreshInfobar()
wcsncpy_s(szText, TranslateW(szXStatusName), _TRUNCATE);
st.flags = ST_DEFAULT;
st.codepage = 1200;
- SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_NAME, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)pcli->pfnGetContactDisplayName(m_hContact, 0));
+ SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_NAME, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)Clist_GetContactDisplayName(m_hContact));
SendDlgItemMessage(m_hwndInfo, IDC_INFOBAR_STATUS, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)szContactStatusMsg);
hIcon = (HICON)SendDlgItemMessage(m_hwndInfo, IDC_XSTATUSICON, STM_SETICON, (WPARAM)hIcon, 0);
if (hIcon)
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index a2562174cb..9df51fc70c 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -728,7 +728,7 @@ void CSrmmWindow::UpdateStatusBar()
else if (m_nTypeSecs) {
sbd.hIcon = GetCachedIcon("scriver_TYPING");
sbd.pszText = szText;
- mir_snwprintf(szText, TranslateT("%s is typing a message..."), pcli->pfnGetContactDisplayName(m_hContact, 0));
+ mir_snwprintf(szText, TranslateT("%s is typing a message..."), Clist_GetContactDisplayName(m_hContact));
m_nTypeSecs--;
}
else if (m_lastMessage) {
@@ -790,7 +790,7 @@ void CSrmmWindow::UpdateTitle()
wszTitle = L"%name% (%status%) : ";
if (m_hContact && m_szProto) {
- wszTitle.Replace(L"%name%", pcli->pfnGetContactDisplayName(m_hContact, 0));
+ wszTitle.Replace(L"%name%", Clist_GetContactDisplayName(m_hContact));
wszTitle.Replace(L"%status%", Clist_GetStatusModeDescription(db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0));
CMStringW tszStatus = ptrW(db_get_wsa(m_hContact, "CList", "StatusMsg"));
@@ -1160,7 +1160,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
TabControlData tcd;
tcd.iFlags = TCDF_TEXT | TCDF_ICON;
tcd.hIcon = GetTabIcon();
- tcd.pszText = pcli->pfnGetContactDisplayName(m_hContact, 0);
+ tcd.pszText = Clist_GetContactDisplayName(m_hContact);
SendMessage(m_hwndParent, CM_UPDATETABCONTROL, (WPARAM)&tcd, (LPARAM)m_hwnd);
break;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 912b5a4741..74c7d1330c 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -145,7 +145,7 @@ EventData* getEventFromDB(CSrmmWindow *dat, MCONTACT hContact, MEVENT hDbEvent)
if (evt->dwFlags & IEEDF_SENT)
evt->pszNickT = Contact_GetInfo(CNF_DISPLAY, 0, dat->m_szProto);
else
- evt->pszNickT = mir_wstrdup(pcli->pfnGetContactDisplayName(hContact, 0));
+ evt->pszNickT = mir_wstrdup(Clist_GetContactDisplayName(hContact));
if (evt->eventType == EVENTTYPE_FILE) {
char *filename = ((char*)dbei.pBlob) + sizeof(DWORD);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 3af9114bac..6bf42b4f49 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -114,7 +114,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
}
if (hwnd == nullptr || !IsWindowVisible(GetParent(hwnd))) {
wchar_t toolTip[256];
- mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.flags = CLEF_UNICODE;
@@ -195,7 +195,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
wchar_t szTip[256];
- mir_snwprintf(szTip, TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTip, TranslateT("%s is typing a message"), Clist_GetContactDisplayName(hContact));
if (g_dat.flags2 & SMF2_SHOWTYPINGCLIST) {
pcli->pfnRemoveEvent(hContact, 1);
@@ -277,7 +277,7 @@ static void RestoreUnreadMessageAlerts(void)
cle.szTooltip.w = toolTip;
for (auto &e : arEvents) {
- mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(e->hContact, 0));
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(e->hContact));
cle.hContact = e->hContact;
cle.hDbEvent = e->hEvent;
pcli->pfnAddEvent(&cle);
diff --git a/plugins/Scriver/src/msgtimedout.cpp b/plugins/Scriver/src/msgtimedout.cpp
index e9fb7d7435..4fe279e9af 100644
--- a/plugins/Scriver/src/msgtimedout.cpp
+++ b/plugins/Scriver/src/msgtimedout.cpp
@@ -33,7 +33,7 @@ CErrorDlg::CErrorDlg(const wchar_t *pwszDescr, HWND hWnd, MessageSendQueueItem *
m_btnOk(this, IDOK),
m_btnCancel(this, IDCANCEL)
{
- const wchar_t *pwszName = pcli->pfnGetContactDisplayName(pItem->hContact, 0);
+ const wchar_t *pwszName = Clist_GetContactDisplayName(pItem->hContact);
if (pwszName)
m_wszName.Format(L"%s - %s", TranslateT("Send error"), pwszName);
else
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index e927f7a853..34f9306fde 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -186,13 +186,13 @@ void addMsg2Queue(pUinKey ptr, WPARAM wParam, LPSTR szMsg)
void getContactNameA(MCONTACT hContact, LPSTR szName)
{
- ptrA dn(mir_u2a((LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0)));
+ ptrA dn(mir_u2a(Clist_GetContactDisplayName(hContact)));
mir_strcpy(szName, dn);
}
void getContactName(MCONTACT hContact, LPSTR szName)
{
- mir_wstrcpy((LPWSTR)szName, (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_wstrcpy((LPWSTR)szName, Clist_GetContactDisplayName(hContact));
}
void getContactUinA(MCONTACT hContact, LPSTR szUIN)
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp
index fbced3dd22..c57827c6c7 100644
--- a/plugins/SecureIM/src/crypt_popups.cpp
+++ b/plugins/SecureIM/src/crypt_popups.cpp
@@ -41,7 +41,7 @@ void showPopup(LPCSTR lpzText, MCONTACT hContact, HICON hIcon, UINT type)
POPUPDATAW ppd = { 0 };
ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)pcli->pfnGetContactDisplayName(hContact, 0);
+ LPWSTR lpwzContactName = Clist_GetContactDisplayName(hContact);
wcsncpy(ppd.lpwzContactName, lpwzContactName, MAX_CONTACTNAME-1);
LPWSTR lpwzText = mir_a2u(lpzText);
wcsncpy(ppd.lpwzText, TranslateW(lpwzText),MAX_SECONDLINE-1);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index d062711c6f..87a021d713 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -1,6 +1,5 @@
#include "commonheaders.h"
-CLIST_INTERFACE *pcli;
int hLangpack = 0;
PLUGININFOEX pluginInfoEx = {
@@ -288,7 +287,6 @@ static int onShutdown(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int __cdecl Load(void)
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
DisableThreadLibraryCalls(g_hInst);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp
index 176168dd61..fb0f4f4e12 100644
--- a/plugins/SeenPlugin/src/history.cpp
+++ b/plugins/SeenPlugin/src/history.cpp
@@ -174,9 +174,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA
TranslateDialogDefault(hwndDlg);
hContact = (MCONTACT)lparam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lparam);
- mir_snwprintf(sztemp, L"%s: %s",
- pcli->pfnGetContactDisplayName(hContact, 0),
- TranslateT("last seen history"));
+ mir_snwprintf(sztemp, L"%s: %s", Clist_GetContactDisplayName(hContact), TranslateT("last seen history"));
SetWindowText(hwndDlg, sztemp);
Window_SetSkinIcon_IcoLib(hwndDlg, SKINICON_OTHER_MIRANDA);
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index b52d98e957..7491080adf 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInstance;
HANDLE ehmissed = nullptr, ehuserinfo = nullptr, ehmissed_proto = nullptr;
HANDLE g_hShutdownEvent;
@@ -85,7 +84,6 @@ static int OnShutdown(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
g_pUserInfo = WindowList_Create();
g_hShutdownEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index c24473164e..b378609f44 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -107,7 +107,7 @@ int ShowMissed(void)
CMStringW buf;
for (int loop = 0; loop < mcs.count; loop++) {
- buf.Append(pcli->pfnGetContactDisplayName(mcs.wpcontact[loop], 0));
+ buf.Append(Clist_GetContactDisplayName(mcs.wpcontact[loop]));
if (db_get_b(NULL, S_MOD, "MissedOnes_Count", 0))
buf.AppendFormat(L" [%i]", mcs.times[loop]);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index d93f241b4d..363da08e53 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -261,7 +261,7 @@ wchar_t* ParseString(wchar_t *szstring, MCONTACT hcontact)
goto LBL_2DigNum;
case 'n':
- charPtr = hcontact ? (wchar_t*)pcli->pfnGetContactDisplayName(hcontact, 0) : (wantempty ? L"" : L"---");
+ charPtr = hcontact ? Clist_GetContactDisplayName(hcontact) : (wantempty ? L"" : L"---");
goto LBL_charPtr;
case 'N':
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 16c40d1d1b..c7f583cc50 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -31,7 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Prototypes ///////////////////////////////////////////////////////////////////////////
CHAT_MANAGER *pci;
-CLIST_INTERFACE *pcli;
HINSTANCE g_hSendSS;
MGLOBAL g_myGlobals;
HNETLIBUSER g_hNetlibUser=nullptr;//!< Netlib Register User
@@ -267,7 +266,6 @@ DLL_EXPORT int Load(void)
{
mir_getLP(&pluginInfo);
pci = Chat_GetInterface();
- pcli = Clist_GetInterface();
/// hook events
HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 0c6512f63c..e5ffcb4a9a 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -184,7 +184,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
/// Taskbar and Window icon
Window_SetIcon_IcoLib(m_hWnd, GetIconHandle(ICO_MAIN));
- wchar_t *pt = mir_wstrdup(pcli->pfnGetContactDisplayName(m_hContact, 0));
+ wchar_t *pt = mir_wstrdup(Clist_GetContactDisplayName(m_hContact));
if (pt && (m_hContact != 0)) {
CMStringW string;
string.AppendFormat(TranslateT("Send screenshot to %s"), pt);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index d5b790ad32..5667ffe7e4 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE g_hInst = nullptr;
HGENMENU hmSaveCurrentSession;
@@ -817,7 +816,6 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD, LPVOID)
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
CreateServiceFunction(MS_SESSIONS_SHOWFAVORITESMENU, BuildFavMenu);
CreateServiceFunction(MS_SESSIONS_OPENMANAGER, OpenSessionsManagerWindow);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index 28d5fbb075..7bfbbcf1c8 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -55,7 +55,7 @@ int OpLoadSessionContacts(WPARAM, LPARAM lparam)
int i;
for (i = 0; session_list_t[i] != 0; i++)
- SendDlgItemMessage(g_opHdlg, IDC_OPCLIST, LB_ADDSTRING, 0, (LPARAM)pcli->pfnGetContactDisplayName(session_list_t[i], 0));
+ SendDlgItemMessage(g_opHdlg, IDC_OPCLIST, LB_ADDSTRING, 0, (LPARAM)Clist_GetContactDisplayName(session_list_t[i]));
return i;
}
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index 266c80287e..d81a8f416c 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "shlcom.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
bool bIsVistaPlus;
@@ -161,7 +160,6 @@ STDAPI DllUnregisterServer()
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
InvokeThreadServer();
HookEvent(ME_OPT_INITIALISE, OnOptionsInit);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index 020a2bd435..9307ddf530 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -301,7 +301,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode)
// create an IPC slot for each contact and store display name, etc
for (i = 0; i < dwContacts; i++) {
- ptrA szContact(mir_u2a(pcli->pfnGetContactDisplayName(pContacts[i].hContact, 0)));
+ ptrA szContact(mir_u2a(Clist_GetContactDisplayName(pContacts[i].hContact)));
if (szContact != NULL) {
ptrA szGroup;
if (bGroupMode)
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index fa69450ce4..ab62e4bd34 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -80,7 +80,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
wchar_t str[256], format[128];
- wchar_t *contactName = (wchar_t *)pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact, 0);
char *szProto = GetContactProto(dat->hContact);
WORD dwStatus = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *status = Clist_GetStatusModeDescription(dwStatus, 0);
@@ -202,7 +202,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
dat->hSeq = (HANDLE)ProtoChainSend(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : nullptr;
WindowList_Add(hWindowList2, hwndDlg, dat->hContact);
- wchar_t *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact);
wchar_t str[256], format[128];
GetWindowText(hwndDlg, format, _countof(format));
mir_snwprintf(str, format, contactName);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 38a0c8e997..a450a61e73 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
HINSTANCE g_hInst;
int hLangpack;
-CLIST_INTERFACE *pcli;
PROTOACCOUNTS *accounts;
static int g_iIdleTime = -1;
@@ -1805,7 +1804,6 @@ static INT_PTR sttGetAwayMessageT(WPARAM wParam, LPARAM lParam)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
hwndSAMsgDialog = nullptr;
accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS));
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index a805dc8521..0a628931f2 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -1,6 +1,5 @@
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
HANDLE hOptInitialize, hModulesLoaded, hDBContactAdded, hDBEventAdded, hDBEventFilterAdd;
time_t last_queue_check = 0;
@@ -507,7 +506,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
srand((unsigned)time(nullptr));
bayesdb = nullptr;
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp
index 6084dc7a4d..be49f90879 100644
--- a/plugins/Spamotron/src/utils.cpp
+++ b/plugins/Spamotron/src/utils.cpp
@@ -427,7 +427,7 @@ int _notify(MCONTACT hContact, BYTE type, wchar_t *message, wchar_t *origmessage
{
char *tmp, *tmporig;
wchar_t msg[MAX_BUFFER_LENGTH];
- mir_snwprintf(msg, message, pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(msg, message, Clist_GetContactDisplayName(hContact));
if (_getOptB("LogActions", defaultLogActions)) {
tmp = mir_u2a(msg);
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h
index 91f45ef971..3e4117a119 100644
--- a/plugins/SplashScreen/src/debug.h
+++ b/plugins/SplashScreen/src/debug.h
@@ -24,7 +24,7 @@ int inline _DebugPopup(MCONTACT hContact, wchar_t *fmt, ...)
ppd.lchContact = hContact;
ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
- mir_wstrncpy(ppd.lptzContactName, (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0), MAX_CONTACTNAME);
+ mir_wstrncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME);
else
mir_wstrncpy(ppd.lptzContactName, _A2W(PlugName), MAX_CONTACTNAME);
mir_wstrncpy(ppd.lptzText, debug, MAX_SECONDLINE - 20);
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index 53275e83c5..b143b9d756 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -19,7 +19,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst = nullptr;
int hLangpack;
@@ -251,7 +250,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 4d18f3b559..93f2ce40f1 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -135,12 +135,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
}
int hLangpack = 0;
-CLIST_INTERFACE *pcli;
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index b001fa98db..e8621d6622 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -224,7 +224,7 @@ void LogSpamToFile(MCONTACT hContact, wstring message)
// Name, UID and Protocol Log line
LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", L"");
- LogContactName = (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ LogContactName = (wchar_t*)Clist_GetContactDisplayName(hContact);
LogContactId = (LogProtocol == L"") ? L"" : GetContactUid(hContact, LogProtocol);
// Name, UID and Protocol Log line
@@ -339,7 +339,7 @@ void HistoryLogFunc(MCONTACT hContact, std::string message)
std::string msg = message;
msg.append("\n");
msg.append("Protocol: ").append(GetContactProto(hContact)).append(" Contact: ");
- msg.append(toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))).append(" ID: ");
+ msg.append(toUTF8(Clist_GetContactDisplayName(hContact))).append(" ID: ");
msg.append(toUTF8(GetContactUid(hContact, toUTF16(GetContactProto(hContact)))));
HistoryLog(NULL, (char*)msg.c_str(), EVENTTYPE_MESSAGE, DBEF_READ);
}
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index 333b857f17..23c2bde316 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -105,7 +105,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
pd.lchIcon = LoadIconEx("window");
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
- mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact));
wcsncpy_s(pd.lptzText, TranslateW(szBuf), _TRUNCATE);
pd.iSeconds = g_Settings.iPopupTimeout;
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index 1dfc61b5bf..c7c020de8c 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -2438,7 +2438,7 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si)
if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == nullptr)
return;
- wchar_t *contactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(hContact);
// cut nickname if larger than x chars...
wchar_t newcontactname[128];
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 86e2066837..92ae6c0c39 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -111,7 +111,7 @@ bool CContactCache::updateNick()
{
bool fChanged = false;
if (m_isValid) {
- wchar_t *tszNick = pcli->pfnGetContactDisplayName(getActiveContact(), 0);
+ wchar_t *tszNick = Clist_GetContactDisplayName(getActiveContact());
if (tszNick && mir_wstrcmp(m_szNick, tszNick))
fChanged = true;
wcsncpy_s(m_szNick, (tszNick ? tszNick : L"<undef>"), _TRUNCATE);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 58fc404227..92fc9fe9c6 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -613,7 +613,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve
pud.PluginData = pdata;
if (hContact)
- wcsncpy_s(pud.lptzContactName, pcli->pfnGetContactDisplayName(hContact, 0), _TRUNCATE);
+ wcsncpy_s(pud.lptzContactName, Clist_GetContactDisplayName(hContact), _TRUNCATE);
else
wcsncpy_s(pud.lptzContactName, _A2T(dbe.szModule), _TRUNCATE);
@@ -720,7 +720,7 @@ int TSAPI UpdateTrayMenu(const CTabBaseDlg *dat, WORD wStatus, const char *szPro
SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
}
else {
- szNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ szNick = Clist_GetContactDisplayName(hContact);
if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
mir_snwprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 7855a24064..a2e9c5d0c7 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -528,7 +528,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
cle.szTooltip.w = toolTip;
for (auto &e : arEvents) {
- mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(e->hContact, 0));
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(e->hContact));
cle.hContact = e->hContact;
cle.hDbEvent = e->hEvent;
pcli->pfnAddEvent(&cle);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index f703b02e2c..7bcb6a345e 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -271,7 +271,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
if (mode) {
wchar_t szTip[256];
- mir_snwprintf(szTip, TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTip, TranslateT("%s is typing a message"), Clist_GetContactDisplayName(hContact));
if (fShowOnClist && M.GetByte(SRMSGMOD, "ShowTypingBalloon", 0))
Clist_TrayNotifyW(nullptr, TranslateT("Typing notification"), szTip, NIIF_INFO, 1000 * 4);
@@ -515,7 +515,7 @@ nowindowcreate:
cle.flags = CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = MS_MSG_READMESSAGE;
- contactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ contactName = Clist_GetContactDisplayName(hContact);
mir_snwprintf(toolTip, TranslateT("Message from %s"), contactName);
cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index ceff02c1b5..af0aee1ff3 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1224,7 +1224,7 @@ void CTabBaseDlg::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D
}
else {
evData.dwFlags = IEEDF_UNICODE_NICK;
- evData.ptszNick = pcli->pfnGetContactDisplayName(m_hContact, 0);
+ evData.ptszNick = Clist_GetContactDisplayName(m_hContact);
}
switch (dbei_s->eventType) {
case EVENTTYPE_STATUSCHANGE: evData.iType = IEED_EVENT_STATUSCHANGE; break;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index bfa2da6059..efb25389cb 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -576,7 +576,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
char *szProto = GetContactProto(hContact);
// obtain various status information about the contact
- wchar_t *contactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(hContact);
// cut nickname if larger than x chars...
wchar_t newcontactname[128], tabtitle[128];
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index eb80099210..37f642ca4e 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -116,7 +116,7 @@ CSendLaterJob::~CSendLaterJob()
* show a popup notification, unless they are disabled
*/
if (PluginConfig.g_bPopupAvail && fShowPopup) {
- wchar_t *tszName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *tszName = Clist_GetContactDisplayName(hContact);
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 441596fb82..432dffe6a2 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -150,7 +150,7 @@ int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...)
wchar_t szTitle[128];
mir_snwprintf(szTitle, TranslateT("TabSRMM message (%s)"),
- (hContact != 0) ? pcli->pfnGetContactDisplayName(hContact, 0) : TranslateT("Global"));
+ (hContact != 0) ? Clist_GetContactDisplayName(hContact) : TranslateT("Global"));
Clist_TrayNotifyW(nullptr, szTitle, debug, NIIF_INFO, 1000 * 4);
return 0;
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp
index 7128879516..b649dfc931 100644
--- a/plugins/TabSRMM/src/trayicon.cpp
+++ b/plugins/TabSRMM/src/trayicon.cpp
@@ -191,7 +191,7 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const wchar_t *szNickname, c
wchar_t szFinalNick[100];
if (szNickname == nullptr)
- wcsncpy_s(szFinalNick, pcli->pfnGetContactDisplayName(hContact, 0), _TRUNCATE);
+ wcsncpy_s(szFinalNick, Clist_GetContactDisplayName(hContact), _TRUNCATE);
else
wcsncpy_s(szFinalNick, szNickname, _TRUNCATE);
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 1f5d6f7d8a..1eb3ad1e03 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -88,7 +88,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode)
if (!PluginConfig.g_bPopupAvail || Disabled)
return;
- wchar_t *szContactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *szContactName = Clist_GetContactDisplayName(hContact);
if (OnePopup) {
HWND hPopupWnd = WindowList_Find(hPopupsList, hContact);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 8e62b2fd1b..91ec16cc14 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -415,7 +415,7 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetClientRect(hwndDlg, &rcClient);
wchar_t szBuffer[180];
- mir_snwprintf(szBuffer, TranslateT("Set messaging options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szBuffer, TranslateT("Set messaging options for %s"), Clist_GetContactDisplayName(hContact));
SetWindowText(hwndDlg, szBuffer);
memset(&tci, 0, sizeof(tci));
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index c6f520c024..efd68d09c7 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -304,7 +304,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (!opt.bWaitForContent)
db_unset(pwd->hContact, MODULE, "TempStatusMsg");
- wcsncpy_s(pwd->swzTitle, pcli->pfnGetContactDisplayName(pwd->hContact, 0), _TRUNCATE);
+ wcsncpy_s(pwd->swzTitle, Clist_GetContactDisplayName(pwd->hContact), _TRUNCATE);
char *szProto = GetContactProto(pwd->hContact);
pwd->spiTitle = Smileys_PreParse(pwd->swzTitle, -1, szProto);
@@ -1607,7 +1607,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
bTitlePainted = true;
}
- wchar_t *swzNick = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *swzNick = Clist_GetContactDisplayName(hContact);
if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) {
wchar_t *swzProto = a2t(proto);
mir_snwprintf(swzName, L"%s (%s)", swzNick, swzProto);
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index e50a1c808a..95c0051e77 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -305,7 +305,7 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int
if (!hSubContact)
return false;
- wchar_t *swzNick = pcli->pfnGetContactDisplayName(hSubContact, 0);
+ wchar_t *swzNick = Clist_GetContactDisplayName(hSubContact);
if (swzNick)
wcsncpy(buff, swzNick, bufflen);
return true;
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 149f721a9e..5a8d31192f 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -34,7 +34,7 @@ HANDLE hReloadFonts = nullptr;
HANDLE hFolderChanged, hSkinFolder;
wchar_t SKIN_FOLDER[256];
-CLIST_INTERFACE *pcli = nullptr;
+CLIST_INTERFACE *pcli;
int hLangpack;
PLUGININFOEX pluginInfoEx =
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index e91d2194df..e513d20e7d 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -819,7 +819,7 @@ wchar_t* CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, wchar
const wchar_t* szIs = TranslateT("is");
const char* szProto = hContact == 0 ? "Proto" : ::GetContactProto(hContact);
- const wchar_t* szContactName = ::pcli->pfnGetContactDisplayName(hContact, 0);
+ const wchar_t* szContactName = ::Clist_GetContactDisplayName(hContact);
memset(szString, 0, iBufSize*sizeof(wchar_t));
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index 81187c6502..5a38ef72f5 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -688,7 +688,7 @@ static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *p
mir_snwprintf(szMsg,
TranslateT("%s provides a new birthday via protocol.\nIt is %s. The old one was %s.\n\nDo you want to use this as the new birthday for this contact?"),
- DB::Contact::DisplayName(hContact), szDate, szoldDate);
+ Clist_GetContactDisplayName(hContact), szDate, szoldDate);
MB.cbSize = sizeof(MSGBOX);
MB.hParent = nullptr;
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 73ab8c733b..b5f9e95614 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -695,7 +695,7 @@ class CAnnivList
}
// second column: contact name
- AddSubItem(iItem, COLUMN_CONTACT, DB::Contact::DisplayName(hContact));
+ AddSubItem(iItem, COLUMN_CONTACT, Clist_GetContactDisplayName(hContact));
// third column: protocol
wchar_t *ptszProto = mir_a2u(pszProto);
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 3e4807a5ee..0ad616897e 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -1091,7 +1091,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
else if (pdbcws && pdbcws->value.type == DBVT_WCHAR)
pszName = pdbcws->value.ptszVal;
else
- pszName = DB::Contact::DisplayName(pPs->hContact);
+ pszName = Clist_GetContactDisplayName(pPs->hContact);
HWND hName = GetDlgItem(hDlg, TXT_NAME);
SetWindowText(hName, pszName);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index 2be1bf0365..56c501d28c 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -208,7 +208,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
name = TranslateT("Owner");
}
else {
- name = DB::Contact::DisplayName(pDat->ExImContact->hContact);
+ name = Clist_GetContactDisplayName(pDat->ExImContact->hContact);
}
break;
case EXIM_SUBGROUP:
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index cce65ecc2d..b7ddb5b4a7 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -53,7 +53,7 @@ static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WO
return;
}
- disp = temp = mir_u2a(pcli->pfnGetContactDisplayName(ExImContact->hContact, NULL));
+ disp = temp = mir_u2a(Clist_GetContactDisplayName(ExImContact->hContact));
break;
case EXIM_SUBGROUP:
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h
index f085c8b87d..3289d35405 100644
--- a/plugins/UserInfoEx/src/mir_db.h
+++ b/plugins/UserInfoEx/src/mir_db.h
@@ -28,9 +28,6 @@ namespace DB {
* or modify contacts in the database.
**/
namespace Contact {
- __forceinline LPTSTR DisplayName(MCONTACT hContact)
- { return pcli->pfnGetContactDisplayName(hContact, 0);
- }
DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index f340a300c3..c1a9ac3bf7 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -624,7 +624,7 @@ class CContactUpdater : public CContactQueue
if (_pProgress)
{
_pProgress->SetTextParam(TranslateT("[b]%s (%S)...[/b]\n%d Contacts remaining"),
- DB::Contact::DisplayName(_hContact), pszProto, Size());
+ Clist_GetContactDisplayName(_hContact), pszProto, Size());
}
if (IsProtoOnline(pszProto))
{
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index a291ec092a..b2dafa8374 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -255,7 +255,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT
if (hContact) {
ppd.lchContact = hContact;
- mir_snwprintf(ppd.lptzContactName, L"%s - %s", TranslateW(pszDesc), DB::Contact::DisplayName(hContact));
+ mir_snwprintf(ppd.lptzContactName, L"%s - %s", TranslateW(pszDesc), Clist_GetContactDisplayName(hContact));
}
else mir_wstrncpy(ppd.lptzContactName, TranslateT("Reminder"), _countof(ppd.lptzContactName));
@@ -317,12 +317,12 @@ static void NotifyFlashCListIcon(MCONTACT hContact, const CEvent &evt)
switch (evt._eType) {
case CEvent::BIRTHDAY:
- mir_snwprintf(szMsg, TranslateT("%s has %s today."), DB::Contact::DisplayName(hContact), TranslateT("Birthday"));
+ mir_snwprintf(szMsg, TranslateT("%s has %s today."), Clist_GetContactDisplayName(hContact), TranslateT("Birthday"));
cle.hIcon = IcoLib_GetIcon(ICO_COMMON_BIRTHDAY);
break;
case CEvent::ANNIVERSARY:
- mir_snwprintf(szMsg, TranslateT("%s has %s today."), DB::Contact::DisplayName(hContact), TranslateT("an anniversary"));
+ mir_snwprintf(szMsg, TranslateT("%s has %s today."), Clist_GetContactDisplayName(hContact), TranslateT("an anniversary"));
cle.hIcon = IcoLib_GetIcon(ICO_COMMON_ANNIVERSARY);
break;
@@ -481,13 +481,13 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti
switch (Diff) {
case 0:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday today."), DB::Contact::DisplayName(hContact));
+ cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday today."), Clist_GetContactDisplayName(hContact));
break;
case 1:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday tomorrow."), DB::Contact::DisplayName(hContact));
+ cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday tomorrow."), Clist_GetContactDisplayName(hContact));
break;
default:
- cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday in %d days."), DB::Contact::DisplayName(hContact), Diff);
+ cchMsg = mir_snwprintf(szMsg, TranslateT("%s has birthday in %d days."), Clist_GetContactDisplayName(hContact), Diff);
}
int age = mtb.Age(&Now);
if (age > 0)
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas
index 44a8441857..1ec228ce3e 100644
--- a/plugins/Utils.pas/mircontacts.pas
+++ b/plugins/Utils.pas/mircontacts.pas
@@ -511,7 +511,7 @@ begin
begin
StrCopyW(buf,format);
if lName then
- StrReplaceW(buf,'%name%', cli^.pfnGetContactDisplayName(hContact,0));
+ StrReplaceW(buf,'%name%', Clist_GetContactDisplayName(hContact,0));
if lGroup then
begin
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp
index 3ddf6b707c..b7195bcc6d 100644
--- a/plugins/Variables/src/main.cpp
+++ b/plugins/Variables/src/main.cpp
@@ -18,7 +18,6 @@
*/
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack = 0;
@@ -56,7 +55,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
LoadVarModule();
return 0;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index d272620528..70c69418b5 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -605,7 +605,7 @@ static wchar_t *parseContactNameString(ARGUMENTSINFO *ai)
return nullptr;
ai->flags |= AIF_DONTPARSE;
- wchar_t *ret = (wchar_t*)pcli->pfnGetContactDisplayName(ai->fi->hContact, 0);
+ wchar_t *ret = Clist_GetContactDisplayName(ai->fi->hContact);
return (ret == nullptr) ? nullptr : mir_wstrdup(ret);
}
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index 238e9e39de..d5a35157b1 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -251,7 +251,7 @@ begin
// Action
StrCopyW(buf,TranslateW('Music Info from '));
- StrCatW(buf,cli^.pfnGetContactDisplayName(ccs^.hContact,0));
+ StrCatW(buf,Clist_GetContactDisplayName(ccs^.hContact,0));
MessageBoxW(0,TranslateW(pos_template),buf,MB_ICONINFORMATION);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 12d24e8dfb..6a5151429f 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -189,7 +189,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
HFONT hfnt = CreateFontIndirect(&lfnt1);
HFONT hfntold = (HFONT)SelectObject(hdc, hfnt);
- wchar_t *nick = (wchar_t*)pcli->pfnGetContactDisplayName(data->hContact, 0);
+ wchar_t *nick = Clist_GetContactDisplayName(data->hContact);
SIZE fontSize;
GetTextExtentPoint32(hdc, L"|", 1, &fontSize);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index ae13134832..b56ba33794 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -28,7 +28,6 @@ HNETLIBUSER hNetlibUser;
HANDLE hHookDisplayDataAlert, hHookAlertPopup, hHookAlertWPopup, hHookErrorPopup, hHookAlertOSD;
int hLangpack = 0;
-CLIST_INTERFACE *pcli;
static HMODULE hRichEd = nullptr;
PLUGININFOEX pluginInfoEx = {
@@ -126,7 +125,6 @@ extern "C" int __declspec(dllexport) Unload(void)
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
HookEvent(ME_CLIST_DOUBLECLICKED, Doubleclick);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 78d217a383..d3dc4fc415 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -186,7 +186,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam)
if (db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0))
return 0;
- wchar_t *ptszContactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *ptszContactName = Clist_GetContactDisplayName(hContact);
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
mir_snwprintf(newdisplaytext, L"%s\n%s", ptszContactName, displaytext);
PUShowMessageT(newdisplaytext, SM_WARNING);
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index a9664c377b..c395ad5687 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -29,8 +29,6 @@ int hLangpack;
CommonData commonData = { 0 };
-CLIST_INTERFACE *pcli;
-
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -54,7 +52,6 @@ extern "C" int __declspec(dllexport) Load(void)
Log("%s", "Entering function " __FUNCTION__);
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index 4e1260f834..3f7f6d7ba4 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -417,7 +417,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
char *szProto = GetContactProto(hContact);
wchar_t buffer[2048];
- mir_snwprintf(buffer, TranslateT("Set birthday for %s:"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(buffer, TranslateT("Set birthday for %s:"), Clist_GetContactDisplayName(hContact));
SetWindowText(hWnd, buffer);
HWND hDate = GetDlgItem(hWnd, IDC_DATE);
@@ -605,7 +605,7 @@ int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll,
else
ListView_SetItemText(hList, entry, 0, ptszAccName);
- ListView_SetItemText(hList, entry, 1, pcli->pfnGetContactDisplayName(hContact, 0));
+ ListView_SetItemText(hList, entry, 1, Clist_GetContactDisplayName(hContact));
wchar_t buffer[2048];
if ((dtb <= 366) && (dtb >= 0))
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp
index 91605c80b3..ba5fc70842 100644
--- a/plugins/WhenWasIt/src/notifiers.cpp
+++ b/plugins/WhenWasIt/src/notifiers.cpp
@@ -69,7 +69,7 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
if (commonData.bIgnoreSubcontacts && db_mc_isSub(hContact))
return 0;
- wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
wchar_t text[1024];
BuildDTBText(dtb, name, text, _countof(text));
@@ -113,7 +113,7 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
if (commonData.bIgnoreSubcontacts && db_mc_isSub(hContact))
return 0;
- wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
wchar_t text[1024];
BuildDABText(dab, name, text, _countof(text));
@@ -149,7 +149,7 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age)
{
- wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
wchar_t text[1024];
BuildDTBText(dtb, name, text, _countof(text));
@@ -171,7 +171,7 @@ int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age)
int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
{
- wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
wchar_t text[1024];
BuildDABText(dab, name, text, _countof(text));
diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp
index 242f4d75b7..7769261257 100644
--- a/plugins/WinterSpeak/src/UserInformation.cpp
+++ b/plugins/WinterSpeak/src/UserInformation.cpp
@@ -61,9 +61,9 @@ void UserInformation::insertName(std::wstring &str, MCONTACT user) const
}
//------------------------------------------------------------------------------
-std::wstring UserInformation::nameString(MCONTACT user) const
+std::wstring UserInformation::nameString(MCONTACT hContact) const
{
- WCHAR *ret = pcli->pfnGetContactDisplayName(user, 0);
+ WCHAR *ret = Clist_GetContactDisplayName(hContact);
if (nullptr == ret)
return L"";
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index 293a296ec5..34b0c95268 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -1,6 +1,5 @@
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HINSTANCE g_hInst;
int hLangpack;
DWORD g_mirandaVersion;
@@ -105,7 +104,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
if (!g_speak_config)
{
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp
index 6d96d971e1..283aa78bdb 100644
--- a/plugins/XSoundNotify/src/dialog.cpp
+++ b/plugins/XSoundNotify/src/dialog.cpp
@@ -43,7 +43,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP
break;
}
- wchar_t *nick = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *nick = Clist_GetContactDisplayName(hContact);
wchar_t value[100];
mir_snwprintf(value, TranslateT("Custom sound for %s (%s)"), nick, uid);
SetWindowText(hwndDlg, value);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index cc2d8a51ca..0444d7c155 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -76,7 +76,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
mir_wstrcpy(uid, TranslateT("(Unknown contact)"));
}
- wchar_t *nick = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *nick = Clist_GetContactDisplayName(hContact);
size_t value_max_len = (mir_wstrlen(uid) + mir_wstrlen(nick) + 4);
wchar_t *value = (wchar_t *)mir_alloc(sizeof(wchar_t) * value_max_len);
mir_snwprintf(value, value_max_len, L"%s (%s)", nick, uid);
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index e8ea9d302f..e06c33a311 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -16,7 +16,6 @@ HGENMENU hChangeSound = nullptr;
MWindowList hChangeSoundDlgList = nullptr;
BYTE isIgnoreSound = 0, isOwnSound = 0, isIgnoreAccSound = 0, isAccSound = 0;
-CLIST_INTERFACE *pcli;
CHAT_MANAGER *pci;
PLUGININFOEX pluginInfo = {
@@ -240,7 +239,6 @@ extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
pci = Chat_GetInterface();
- pcli = Clist_GetInterface();
CreateServiceFunction("XSoundNotify/ContactMenuCommand", ShowDialog);
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 4bea49cf35..d0feea1c5f 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -21,7 +21,6 @@ Features:
#include "../../utils/mir_buffer.h"
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -144,7 +143,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent)
switch(*++p) {
case 'u':
case 'U':
- szUtfMsg.append(T2Utf(pcli->pfnGetContactDisplayName(hContact, 0)));
+ szUtfMsg.append(T2Utf(Clist_GetContactDisplayName(hContact)));
break;
case 'i':
@@ -221,7 +220,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
// Load plugin options from DB
hForwardFrom = (MCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp
index 8a2fba246b..86d9ad6028 100644
--- a/plugins/YARelay/src/options.cpp
+++ b/plugins/YARelay/src/options.cpp
@@ -68,7 +68,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_SETCURSEL, (WPARAM)idx, 0);
for (auto &hContact : Contacts()) {
- wchar_t *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *ptszNick = Clist_GetContactDisplayName(hContact);
if (ptszNick){
idx = SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_ADDSTRING, 0, (LPARAM)ptszNick);
SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_SETITEMDATA, (WPARAM)idx, hContact);
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp
index 4b5865db85..bda652b9ed 100644
--- a/plugins/wbOSD/src/events.cpp
+++ b/plugins/wbOSD/src/events.cpp
@@ -63,7 +63,7 @@ int ProtoAck(WPARAM,LPARAM lparam)
DWORD ann = db_get_dw( NULL, THIS_MODULE, "announce", DEFAULT_ANNOUNCE );
if ( ann & ( 1 << ( ack->lParam - ID_STATUS_OFFLINE ))) {
wchar_t buffer[512];
- mir_snwprintf(buffer, TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(ack->hContact, 0), Clist_GetStatusModeDescription(ack->lParam, 0));
+ mir_snwprintf(buffer, TranslateT("%s is %s"), Clist_GetContactDisplayName(ack->hContact), Clist_GetStatusModeDescription(ack->lParam, 0));
ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), ack->hContact);
} } }
@@ -121,7 +121,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
return 0;
wchar_t bufferW[512];
- mir_snwprintf(bufferW, TranslateT("%s is %s"), pcli->pfnGetContactDisplayName(wParam, 0), Clist_GetStatusModeDescription(newStatus, 0));
+ mir_snwprintf(bufferW, TranslateT("%s is %s"), Clist_GetContactDisplayName(wParam), Clist_GetStatusModeDescription(newStatus, 0));
ShowOSD(bufferW, 0, db_get_dw(NULL,THIS_MODULE, "clr_status", DEFAULT_CLRSTATUS), hContact);
return 0;
}
@@ -182,12 +182,12 @@ int HookedNewEvent(WPARAM wParam, LPARAM hDBEvent)
wchar_t *c1 = nullptr, *c2 = nullptr;
if ( i1 == 1 )
- c1 = mir_wstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
+ c1 = mir_wstrdup(Clist_GetContactDisplayName(wParam));
else if ( i1 == 2 )
c1 = DbEvent_GetTextW( &dbe, 0 );
if ( i2 == 1 )
- c2 = mir_wstrdup(pcli->pfnGetContactDisplayName(wParam, 0));
+ c2 = mir_wstrdup(Clist_GetContactDisplayName(wParam));
else if ( i2 == 2 )
c2 = DbEvent_GetTextW( &dbe, 0 );
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp
index a898fcd591..fdae90110a 100644
--- a/plugins/wbOSD/src/main.cpp
+++ b/plugins/wbOSD/src/main.cpp
@@ -13,7 +13,6 @@ HINSTANCE hI;
HWND g_hWnd = nullptr;
int hLangpack = 0;
-CLIST_INTERFACE *pcli;
HANDLE hHookedInit, hProtoAck, hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged;
void logmsg2(char *str);
@@ -44,7 +43,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
logmsg("Load");
hHookedInit = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index 2e7f7849dd..ee2810a5c7 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// TODO: Make following as "globals" structure?
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
int hLangpack;
HINSTANCE g_hInstance;
@@ -68,7 +67,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
InitIcons();
InitContactMenus();
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 0203045c42..f52f9087a6 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -103,7 +103,7 @@ void FacebookProto::ProcessFriendList(void*)
// Notify it, if user wants to be notified
if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) {
std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
- NotifyEvent(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Contact is back on server-list."), hContact, EVENT_FRIENDSHIP, &url);
+ NotifyEvent(Clist_GetContactDisplayName(hContact), TranslateT("Contact is back on server-list."), hContact, EVENT_FRIENDSHIP, &url);
}
}
@@ -127,7 +127,7 @@ void FacebookProto::ProcessFriendList(void*)
// Notify it, if user wants to be notified
if (getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) {
std::string url = FACEBOOK_URL_PROFILE + std::string(id);
- NotifyEvent(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Contact is no longer on server-list."), hContact, EVENT_FRIENDSHIP, &url);
+ NotifyEvent(Clist_GetContactDisplayName(hContact), TranslateT("Contact is no longer on server-list."), hContact, EVENT_FRIENDSHIP, &url);
}
}
}
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 94ad21a6da..42852de473 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -819,7 +819,7 @@ retry:
gce.ptszUID = id;
wchar_t* messageT = mir_utf8decodeW(e->event.msg.message);
gce.ptszText = messageT;
- gce.ptszNick = (wchar_t*)pcli->pfnGetContactDisplayName(getcontact(e->event.msg.sender, 1, 0, nullptr), 0);
+ gce.ptszNick = (wchar_t*)Clist_GetContactDisplayName(getcontact(e->event.msg.sender, 1, 0, nullptr));
gce.time = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
gce.dwFlags = GCEF_ADDTOLOG;
debugLogW(L"mainthread() (%x): Conference message to room %s & id %s.", this, chat, id);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 7cde32feef..f1d5e11aec 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -282,7 +282,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c
unknown >= getWord(GG_KEY_GC_COUNT_UNKNOWN, GG_KEYDEF_GC_COUNT_UNKNOWN))))
{
wchar_t *senderName = unknownSender ?
- TranslateT("Unknown") : pcli->pfnGetContactDisplayName(getcontact(sender, 0, 0, nullptr), 0);
+ TranslateT("Unknown") : Clist_GetContactDisplayName(getcontact(sender, 0, 0, nullptr));
wchar_t error[256];
mir_snwprintf(error, TranslateT("%s has initiated conference with %d participants (%d unknowns).\nDo you want to participate?"),
senderName, recipients_count + 1, unknown);
@@ -309,7 +309,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c
wchar_t *senderName;
if (sender)
{
- senderName = pcli->pfnGetContactDisplayName(getcontact(sender, 1, 0, nullptr), 0);
+ senderName = Clist_GetContactDisplayName(getcontact(sender, 1, 0, nullptr));
mir_snwprintf(status, TranslateT("%s initiated the conference."), senderName);
}
else
@@ -365,7 +365,7 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c
MCONTACT hContact = getcontact(chat->recipients[i], 1, 0, nullptr);
UIN2IDT(chat->recipients[i], id);
if (hContact)
- gce.ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ gce.ptszNick = Clist_GetContactDisplayName(hContact);
else
gce.ptszNick = TranslateT("'Unknown'");
gce.bIsMe = 0;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 38540c4620..844d3a4c28 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -423,7 +423,7 @@ static INT_PTR CALLBACK gg_img_dlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// Set main window image
Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(IDI_IMAGE));
- wchar_t *szName = pcli->pfnGetContactDisplayName(dat->hContact, 0), szTitle[128];
+ wchar_t *szName = Clist_GetContactDisplayName(dat->hContact), szTitle[128];
if (dat->bReceiving)
mir_snwprintf(szTitle, TranslateT("Image from %s"), szName);
else
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index 46e5b68c17..4f6cd06873 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -31,7 +31,6 @@
CMPlugin g_plugin;
HINSTANCE hInst;
int hLangpack;
-CLIST_INTERFACE *pcli;
bool g_bTerminated;
BOOL bPopupService = FALSE;
@@ -85,7 +84,6 @@ IconItem iconList[] =
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
srand(time(nullptr));
_tzset();
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp
index 0c6ac962d3..b9b97b89a8 100644
--- a/protocols/IcqOscarJ/src/stdpackets.cpp
+++ b/protocols/IcqOscarJ/src/stdpackets.cpp
@@ -1346,7 +1346,7 @@ DWORD CIcqProto::icq_sendSMSServ(const char *szPhoneNumber, const char *szMsg)
strftime(szTime, sizeof(szTime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
/* Sun, 00 Jan 0000 00:00:00 GMT */
- char *szMyNick = null_strdup(_T2A(pcli->pfnGetContactDisplayName(NULL, 0)));
+ char *szMyNick = null_strdup(_T2A(Clist_GetContactDisplayName(0)));
size_t nBufferSize = 1 + mir_strlen(szMyNick) + mir_strlen(szPhoneNumber) + mir_strlen(szMsg) + sizeof("<icq_sms_message><destination></destination><text></text><codepage>1252</codepage><encoding>utf8</encoding><senders_UIN>0000000000</senders_UIN><senders_name></senders_name><delivery_receipt>Yes</delivery_receipt><time>Sun, 00 Jan 0000 00:00:00 GMT</time></icq_sms_message>");
if (szBuffer = (char *)_alloca(nBufferSize)) {
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index d4b1aba429..cc3ce357b1 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -544,7 +544,7 @@ char* NickFromHandle(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return null_strdup(Translate("<invalid>"));
- return null_strdup(_T2A(pcli->pfnGetContactDisplayName(hContact, 0)));
+ return null_strdup(_T2A(Clist_GetContactDisplayName(hContact)));
}
char* NickFromHandleUtf(MCONTACT hContact)
@@ -552,7 +552,7 @@ char* NickFromHandleUtf(MCONTACT hContact)
if (hContact == INVALID_CONTACT_ID)
return ICQTranslateUtf(LPGEN("<invalid>"));
- return make_utf8_string(pcli->pfnGetContactDisplayName(hContact, 0));
+ return make_utf8_string(Clist_GetContactDisplayName(hContact));
}
char* strUID(DWORD dwUIN, char *pszUID)
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 41f505a4ce..50cfa1acae 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1282,7 +1282,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g
if (item != nullptr) {
item->type = L"conference";
MCONTACT hContact = ppro->HContactFromJID(item->jid);
- item->name = pcli->pfnGetContactDisplayName(hContact, 0);
+ item->name = Clist_GetContactDisplayName(hContact);
ppro->AddEditBookmark(item);
}
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index ec31312ec5..866e09447d 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -112,7 +112,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT
return;
if (cws->value.type == DBVT_DELETED) {
- wchar_t *nick = pcli->pfnGetContactDisplayName(hContact, GCDNF_NOMYHANDLE);
+ wchar_t *nick = Clist_GetContactDisplayName(hContact, GCDNF_NOMYHANDLE);
AddContactToRoster(item->jid, nick, item->group);
mir_free(nick);
return;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 240330daec..a18c7f1152 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -516,7 +516,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM)
if (ListGetItemPtr(LIST_BOOKMARK, roomID) == nullptr) {
JABBER_LIST_ITEM *item = new JABBER_LIST_ITEM();
item->jid = mir_wstrdup(roomID);
- item->name = pcli->pfnGetContactDisplayName(hContact, 0);
+ item->name = Clist_GetContactDisplayName(hContact);
item->type = L"conference";
item->nick = getWStringA(hContact, "MyNick");
AddEditBookmark(item);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index 88304d7830..4496d76659 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -1158,7 +1158,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis)
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT("'"), &rc);
if (MCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
- wchar_t *szName = pcli->pfnGetContactDisplayName(hContact, 0);
+ wchar_t *szName = Clist_GetContactDisplayName(hContact);
if (szName) {
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT(" (nickname: "), &rc);
DrawNextRulePart(lpdis->hDC, clLine1, szName, &rc);
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 9d80158bb0..49d172e9bb 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -28,7 +28,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact)
CMStringW wszEMail;
mraGetStringW(hContact, "e-mail", wszEMail);
- if (Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, pcli->pfnGetContactDisplayName(hContact, 0), (void*)hContact))
+ if (Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszEMail, Clist_GetContactDisplayName(hContact), (void*)hContact))
return 1;
for (auto &it : lpwszStatuses)
@@ -90,7 +90,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(MCONTACT hContactChatSession,
MCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, nullptr);
wszUID = lpszUID;
if (hContactSender)
- gce.ptszNick = pcli->pfnGetContactDisplayName(hContactSender, 0);
+ gce.ptszNick = Clist_GetContactDisplayName(hContactSender);
else
gce.ptszNick = wszUID;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 819587e4e6..9d4cff4987 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -343,7 +343,7 @@ int CMraProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hCo
for (int i = 0; i < nContacts; i++) {
if (IsContactMra(hContactsList[i]))
if (mraGetStringW(hContactsList[i], "e-mail", wszEmail))
- wszData += wszEmail + ';' + pcli->pfnGetContactDisplayName(hContactsList[i], 0) + ';';
+ wszData += wszEmail + ';' + Clist_GetContactDisplayName(hContactsList[i]) + ';';
}
bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp
index 51d9078ff2..68b1e65b31 100644
--- a/protocols/MRA/src/MraSelectEMail.cpp
+++ b/protocols/MRA/src/MraSelectEMail.cpp
@@ -103,7 +103,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg, UINT message, WPARAM wParam
case MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD:
{
CMStringA szUrl;
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(dat->hContact, 0)), szEmail.c_str());
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", _T2A(Clist_GetContactDisplayName(dat->hContact)), szEmail.c_str());
dat->ppro->MraMPopSessionQueueAddUrl(dat->ppro->hMPopSessionQueue, szUrl);
}
break;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 6fc14f60e7..1549e50769 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -1102,7 +1102,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w
// reply to some user blog
if (dat->hContact) {
- szBuff.Format(TranslateT("Reply to %s blog status"), pcli->pfnGetContactDisplayName(dat->hContact, 0));
+ szBuff.Format(TranslateT("Reply to %s blog status"), Clist_GetContactDisplayName(dat->hContact));
SetWindowText(hWndDlg, szBuff.c_str());
}
else SetWindowText(hWndDlg, TranslateT("Set my blog status"));
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index c0fdb52406..572d64b0b8 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -130,7 +130,7 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM)
CMStringA szUrl, szEmail;
if (GetContactFirstEMail(wParam, FALSE, szEmail)) {
szEmail.MakeLower();
- szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", _T2A(pcli->pfnGetContactDisplayName(wParam, 0)), szEmail.c_str());
+ szUrl.Format("http://cards.mail.ru/event.html?rcptname=%S&rcptemail=%s", _T2A(Clist_GetContactDisplayName(wParam)), szEmail.c_str());
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index aa1048ddf4..0c057efd27 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -699,7 +699,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf)
if (dwTemp == ID_STATUS_OFFLINE) { // was/now invisible
CMStringW wszEmail, wszBuff;
mraGetStringW(hContact, "e-mail", wszEmail);
- wszBuff.Format(L"%s <%s> - %s", pcli->pfnGetContactDisplayName(hContact, 0), wszEmail.c_str(), TranslateT("invisible status changed"));
+ wszBuff.Format(L"%s <%s> - %s", Clist_GetContactDisplayName(hContact), wszEmail.c_str(), TranslateT("invisible status changed"));
MraPopupShowFromContactW(hContact, MRA_POPUP_TYPE_INFORMATION, wszBuff);
MraSetContactStatus(hContact, ID_STATUS_INVISIBLE);
@@ -1266,7 +1266,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS),
dwID, dwGroupID, dwContactFlag, dwContactSeverFlags, dwTemp, nullptr, &wszNick, &szCustomPhones);
if (wszNick.IsEmpty()) { // set the server-side nick
- wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ wszNick = Clist_GetContactDisplayName(hContact);
MraModifyContact(hContact, &dwID, &dwContactFlag, &dwGroupID, &szEmail, &wszNick, &szCustomPhones);
}
}
@@ -1317,7 +1317,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
SetExtraIcons(hContact);
MraSetContactStatus(hContact, ID_STATUS_ONLINE);
- CMStringW wszCustomName = pcli->pfnGetContactDisplayName(hContact, 0);
+ CMStringW wszCustomName = Clist_GetContactDisplayName(hContact);
MraAddContact(hContact, (CONTACT_FLAG_VISIBLE | CONTACT_FLAG_MULTICHAT), -1, email, wszCustomName);
}
else {
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 4e546b7e03..7f8405ebd0 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -202,7 +202,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam)
// always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
- wszNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ wszNick = Clist_GetContactDisplayName(hContact);
db_set_ws(hContact, "CList", "MyHandle", wszNick);
}
else if (cws->value.pszVal) {
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp
index ebe4b2982d..8e6984999d 100644
--- a/protocols/MSN/src/msn_std.cpp
+++ b/protocols/MSN/src/msn_std.cpp
@@ -46,7 +46,7 @@ void CMsnProto::setStringUtf(MCONTACT hContact, const char *name, const char *va
wchar_t* CMsnProto::GetContactNameT(MCONTACT hContact)
{
if (hContact)
- return (wchar_t*)pcli->pfnGetContactDisplayName(hContact, 0);
+ return (wchar_t*)Clist_GetContactDisplayName(hContact);
wchar_t *str = Contact_GetInfo(CNF_DISPLAY, NULL, m_szModuleName);
if (str != nullptr) {
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index f66a1fdddc..860a9f14ee 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -17,7 +17,6 @@ PLUGININFOEX pluginInfo =
};
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
HINSTANCE hInst;
LIST<CSametimeProto> g_Instances(1, PtrKeySortT);
int hLangpack;
@@ -250,7 +249,6 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
return 0;
}
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index 6016e9df27..fe4faa8861 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -44,7 +44,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
if (db_get_b(hContact, proto->m_szModuleName, "ChatRoom", 0) == 0
&& db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
lvI.lParam = (LPARAM)hContact;
- lvI.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
+ lvI.pszText = Clist_GetContactDisplayName(hContact);
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_LST_ANTO), &lvI);
lvI.iItem++;
}
diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp
index 1147810864..a10eaafb62 100644
--- a/protocols/SkypeWeb/src/skype_dialogs.cpp
+++ b/protocols/SkypeWeb/src/skype_dialogs.cpp
@@ -39,13 +39,11 @@ CSkypeInviteDlg::CSkypeInviteDlg(CSkypeProto *proto) :
void CSkypeInviteDlg::OnInitDialog()
{
- for (auto &hContact : m_proto->AccContacts()) {
- if (!m_proto->isChatRoom(hContact)) {
- wchar_t *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
- m_combo.AddString(ptszNick, hContact);
- }
- }
+ for (auto &hContact : m_proto->AccContacts())
+ if (!m_proto->isChatRoom(hContact))
+ m_combo.AddString(Clist_GetContactDisplayName(hContact), hContact);
}
+
void CSkypeInviteDlg::btnOk_OnOk(CCtrlButton*)
{
m_hContact = m_combo.GetItemData(m_combo.GetCurSel());
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index 9a19dfaa9a..c89b9954a1 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -199,11 +199,11 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &)
CMStringA service(FORMAT, "%s/IncomingCallCLE", GetContactProto(hContact));
cle.pszService = service.GetBuffer();
- CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), Clist_GetContactDisplayName(hContact));
cle.szTooltip.w = tooltip.GetBuffer();
pcli->pfnAddEvent(&cle);
- ShowNotification(pcli->pfnGetContactDisplayName(hContact, 0), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
+ ShowNotification(Clist_GetContactDisplayName(hContact), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL);
}
}
break;
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 303592e658..5985cb390f 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -157,12 +157,9 @@ CVkInviteChatForm::CVkInviteChatForm(CVkProto *proto) :
void CVkInviteChatForm::OnInitDialog()
{
- for (auto &hContact : m_proto->AccContacts()) {
- if (!m_proto->isChatRoom(hContact)) {
- wchar_t *pwszNick = pcli->pfnGetContactDisplayName(hContact, 0);
- m_cbxCombo.AddString(pwszNick, hContact);
- }
- }
+ for (auto &hContact : m_proto->AccContacts())
+ if (!m_proto->isChatRoom(hContact))
+ m_cbxCombo.AddString(Clist_GetContactDisplayName(hContact), hContact);
}
void CVkInviteChatForm::btnOk_OnOk(CCtrlButton*)
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index 62929752aa..d5cc58afae 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -55,7 +55,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
wchar_t str[256], format[128];
- wchar_t *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(dat->hContact);
char *szProto = GetContactProto(dat->hContact);
WORD dwStatus = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *status = Clist_GetStatusModeDescription(dwStatus, 0);
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp
index 872eb90f22..f9b1b2e174 100644
--- a/src/core/stdaway/src/main.cpp
+++ b/src/core/stdaway/src/main.cpp
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadAwayMsgModule(void);
-CLIST_INTERFACE* pcli;
HINSTANCE hInst;
int hLangpack;
@@ -56,7 +55,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
LoadAwayMsgModule();
return 0;
diff --git a/src/core/stdclist/src/contact.cpp b/src/core/stdclist/src/contact.cpp
index d03630e45b..e4fc490248 100644
--- a/src/core/stdclist/src/contact.cpp
+++ b/src/core/stdclist/src/contact.cpp
@@ -85,10 +85,10 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
return 2 * (statusa == ID_STATUS_OFFLINE) - 1;
}
- nameb = pcli->pfnGetContactDisplayName(a, 0);
+ nameb = Clist_GetContactDisplayName(a);
wcsncpy_s(namea, nameb, _TRUNCATE);
namea[ _countof(namea)-1 ] = 0;
- nameb = pcli->pfnGetContactDisplayName(b, 0);
+ nameb = Clist_GetContactDisplayName(b);
//otherwise just compare names
return mir_wstrcmpi(namea, nameb);
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;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 9706b8a49f..ed1e9e0f2f 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1020,7 +1020,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
wchar_t newtitle[256];
if (m_hContact && m_szProto) {
m_wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
- wchar_t *contactName = pcli->pfnGetContactDisplayName(m_hContact, 0);
+ wchar_t *contactName = Clist_GetContactDisplayName(m_hContact);
wchar_t *szStatus = Clist_GetStatusModeDescription(m_szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0);
if (g_dat.bUseStatusWinIcon)
@@ -1221,7 +1221,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
else {
if (m_nTypeSecs) {
wchar_t szBuf[256];
- wchar_t* szContactName = pcli->pfnGetContactDisplayName(m_hContact, 0);
+ wchar_t* szContactName = Clist_GetContactDisplayName(m_hContact);
HICON hTyping = Skin_LoadIcon(SKINICON_OTHER_TYPING);
mir_snwprintf(szBuf, TranslateT("%s is typing a message..."), szContactName);
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index 58d6ecf2a7..dac3fdb793 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -274,7 +274,7 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat)
else
szName = TranslateT("Me");
}
- else szName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ else szName = Clist_GetContactDisplayName(dat->hContact);
SetToStyle((dbei.flags & DBEF_SENT) ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME, buf);
AppendToBufferWithRTF(buf, szName);
@@ -295,7 +295,7 @@ static bool CreateRTFFromDbEvent(LogStreamData *dat)
}
else szName = L"";
}
- else szName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ else szName = Clist_GetContactDisplayName(dat->hContact);
SetToStyle(MSGFONTID_NOTICE, buf);
AppendToBufferWithRTF(buf, szName);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 60b5bbea0f..7c422a5d7b 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -92,7 +92,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
}
wchar_t toolTip[256];
- mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.hContact = hContact;
@@ -171,7 +171,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && g_dat.bShowTypingTray) {
wchar_t szTip[256];
- mir_snwprintf(szTip, TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTip, TranslateT("%s is typing a message"), Clist_GetContactDisplayName(hContact));
if (g_dat.bShowTypingClist) {
pcli->pfnRemoveEvent(hContact, 1);
@@ -275,7 +275,7 @@ static void RestoreUnreadMessageAlerts(void)
cle.szTooltip.w = toolTip;
for (auto &e : arEvents) {
- mir_snwprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(e->hContact, 0));
+ mir_snwprintf(toolTip, TranslateT("Message from %s"), Clist_GetContactDisplayName(e->hContact));
cle.hContact = e->hContact;
cle.hDbEvent = e->hEvent;
pcli->pfnAddEvent(&cle);
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index 0e33116897..bde2ab32f8 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -140,7 +140,7 @@ CTabbedWindow* CTabbedWindow::AddPage(MCONTACT hContact, wchar_t *pwszText, int
pDlg->m_bNoActivate = iNoActivate != 0;
if (g_Settings.bTabsEnable) {
- m_tab.AddPage(pcli->pfnGetContactDisplayName(hContact, 0), nullptr, pDlg);
+ m_tab.AddPage(Clist_GetContactDisplayName(hContact), nullptr, pDlg);
FixTabIcons(pDlg);
m_tab.ActivatePage(m_tab.GetCount() - 1);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp
index fafb7a8f64..ddddbf99da 100644
--- a/src/core/stduihist/src/history.cpp
+++ b/src/core/stduihist/src/history.cpp
@@ -207,7 +207,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Utils_RestoreWindowPosition(hwndDlg, hContact, "History", "");
{
wchar_t* contactName, str[200];
- contactName = pcli->pfnGetContactDisplayName(hContact, 0);
+ contactName = Clist_GetContactDisplayName(hContact);
mir_snwprintf(str, TranslateT("History for %s"), contactName);
SetWindowText(hwndDlg, str);
}
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp
index 9236e98444..a598b630cc 100644
--- a/src/core/stduihist/src/main.cpp
+++ b/src/core/stduihist/src/main.cpp
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadHistoryModule(void);
-CLIST_INTERFACE* pcli;
HINSTANCE hInst;
int hLangpack;
@@ -56,7 +55,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHIST
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
LoadHistoryModule();
return 0;
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp
index fc26f29ea7..7e7551ee97 100644
--- a/src/core/stduserinfo/src/main.cpp
+++ b/src/core/stduserinfo/src/main.cpp
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
int LoadUserInfoModule(void);
-CLIST_INTERFACE* pcli;
HINSTANCE hInst;
int hLangpack;
@@ -56,7 +55,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSER
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
LoadUserInfoModule();
return 0;
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index ffc1747447..aab4733403 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -249,7 +249,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (dat->hContact == NULL)
name = TranslateT("Owner");
else
- name = pcli->pfnGetContactDisplayName(dat->hContact, 0);
+ name = Clist_GetContactDisplayName(dat->hContact);
GetWindowText(hwndDlg, oldTitle, _countof(oldTitle));
mir_snwprintf(newTitle, oldTitle, name);
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index ab01edd77a..148eada919 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -53,7 +53,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
// only play the sound (or show event) if this event happens at least 10 secs after the proto went from offline
if (GetTickCount() - ticked > (1000*10)) {
wchar_t tooltip[256];
- mir_snwprintf(tooltip, TranslateT("%s is online"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(tooltip, TranslateT("%s is online"), Clist_GetContactDisplayName(hContact));
CLISTEVENT cle = {};
cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp
index 19e50419ec..2d834fca55 100644
--- a/src/mir_app/src/addcontact.cpp
+++ b/src/mir_app/src/addcontact.cpp
@@ -178,7 +178,7 @@ MIR_APP_DLL(void) Contact_Add(MCONTACT hContact, HWND hwndParent)
CAddByContact(MCONTACT hContact)
{
m_hContact = hContact;
- m_szName = cli.pfnGetContactDisplayName(hContact, 0);
+ m_szName = Clist_GetContactDisplayName(hContact);
m_szProto = GetContactProto(hContact);
}
};
@@ -209,7 +209,7 @@ MIR_APP_DLL(void) Contact_AddByEvent(MEVENT hEvent, HWND hwndParent)
m_hContact = dwData[1];
if (m_hContact != INVALID_CONTACT_ID)
- m_szName = cli.pfnGetContactDisplayName(m_hContact, 0);
+ m_szName = Clist_GetContactDisplayName(m_hContact);
m_szProto = dbei.szModule;
}
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index a3240c2ef3..efc9a6a1f4 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -184,7 +184,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa
pd.lchIcon = LoadIconEx("window", FALSE);
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
- mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, cli.pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact));
mir_wstrncpy(pd.lptzText, TranslateW(szBuf), _countof(pd.lptzText));
pd.iSeconds = g_Settings->iPopupTimeout;
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 5fe2cd43d2..b6b78e9157 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -546,7 +546,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
if (!Clist_FindItem(hwnd, dat, wParam, &contact, nullptr, nullptr))
break;
- mir_wstrncpy(contact->szText, cli.pfnGetContactDisplayName(wParam, 0), _countof(contact->szText));
+ mir_wstrncpy(contact->szText, Clist_GetContactDisplayName(wParam), _countof(contact->szText));
dat->bNeedsResort = true;
SortClcByTimer(hwnd);
break;
@@ -557,7 +557,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
contact->proto = GetContactProto(wParam);
cli.pfnInvalidateDisplayNameCacheEntry(wParam);
- mir_wstrncpy(contact->szText, cli.pfnGetContactDisplayName(wParam, 0), _countof(contact->szText));
+ mir_wstrncpy(contact->szText, Clist_GetContactDisplayName(wParam), _countof(contact->szText));
SortClcByTimer(hwnd);
break;
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index ccc145255f..29530ba84a 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -115,7 +115,6 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam);
void RebuildMenuOrder(void);
/* clistsettings.c */
-wchar_t* fnGetContactDisplayName(MCONTACT hContact, int mode);
void fnGetDefaultFontSetting(int i, LOGFONT *lf, COLORREF * colour);
void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index f0e5e596c4..cc521205d4 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -204,7 +204,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact
DWORD idleMode = szProto != nullptr ? db_get_dw(hContact, szProto, "IdleTS", 0) : 0;
if (idleMode)
cc->flags |= CONTACTF_IDLE;
- mir_wstrncpy(cc->szText, cli.pfnGetContactDisplayName(hContact, 0), _countof(cc->szText));
+ mir_wstrncpy(cc->szText, Clist_GetContactDisplayName(hContact), _countof(cc->szText));
return cc;
}
@@ -380,7 +380,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat)
group->totalMembers++;
if (dat->bFilterSearch && dat->szQuickSearch[0] != '\0') {
- wchar_t *name = cli.pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
wchar_t *lowered_name = CharLowerW(NEWWSTR_ALLOCA(name));
wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index cb5c5d863f..feb31fcf2b 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -436,7 +436,7 @@ void fnEndRename(HWND, ClcData *dat, int save)
}
else if (contact->type == CLCIT_CONTACT) {
cli.pfnInvalidateDisplayNameCacheEntry(contact->hContact);
- wchar_t* otherName = cli.pfnGetContactDisplayName(contact->hContact, GCDNF_NOMYHANDLE);
+ wchar_t* otherName = Clist_GetContactDisplayName(contact->hContact, GCDNF_NOMYHANDLE);
if (!text[0] || !mir_wstrcmp(otherName, text))
db_unset(contact->hContact, "CList", "MyHandle");
else
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index e10d24234a..5a58f6e157 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -130,7 +130,6 @@ void InitClistCore()
cli.pfnGetImlIconIndex = fnGetImlIconIndex;
cli.pfnRemoveEvent = fnRemoveEvent;
- cli.pfnGetContactDisplayName = fnGetContactDisplayName;
cli.pfnInvalidateDisplayNameCacheEntry = fnInvalidateDisplayNameCacheEntry;
cli.pfnCreateCacheItem = fnCreateCacheItem;
cli.pfnCheckCacheItem = fnCheckCacheItem;
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index 986813dcc3..105f06fd91 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -103,7 +103,7 @@ void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact)
}
}
-wchar_t* fnGetContactDisplayName(MCONTACT hContact, int mode)
+MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, int mode)
{
if (hContact == 0)
return TranslateT("(Unknown contact)");
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 326bca9740..77e539c784 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -127,7 +127,7 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP
wchar_t szFormat[256], szFinal[256];
GetDlgItemText(hWnd, IDC_TOPLINE, szFormat, _countof(szFormat));
- mir_snwprintf(szFinal, szFormat, cli.pfnGetContactDisplayName(lParam, 0));
+ mir_snwprintf(szFinal, szFormat, Clist_GetContactDisplayName(lParam));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
}
SetFocus(GetDlgItem(hWnd, IDNO));
diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp
index e0bc764e6e..4b000a1f75 100644
--- a/src/mir_app/src/db_events.cpp
+++ b/src/mir_app/src/db_events.cpp
@@ -140,10 +140,10 @@ static INT_PTR DbEventGetTextWorker(DBEVENTINFO *dbei, int codepage, int datatyp
if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
ptrW tszReason(dbei->getString(blob.get_reason()));
text.Format(TranslateT("Authorization request from %s%s: %s"),
- (tszNick == nullptr) ? cli.pfnGetContactDisplayName(blob.get_contact(), 0) : tszNick, nick.c_str(), tszReason);
+ (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick, nick.c_str(), tszReason);
}
else text.Format(TranslateT("You were added by %s%s"),
- (tszNick == nullptr) ? cli.pfnGetContactDisplayName(blob.get_contact(), 0) : tszNick, nick.c_str());
+ (tszNick == nullptr) ? Clist_GetContactDisplayName(blob.get_contact()) : tszNick, nick.c_str());
return (datatype == DBVT_WCHAR) ? (INT_PTR)mir_wstrdup(text) : (INT_PTR)mir_u2a(text);
}
diff --git a/src/mir_app/src/meta_addto.cpp b/src/mir_app/src/meta_addto.cpp
index fe31f4713d..d44043b808 100644
--- a/src/mir_app/src/meta_addto.cpp
+++ b/src/mir_app/src/meta_addto.cpp
@@ -50,7 +50,7 @@ static int FillList(HWND list, BOOL sort)
continue;
// get contact display name from clist
- wchar_t *swzContactDisplayName = cli.pfnGetContactDisplayName(hMetaUser, 0);
+ wchar_t *swzContactDisplayName = Clist_GetContactDisplayName(hMetaUser);
// don't insert huge strings that we have to compare with later
if (mir_wstrlen(swzContactDisplayName) > 1023)
swzContactDisplayName[1024] = 0;
@@ -173,7 +173,7 @@ void CMetaSelectDlg::OnInitDialog()
else
{
// get contact display name from clist
- wchar_t *ptszCDN = cli.pfnGetContactDisplayName(m_hContact, 0);
+ wchar_t *ptszCDN = Clist_GetContactDisplayName(m_hContact);
if (!ptszCDN)
ptszCDN = TranslateT("a contact");
diff --git a/src/mir_app/src/meta_edit.cpp b/src/mir_app/src/meta_edit.cpp
index bb233f4ef1..9ebf4e1843 100644
--- a/src/mir_app/src/meta_edit.cpp
+++ b/src/mir_app/src/meta_edit.cpp
@@ -52,7 +52,7 @@ static void FillContactList(HWND hList)
for (int i = 0; i < g_data.num_contacts; i++) {
LvItem.iItem = i;
- wchar_t *ptszCDN = cli.pfnGetContactDisplayName(g_data.hContact[i], 0);
+ wchar_t *ptszCDN = Clist_GetContactDisplayName(g_data.hContact[i]);
if (ptszCDN == nullptr)
ptszCDN = TranslateT("(Unknown contact)");
@@ -270,7 +270,7 @@ static INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wPara
case WMU_SETTITLE:
{
- wchar_t *ptszCDN = cli.pfnGetContactDisplayName(lParam, 0);
+ wchar_t *ptszCDN = Clist_GetContactDisplayName(lParam);
if (ptszCDN == nullptr)
ptszCDN = TranslateT("(Unknown contact)");
@@ -366,7 +366,7 @@ static INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wPara
if (g_data.hDefaultContact == g_data.hContact[sel]) {
if (g_data.num_contacts > 0) {
g_data.hDefaultContact = g_data.hContact[0];
- SetDlgItemText(hwndDlg, IDC_ED_DEFAULT, cli.pfnGetContactDisplayName(g_data.hDefaultContact, 0));
+ SetDlgItemText(hwndDlg, IDC_ED_DEFAULT, Clist_GetContactDisplayName(g_data.hDefaultContact));
}
else {
g_data.hDefaultContact = 0;
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 954202464d..c12622aa60 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -280,7 +280,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM)
Meta_GetSubNick(hMeta, i, tszNick);
ptszName = tszNick.GetBuffer();
}
- else ptszName = cli.pfnGetContactDisplayName(hContact, 0);
+ else ptszName = Clist_GetContactDisplayName(hContact);
HICON hIcon = ImageList_GetIcon(hCListImages, Clist_GetContactIcon(hContact), 0);
Menu_ModifyItem(hMenuContact[i], ptszName, hIcon, 0);
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp
index 90401e1e58..e95bb68385 100644
--- a/src/mir_app/src/meta_services.cpp
+++ b/src/mir_app/src/meta_services.cpp
@@ -606,7 +606,7 @@ static int Meta_SrmmIconClicked(WPARAM hMeta, LPARAM lParam)
CMStringW tszNick;
if (g_metaOptions.menu_contact_label == DNT_DID)
- tszNick = cli.pfnGetContactDisplayName(cc->pSubs[i], 0);
+ tszNick = Clist_GetContactDisplayName(cc->pSubs[i]);
else
Meta_GetSubNick(hMeta, i, tszNick);
tszNick.AppendFormat(L" [%s]", pa->tszAccountName);
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp
index 6fe1980936..86e841468e 100644
--- a/src/mir_app/src/meta_utils.cpp
+++ b/src/mir_app/src/meta_utils.cpp
@@ -125,7 +125,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default)
// write the display name
mir_snprintf(buffer, "CListName%d", ccDest->nSubs);
- db_set_ws(hMeta, META_PROTO, buffer, cli.pfnGetContactDisplayName(hSub, 0));
+ db_set_ws(hMeta, META_PROTO, buffer, Clist_GetContactDisplayName(hSub));
// Get the status
WORD status = db_get_w(hSub, szProto, "Status", ID_STATUS_OFFLINE);
@@ -439,7 +439,7 @@ int Meta_CopyContactNick(DBCachedContact *ccMeta, MCONTACT hContact)
}
}
else if (g_metaOptions.clist_contact_name == CNNT_DISPLAYNAME) {
- wchar_t *name = cli.pfnGetContactDisplayName(hContact, 0);
+ wchar_t *name = Clist_GetContactDisplayName(hContact);
if (name && mir_wstrcmp(name, TranslateT("(Unknown contact)")) != 0) {
db_set_ws(ccMeta->contactID, META_PROTO, "Nick", name);
return 0;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 0ea6489984..ce81e5405c 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -554,3 +554,4 @@ Clist_TrayIconIconsChanged @573
Clist_TrayIconDestroy @574
Clist_TrayIconAdd @575
Clist_TraySetTimer @576
+Clist_GetContactDisplayName @577
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 6a43423a98..a46b4aa1e0 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -554,3 +554,4 @@ Clist_TrayIconIconsChanged @573
Clist_TrayIconDestroy @574
Clist_TrayIconAdd @575
Clist_TraySetTimer @576
+Clist_GetContactDisplayName @577
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp
index c97dd7133f..2f5022a17d 100644
--- a/src/mir_app/src/path.cpp
+++ b/src/mir_app/src/path.cpp
@@ -57,10 +57,10 @@ static __forceinline char *mir_a2x(const char*, const char *s) { return mir_strd
static __forceinline char *GetContactNickX(const char*, MCONTACT hContact)
{
- return mir_u2a(cli.pfnGetContactDisplayName(hContact, 0));
+ return mir_u2a(Clist_GetContactDisplayName(hContact));
}
-static __forceinline char *GetContactIDX(const char*, MCONTACT hContact)
+static __forceinline char* GetContactIDX(const char*, MCONTACT hContact)
{
wchar_t *id = GetContactID(hContact);
char* res = mir_u2a(id);
@@ -68,7 +68,7 @@ static __forceinline char *GetContactIDX(const char*, MCONTACT hContact)
return res;
}
-static __forceinline char *GetEnvironmentVariableX(const char *variable)
+static __forceinline char* GetEnvironmentVariableX(const char *variable)
{
char result[512];
if (GetEnvironmentVariableA(variable, result, _countof(result)))
@@ -76,12 +76,12 @@ static __forceinline char *GetEnvironmentVariableX(const char *variable)
return nullptr;
}
-static __forceinline char *GetProfileDirX(const char*)
+static __forceinline char* GetProfileDirX(const char*)
{
return mir_u2a(g_profileDir);
}
-static __forceinline char *SHGetSpecialFolderPathX(int iCSIDL, char*)
+static __forceinline char* SHGetSpecialFolderPathX(int iCSIDL, char*)
{
char result[512];
if (SHGetSpecialFolderPathA(nullptr, result, iCSIDL, FALSE))
@@ -89,7 +89,7 @@ static __forceinline char *SHGetSpecialFolderPathX(int iCSIDL, char*)
return nullptr;
}
-static __forceinline char *GetModulePathX(const char*, HMODULE hModule)
+static __forceinline char* GetModulePathX(const char*, HMODULE hModule)
{
char result[MAX_PATH];
GetModuleFileNameA(hModule, result, sizeof(result));
@@ -98,7 +98,7 @@ static __forceinline char *GetModulePathX(const char*, HMODULE hModule)
return mir_strdup(result);
}
-static __forceinline char *GetUserNameX(const char*)
+static __forceinline char* GetUserNameX(const char*)
{
char result[128];
DWORD size = _countof(result);
@@ -107,7 +107,7 @@ static __forceinline char *GetUserNameX(const char*)
return nullptr;
}
-static __forceinline char *GetProfileNameX(const char*)
+static __forceinline char* GetProfileNameX(const char*)
{
return mir_u2a(g_shortProfileName);
}
@@ -144,7 +144,7 @@ static __forceinline wchar_t* mir_a2x(const wchar_t *, const char *s) { return m
static __forceinline wchar_t* GetContactNickX(const wchar_t*, MCONTACT hContact)
{
- return mir_wstrdup(cli.pfnGetContactDisplayName(hContact, 0));
+ return mir_wstrdup(Clist_GetContactDisplayName(hContact));
}
static __forceinline wchar_t* GetContactIDX(const wchar_t*, MCONTACT hContact)