From 624c9066d85c4da900cf440ca6066f86ef0b044d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 19 Apr 2018 18:19:47 +0300 Subject: EV_PROTO_ONOPTIONS removed and replaced with the call of CallObjectEventHook(pa->ppro, ME_OPT_INITIALIZE) this eliminates the possibility of making a mistake in hand-written code also fixes #1280 (Tox: "Confugure" menu item is broken) --- protocols/Discord/src/proto.cpp | 3 --- protocols/FacebookRM/src/proto.cpp | 3 --- protocols/Gadu-Gadu/src/gg_proto.cpp | 3 --- protocols/IRCG/src/ircproto.cpp | 1 - protocols/IcqOscarJ/src/icq_proto.cpp | 3 --- protocols/JabberG/src/jabber_proto.cpp | 1 - protocols/MRA/src/MraProto.cpp | 1 - protocols/MSN/src/msn_proto.cpp | 3 --- protocols/Twitter/src/proto.cpp | 4 ++-- protocols/VKontakte/src/vk_proto.cpp | 3 --- 10 files changed, 2 insertions(+), 23 deletions(-) (limited to 'protocols') diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index f15f31bb1b..8c0aaa1abd 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -601,9 +601,6 @@ int CDiscordProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONEXIT: return OnPreShutdown(wParam, lParam); - case EV_PROTO_ONOPTIONS: - return OnOptionsInit(wParam, lParam); - case EV_PROTO_ONCONTACTDELETED: return OnDeleteContact((MCONTACT)wParam); } diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 61b3d8de79..64cea2b2e4 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -396,9 +396,6 @@ int FacebookProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONEXIT: return OnPreShutdown(wParam, lParam); - case EV_PROTO_ONOPTIONS: - return OnOptionsInit(wParam, lParam); - case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 7e086f9060..d5f822ca0b 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -729,9 +729,6 @@ int GaduProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) sessions_closedlg(); break; - case EV_PROTO_ONOPTIONS: - return options_init(wParam, lParam); - case EV_PROTO_ONMENU: menus_init(); break; diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index fe7bb55831..aedd341e74 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -817,7 +817,6 @@ int __cdecl CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l switch (eventType) { case EV_PROTO_ONLOAD: return OnModulesLoaded(0, 0); case EV_PROTO_ONEXIT: return OnPreShutdown(0, 0); - case EV_PROTO_ONOPTIONS: return OnInitOptionsPages(wParam, lParam); case EV_PROTO_ONMENU: InitMainMenus(); diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index ba2ca46ae5..e10146939f 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -1819,9 +1819,6 @@ int __cdecl CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONEXIT: return OnPreShutdown(0, 0); - case EV_PROTO_ONOPTIONS: - return OnOptionsInit(wParam, lParam); - case EV_PROTO_ONERASE: { char szDbSetting[MAX_PATH]; diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index c3fc9162df..55519f1627 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -1331,7 +1331,6 @@ int __cdecl CJabberProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARA switch (eventType) { case EV_PROTO_ONLOAD: return OnModulesLoadedEx(0, 0); case EV_PROTO_ONEXIT: return OnPreShutdown(0, 0); - case EV_PROTO_ONOPTIONS: return OnOptionsInit(wParam, lParam); case EV_PROTO_ONMENU: MenuInit(); diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index dc6b540008..9940b0365e 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -559,7 +559,6 @@ int CMraProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) switch (eventType) { case EV_PROTO_ONLOAD: return OnModulesLoaded(0, 0); case EV_PROTO_ONEXIT: return OnShutdown(0, 0); - case EV_PROTO_ONOPTIONS: return OnOptionsInit(wParam, lParam); case EV_PROTO_ONMENU: CListCreateMenu(2000060000, 500085000, TRUE, gdiMenuItems, MAIN_MENU_ITEMS_COUNT, hMainMenuItems); diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index c5e4678e97..94d2486d7e 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -964,9 +964,6 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONEXIT: return OnPreShutdown(0, 0); - case EV_PROTO_ONOPTIONS: - return OnOptionsInit(wParam, lParam); - case EV_PROTO_ONMENU: MsnInitMainMenu(); break; diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index b57cf5d452..966d749c86 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -180,8 +180,8 @@ int TwitterProto::SetStatus(int new_status) int TwitterProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) { switch (event) { - case EV_PROTO_ONLOAD: return OnModulesLoaded(wParam, lParam); - case EV_PROTO_ONOPTIONS: return OnOptionsInit(wParam, lParam); + case EV_PROTO_ONLOAD: + return OnModulesLoaded(wParam, lParam); } return 1; diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index cdb207555a..867329bdec 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -534,9 +534,6 @@ int CVkProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONEXIT: return OnPreShutdown(wParam, lParam); - case EV_PROTO_ONOPTIONS: - return OnOptionsInit(wParam, lParam); - case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); } -- cgit v1.2.3