From 76350d50ef7043a171292d6ec7574ed863af4067 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 26 Jan 2019 15:06:23 +0300 Subject: code cleaning --- plugins/Weather/src/weather_userinfo.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'plugins/Weather') 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; } -- cgit v1.2.3