diff options
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat/clist.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/modplus.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendlater.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/typingnotify.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 23 |
17 files changed, 45 insertions, 47 deletions
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp index dbcbb27ee8..628a7372ab 100644 --- a/plugins/TabSRMM/src/chat/clist.cpp +++ b/plugins/TabSRMM/src/chat/clist.cpp @@ -105,7 +105,7 @@ HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* p BOOL CList_SetOffline(HANDLE hContact, BOOL bHide)
{
if (hContact) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if (szProto == NULL)
return FALSE;
@@ -124,7 +124,7 @@ BOOL CList_SetAllOffline(BOOL bHide, const char *pszModule) hContact = db_find_first();
while (hContact) {
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (MM_FindModule(szProto)) {
if (!pszModule || (pszModule && !strcmp(pszModule, szProto))) {
int i = M->GetByte(hContact, szProto, "ChatRoom", 0);
@@ -151,7 +151,7 @@ int CList_RoomDoubleclicked(WPARAM wParam, LPARAM lParam) if (!hContact)
return 0;
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (MM_FindModule(szProto)) {
if (M->GetByte(hContact, szProto, "ChatRoom", 0) == 0)
return 0;
@@ -196,7 +196,7 @@ INT_PTR CList_JoinChat(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if ( szProto ) {
if ( DBGetContactSettingWord( hContact, szProto, "Status", 0 ) == ID_STATUS_OFFLINE )
CallProtoService( szProto, PS_JOINCHAT, wParam, lParam );
@@ -211,7 +211,7 @@ INT_PTR CList_LeaveChat(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, wParam, lParam );
}
@@ -222,7 +222,7 @@ int CList_PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
CLISTMENUITEM clmi = {0};
clmi.cbSize = sizeof(CLISTMENUITEM);
@@ -308,7 +308,7 @@ HANDLE CList_FindRoom(const char* pszModule, const TCHAR* pszRoom) {
HANDLE hContact = db_find_first();
while (hContact) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if (szProto && !lstrcmpiA(szProto, pszModule)) {
if (M->GetByte(hContact, szProto, "ChatRoom", 0) != 0) {
DBVARIANT dbv;
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 52664447a3..5690e08154 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -464,7 +464,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT }
else lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname));
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) newData.hContact, 0);
+ char *szProto = GetContactProto(newData.hContact);
WORD wStatus = szProto == NULL ? ID_STATUS_OFFLINE : DBGetContactSettingWord((HANDLE) newData.hContact, szProto, "Status", ID_STATUS_OFFLINE);
char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, szProto == NULL ? ID_STATUS_OFFLINE : DBGetContactSettingWord((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index bcf331f15c..6d85d6244a 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1962,7 +1962,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar si = psi;
dat->si = psi;
dat->hContact = psi->hContact;
- dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)psi->hContact, 0);
+ dat->szProto = GetContactProto(psi->hContact);
dat->bType = SESSIONTYPE_CHAT;
dat->Panel = new CInfoPanel(dat);
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 3c8dead289..046ed7377e 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -51,7 +51,7 @@ CContactCache::CContactCache(const HANDLE hContact) m_nMax = 0;
if (hContact) {
- m_szProto = reinterpret_cast<char *>(::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)m_hContact, 0));
+ m_szProto = ::GetContactProto(m_hContact);
if (m_szProto)
m_tszProto = mir_a2t(m_szProto);
initPhaseTwo();
@@ -171,7 +171,7 @@ void CContactCache::updateMeta(bool fForce) HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)m_hContact, 0);
if (hSubContact && (hSubContact != m_hSubContact || fForce)) {
m_hSubContact = hSubContact;
- m_szMetaProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)m_hSubContact, 0);
+ m_szMetaProto = GetContactProto(m_hSubContact);
if (m_szMetaProto) {
PROTOACCOUNT *acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)m_szMetaProto));
if (acc && acc->tszAccountName)
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index eb3b58c457..952607d419 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1026,7 +1026,7 @@ panel_found: if (dat && dat->bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = (SESSION_INFO *)dat->si;
if (si && dat->hContact) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
+ char* szProto = GetContactProto(dat->hContact);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, (WPARAM)dat->hContact, 0 );
}
@@ -1106,7 +1106,7 @@ panel_found: if (contactOK) {
char szFinalService[512];
- mir_snprintf(szFinalService, 512, "%s/%s", (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0), item->szService);
+ mir_snprintf(szFinalService, 512, "%s/%s", GetContactProto(hContact), item->szService);
if (ServiceExists(szFinalService))
CallService(szFinalService, wwParam, llParam);
else
@@ -1122,7 +1122,7 @@ panel_found: if (item->dwFlags & BUTTON_ISCONTACTDBACTION || item->dwFlags & BUTTON_DBACTIONONCONTACT) {
contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact);
if (contactOK && item->dwFlags & BUTTON_ISCONTACTDBACTION)
- szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szModule = GetContactProto(hContact);
finalhContact = hContact;
}
else
@@ -2606,7 +2606,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) { iNumProtos = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)dat->hContact, 0);
iDefaultProtoByNum = (int)CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)dat->hContact, 0);
hContactMostOnline = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->hContact, 0);
- szProtoMostOnline = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContactMostOnline, 0);
+ szProtoMostOnline = GetContactProto(hContactMostOnline);
isForced = M->GetDword(dat->hContact, "tabSRMM_forced", -1);
for (i=0; i < iNumProtos; i++) {
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 2b04d1813c..bffd4951a7 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1053,7 +1053,7 @@ void TSAPI DM_SetDBButtonStates(HWND hwndChild, struct TWindowData *dat) continue;
}
if (buttonItem->dwFlags & BUTTON_ISCONTACTDBACTION)
- szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szModule = GetContactProto(hContact);
hFinalContact = hContact;
} else
hFinalContact = 0;
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index e49b85c21d..9381dc7356 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -666,7 +666,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
CLISTMENUITEM clmi = {0};
clmi.cbSize = sizeof(CLISTMENUITEM);
@@ -812,13 +812,12 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) if (dwStatusMask == -1)
bAllowAutoCreate = TRUE;
else {
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)wParam, 0);
+ char *szProto = GetContactProto((HANDLE)wParam);
DWORD dwStatus = 0;
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
HANDLE hSubconttact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
-
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hSubconttact, 0);
+ szProto = GetContactProto(hSubconttact);
}
if (szProto) {
dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp index 3e9865f5f5..ea4f8389fe 100644 --- a/plugins/TabSRMM/src/modplus.cpp +++ b/plugins/TabSRMM/src/modplus.cpp @@ -59,7 +59,7 @@ static char* getMirVer(HANDLE hContact) char *msg = NULL;
DBVARIANT dbv = {0};
- szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if ( !szProto )
return (NULL);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index f53bf2ebbf..f574c34378 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -103,7 +103,7 @@ static BOOL IsStringValidLinkA(char* pszText) BOOL TSAPI IsUtfSendAvailable(HANDLE hContact)
{
- char* szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if (szProto == NULL)
return FALSE;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index b8e9cb202b..918fb3afde 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -413,7 +413,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) if (dat && dat->bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = (SESSION_INFO *)dat->si;
if ( (si != NULL) && (dat->hContact != NULL)) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
+ char* szProto = GetContactProto(dat->hContact);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, (WPARAM)dat->hContact, 0 );
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index cd022728a0..6e92fc517e 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -302,7 +302,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) }
/* does the HCONTACT's protocol support IM messages? */
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ szProto = GetContactProto((HANDLE)wParam);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 0;
@@ -361,7 +361,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) }
/* does the HCONTACT's protocol support IM messages? */
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ szProto = GetContactProto((HANDLE)wParam);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 0;
@@ -703,7 +703,7 @@ HWND TSAPI CreateNewTabForContact(struct TContainerData *pContainer, HANDLE hCon newData.hContact = hContact;
newData.isWchar = isSend;
newData.szInitialText = pszInitialText;
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) newData.hContact, 0);
+ szProto = GetContactProto(newData.hContact);
ZeroMemory((void*)&newData.item, sizeof(newData.item));
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 804107d9c8..632db61eab 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -535,7 +535,7 @@ HANDLE CSendLater::processAck(const ACKDATA *ack) dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
- dbei.szModule = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)((*it)->hContact), 0);
+ dbei.szModule = GetContactProto(((*it)->hContact));
dbei.timestamp = time(NULL);
dbei.cbBlob = lstrlenA((*it)->sendBuffer) + 1;
dbei.flags |= DBEF_UTF;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index d6b70ffc10..98b36e2d06 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -54,7 +54,7 @@ static char *pss_msgw = "/SendMsgW"; char *SendQueue::MsgServiceName(const HANDLE hContact = 0, const TWindowData *dat = 0, int dwFlags = 0)
{
char szServiceName[100];
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
return pss_msg;
@@ -208,7 +208,7 @@ static void DoSplitSendW(LPVOID param) HANDLE hContact = job->hOwner;
DWORD dwFlags = job->dwFlags;
int chunkSize = job->chunkSize / 2;
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL)
svcName = pss_msg;
@@ -808,7 +808,7 @@ inform_and_discard: dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT;
- dbei.szModule = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) m_jobs[iFound].hOwner, 0);
+ dbei.szModule = GetContactProto(m_jobs[iFound].hOwner);
dbei.timestamp = time(NULL);
dbei.cbBlob = lstrlenA(m_jobs[iFound].sendBuffer) + 1;
@@ -906,7 +906,7 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HANDLE hContact, boo dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.szModule = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
+ dbei.szModule = GetContactProto(dat->hContact);
dbei.timestamp = time(NULL);
dbei.cbBlob = lstrlenA(utfText) + 1;
dbei.pBlob = (PBYTE) utfText;
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 6d40f928e1..24880019a5 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -164,10 +164,10 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_EXLIMITTEXT, 0, 0x80000000);
dat->hContact = db_find_first();
- dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0);
+ dat->szProto = GetContactProto(dat->hContact);
while(dat->szProto == 0 && dat->hContact != 0) {
dat->hContact = db_find_next(dat->hContact);
- dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0);
+ dat->szProto = GetContactProto(dat->hContact);
}
dat->dwFlags = dat->pContainer->theme.dwFlags;
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 848765070f..a653564415 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -252,7 +252,7 @@ void TSAPI AddContactToFavorites(HANDLE hContact, const TCHAR *szNickname, const }
if (szProto == NULL)
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto) {
if (wStatus == 0)
wStatus = DBGetContactSettingWord((HANDLE)hContact, szProto, "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index adfdbfee5c..52633e3304 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -289,7 +289,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break;
while (hContact) {
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto != NULL)
break;
hContact = db_find_next(hContact);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index b23380910f..164191d833 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -74,23 +74,22 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG: {
DWORD sCodePage;
int i;
- DWORD maxhist = M->GetDword((HANDLE)lParam, "maxhist", 0);
- BYTE bIEView = M->GetByte((HANDLE)lParam, "ieview", 0);
- BYTE bHPP = M->GetByte((HANDLE)lParam, "hpplog", 0);
- int iLocalFormat = M->GetDword((HANDLE)lParam, "sendformat", 0);
- BYTE bRTL = M->GetByte((HANDLE)lParam, "RTL", 0);
- BYTE bLTR = M->GetByte((HANDLE)lParam, "RTL", 1);
- BYTE bSplit = M->GetByte((HANDLE)lParam, "splitoverride", 0);
- BYTE bInfoPanel = M->GetByte((HANDLE)lParam, "infopanel", 0);
- BYTE bAvatarVisible = M->GetByte((HANDLE)lParam, "hideavatar", -1);
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)lParam, 0);
+ hContact = (HANDLE)lParam;
+ DWORD maxhist = M->GetDword(hContact, "maxhist", 0);
+ BYTE bIEView = M->GetByte(hContact, "ieview", 0);
+ BYTE bHPP = M->GetByte(hContact, "hpplog", 0);
+ int iLocalFormat = M->GetDword(hContact, "sendformat", 0);
+ BYTE bRTL = M->GetByte(hContact, "RTL", 0);
+ BYTE bLTR = M->GetByte(hContact, "RTL", 1);
+ BYTE bSplit = M->GetByte(hContact, "splitoverride", 0);
+ BYTE bInfoPanel = M->GetByte(hContact, "infopanel", 0);
+ BYTE bAvatarVisible = M->GetByte(hContact, "hideavatar", -1);
+ char *szProto = GetContactProto(hContact);
int def_log_index = 1, hpp_log_index = 1, ieview_log_index = 1;
have_ieview = ServiceExists(MS_IEVIEW_WINDOW);
have_hpp = ServiceExists("History++/ExtGrid/NewWindow");
- hContact = (HANDLE)lParam;
-
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
|