diff options
-rw-r--r-- | plugins/AVS/src/options.cpp | 3 | ||||
-rw-r--r-- | plugins/CurrencyRates/src/CurrencyRateInfoDlg.cpp | 3 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/userinfo.cpp | 4 | ||||
-rw-r--r-- | plugins/Weather/src/weather_userinfo.cpp | 19 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/dialogs.cpp | 3 | ||||
-rw-r--r-- | protocols/IRCG/src/userinfo.cpp | 3 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_userinfo.cpp | 5 | ||||
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 3 |
8 files changed, 16 insertions, 27 deletions
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index ca5243209a..93383b7773 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -1094,12 +1094,11 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP return FALSE; } -int OnDetailsInit(WPARAM wParam, LPARAM lParam) +int OnDetailsInit(WPARAM wParam, LPARAM hContact) { OPTIONSDIALOGPAGE odp = {}; odp.szTitle.a = LPGEN("Avatar"); - MCONTACT hContact = lParam; if (hContact == NULL) { // User dialog odp.pfnDlgProc = DlgProcAvatarProtoInfo; diff --git a/plugins/CurrencyRates/src/CurrencyRateInfoDlg.cpp b/plugins/CurrencyRates/src/CurrencyRateInfoDlg.cpp index c523acbe9d..8ad8e1cd7c 100644 --- a/plugins/CurrencyRates/src/CurrencyRateInfoDlg.cpp +++ b/plugins/CurrencyRates/src/CurrencyRateInfoDlg.cpp @@ -96,9 +96,8 @@ INT_PTR CALLBACK CurrencyRateInfoDlgProc(HWND hdlg, UINT msg, WPARAM wParam, LPA return CurrencyRateInfoDlgProcImpl(g_hContact, hdlg, msg, wParam, lParam); } -int CurrencyRatesEventFunc_OnUserInfoInit(WPARAM wp, LPARAM lp) +int CurrencyRatesEventFunc_OnUserInfoInit(WPARAM wp, LPARAM hContact) { - MCONTACT hContact = MCONTACT(lp); if (NULL == hContact) return 0; diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index 0d117d1f99..b9691bfa4e 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -63,11 +63,9 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar return 0;
}
-int UserinfoInit(WPARAM wparam, LPARAM lparam)
+int UserinfoInit(WPARAM wparam, LPARAM hContact)
{
- MCONTACT hContact = (MCONTACT)lparam;
char *szProto = GetContactProto(hContact);
-
if (IsWatchedProtocol(szProto) && !db_get_b(hContact, szProto, "ChatRoom", false)) {
OPTIONSDIALOGPAGE uip = { sizeof(uip) };
uip.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index f2dd115684..76c13c1d24 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -309,26 +309,23 @@ static INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPA //
// initialize user info
// lParam = current contact
-int UserInfoInit(WPARAM wParam, LPARAM lParam)
+int UserInfoInit(WPARAM wParam, LPARAM hContact)
{
OPTIONSDIALOGPAGE odp = {};
odp.position = 100000000;
odp.szTitle.a = MODULENAME;
- if (lParam == 0) {
+ if (hContact == 0) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO);
odp.pfnDlgProc = DlgProcINIPage;
g_plugin.addUserInfo(wParam, &odp);
}
- else {
- // check if it is a weather contact
- if (IsMyContact(lParam)) {
- // register the contact info page
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
- odp.pfnDlgProc = DlgProcUIPage;
- odp.flags = ODPF_BOLDGROUPS;
- g_plugin.addUserInfo(wParam, &odp);
- }
+ else if (IsMyContact(hContact)) { // check if it is a weather contact
+ // register the contact info page
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
+ odp.pfnDlgProc = DlgProcUIPage;
+ odp.flags = ODPF_BOLDGROUPS;
+ g_plugin.addUserInfo(wParam, &odp);
}
return 0;
}
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 2c622e2551..4302ba3cbd 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -725,9 +725,8 @@ int GaduProto::options_init(WPARAM wParam, LPARAM) //////////////////////////////////////////////////////////////////////////////// // Info Page : Init // -int GaduProto::details_init(WPARAM wParam, LPARAM lParam) +int GaduProto::details_init(WPARAM wParam, LPARAM hContact) { - MCONTACT hContact = lParam; char* pszTemplate; if (hContact == NULL) { diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index 9a4a9be689..7af720f62c 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -186,9 +186,8 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM return FALSE;
}
-int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
+int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM hContact)
{
- MCONTACT hContact = lParam;
char *szProto = GetContactProto(hContact);
if (!hContact || !szProto || mir_strcmpi(szProto, m_szModuleName))
return 0;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 7f8e6cdfa9..deff426e52 100755 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -807,15 +807,14 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP ///////////////////////////////////////////////////////////////////////////////////////// // OnInfoInit - initializes user info option dialogs -int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) +int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact) { if (!Proto_GetAccount(m_szModuleName)) return 0; - MCONTACT hContact = lParam; if (hContact == 0) { // Show our vcard - OnUserInfoInit_VCard(wParam, lParam); + OnUserInfoInit_VCard(wParam, hContact); return 0; } diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 3e3bfdfade..082c6c9019 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -344,12 +344,11 @@ void CToxProto::OnConnectionStatusChanged(Tox *tox, uint32_t friendNumber, TOX_C }
}
-int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
+int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
{
if (!Proto_IsProtocolLoaded(m_szModuleName))
return 0;
- MCONTACT hContact = lParam;
char *szProto = GetContactProto(hContact);
if (szProto != nullptr && !mir_strcmp(szProto, m_szModuleName)) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
|