diff options
-rw-r--r-- | src/core/stdmsg/src/commonheaders.h | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 12 | ||||
-rw-r--r-- | src/core/stdmsg/src/srmm.cpp | 2 |
5 files changed, 13 insertions, 10 deletions
diff --git a/src/core/stdmsg/src/commonheaders.h b/src/core/stdmsg/src/commonheaders.h index 83e20872e2..ac219783a4 100644 --- a/src/core/stdmsg/src/commonheaders.h +++ b/src/core/stdmsg/src/commonheaders.h @@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_langpack.h>
#include <m_button.h>
#include <m_clist.h>
+#include <m_clistint.h>
#include <m_clc.h>
#include <m_clui.h>
#include <m_options.h>
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ccaf3a77a8..35b5cf8925 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1124,7 +1124,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP int statusIcon = db_get_b(NULL, SRMMMOD, SRMSGSET_STATUSICON, SRMSGDEFSET_STATUSICON);
dat->wStatus = db_get_w(dat->hContact, dat->szProto, "Status", ID_STATUS_OFFLINE);
- contactName = ( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) dat->hContact, GCDNF_TCHAR);
+ contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
if (strcmp(dat->szProto, "MetaContacts")) {
CONTACTINFO ci = {0};
@@ -1440,7 +1440,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP else {
if (dat->nTypeSecs) {
TCHAR szBuf[256];
- TCHAR* szContactName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) dat->hContact, GCDNF_TCHAR);
+ TCHAR* szContactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
HICON hTyping = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
mir_sntprintf(szBuf, SIZEOF(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 f8250adf8f..f2c82f8a9f 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -367,7 +367,7 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h szName = ci.pszVal;
}
}
- else szName = ( TCHAR* ) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR);
+ else szName = pcli->pfnGetContactDisplayName(hContact, 0);
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, " %s ", SetToStyle(dbei.flags & DBEF_SENT ? MSGFONTID_MYNAME : MSGFONTID_YOURNAME));
AppendToBufferWithRTF(&buffer, &bufferEnd, &bufferAlloced, szName);
@@ -408,7 +408,7 @@ static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HANDLE hContact, HANDLE h szName = ci.pszVal;
}
}
- else szName = ( TCHAR* )CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR);
+ else szName = pcli->pfnGetContactDisplayName(hContact, 0);
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, " %s ", SetToStyle(MSGFONTID_NOTICE));
AppendToBufferWithRTF(&buffer, &bufferEnd, &bufferAlloced, szName);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index f595ce0164..2bf3de6fba 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -95,7 +95,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) cle.flags = CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- contactName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR);
+ contactName = pcli->pfnGetContactDisplayName((HANDLE)wParam, 0);
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM) & cle);
@@ -165,7 +165,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags & SMF_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
+ mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((HANDLE)wParam, 0));
if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags&SMF_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) };
@@ -260,7 +260,7 @@ static void RestoreUnreadMessageAlerts(void) else {
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_TCHAR));
+ mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM) & cle);
}
}
@@ -277,7 +277,7 @@ static int FontsChanged(WPARAM wParam,LPARAM lParam) return 0;
}
-static int SplitmsgModulesLoaded(WPARAM wParam, LPARAM lParam)
+static int SplitmsgModulesLoaded(WPARAM, LPARAM)
{
RegisterSRMMFonts();
LoadMsgLogIcons();
@@ -296,14 +296,14 @@ static int SplitmsgModulesLoaded(WPARAM wParam, LPARAM lParam) return 0;
}
-int PreshutdownSendRecv(WPARAM wParam, LPARAM lParam)
+int PreshutdownSendRecv(WPARAM, LPARAM)
{
WindowList_BroadcastAsync(g_dat.hMessageWindowList, WM_CLOSE, 0, 0);
DeinitStatusIcons();
return 0;
}
-static int IconsChanged(WPARAM wParam, LPARAM lParam)
+static int IconsChanged(WPARAM, LPARAM)
{
FreeMsgLogIcons();
LoadMsgLogIcons();
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index 11159d77b1..f589529137 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int LoadSendRecvMessageModule(void);
int SplitmsgShutdown(void);
+CLIST_INTERFACE *pcli;
HINSTANCE g_hInst;
int hLangpack;
@@ -59,6 +60,7 @@ extern "C" int __declspec(dllexport) Load(void) {
mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
+ mir_getCLI();
return LoadSendRecvMessageModule();
}
|