From 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Nov 2018 20:12:53 +0300 Subject: end of ME_OPT_INITIALISE related zoo in another plugins --- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 3 ++- plugins/BuddyExpectator/src/options.cpp | 18 +++++++----------- plugins/BuddyExpectator/src/options.h | 2 -- plugins/BuddyExpectator/src/stdafx.h | 3 +++ 4 files changed, 12 insertions(+), 14 deletions(-) (limited to 'plugins/BuddyExpectator/src') diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 68421a0d0b..3d4d799d6d 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -647,7 +647,8 @@ int onShutdown(WPARAM, LPARAM) int CMPlugin::Load() { - InitOptions(); + LoadOptions(); + HookEvent(ME_OPT_INITIALISE, OptionsInit); CreateServiceFunction("BuddyExpectator/actionReturned", ContactReturnedAction); CreateServiceFunction("BuddyExpectator/actionStillAbsent", ContactStillAbsentAction); diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index 536b6100e7..01b36144dc 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -426,10 +426,10 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP return 0; } -/** - * Init options panel - */ -static int OptionsInit(WPARAM wParam, LPARAM) +///////////////////////////////////////////////////////////////////////////////////////// +// Init options + +int OptionsInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = {}; odp.szGroup.w = LPGENW("Contacts"); @@ -449,6 +449,9 @@ static int OptionsInit(WPARAM wParam, LPARAM) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// +// UserInfo initalization + INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) { @@ -535,10 +538,3 @@ int UserinfoInit(WPARAM wparam, LPARAM lparam) } return 0; } - - -void InitOptions() -{ - LoadOptions(); - HookEvent(ME_OPT_INITIALISE, OptionsInit); -} diff --git a/plugins/BuddyExpectator/src/options.h b/plugins/BuddyExpectator/src/options.h index 3b6f0a9c32..e53ed061a2 100644 --- a/plugins/BuddyExpectator/src/options.h +++ b/plugins/BuddyExpectator/src/options.h @@ -52,6 +52,4 @@ typedef struct { extern Options options; -void InitOptions(); - #endif diff --git a/plugins/BuddyExpectator/src/stdafx.h b/plugins/BuddyExpectator/src/stdafx.h index 3e3ed107e1..798492ec0c 100644 --- a/plugins/BuddyExpectator/src/stdafx.h +++ b/plugins/BuddyExpectator/src/stdafx.h @@ -60,4 +60,7 @@ extern HANDLE hExtraIcon; void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); extern DWORD timer_id; +void LoadOptions(); +int OptionsInit(WPARAM wParam, LPARAM); + #endif -- cgit v1.2.3