diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-26 15:06:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-26 15:06:23 +0300 |
commit | 76350d50ef7043a171292d6ec7574ed863af4067 (patch) | |
tree | 97d563f4f0ec945e068eef1183c2c7c83aafdf39 /plugins | |
parent | 2e2483f97aac9b7b3d6819f434377c093d96e764 (diff) |
code cleaning
Diffstat (limited to 'plugins')
-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 |
4 files changed, 11 insertions, 18 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;
}
|