From 3a1a68b6d509071389da7fdb28010126d1102ebe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jun 2022 12:43:04 +0300 Subject: fixes #3082 (NewEventNotify: rename "Disable notification for group chats" to "Enable notification for group chats") --- plugins/NewEventNotify/src/main.cpp | 8 +++++++- plugins/NewEventNotify/src/options.cpp | 6 +----- plugins/NewEventNotify/src/stdafx.h | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/NewEventNotify') diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 051177106e..60692ec06b 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -47,7 +47,8 @@ PLUGININFOEX pluginInfoEx = CMPlugin::CMPlugin() : PLUGIN(MODULENAME, pluginInfoEx), - bPopups(MODULENAME, "Popups", true) + bPopups(MODULENAME, "Popups", true), + bMucPopups(MODULENAME, "MucPopups", true) {} ///////////////////////////////////////////////////////////////////////////////////////// @@ -126,6 +127,11 @@ int CMPlugin::Load() delSetting(OPT_DISABLE); } + if (getBool(OPT_MUCDISABLE, false)) { + bMucPopups = false; + delSetting(OPT_MUCDISABLE); + } + HookEvent(ME_SYSTEM_MODULESLOADED, HookedInit); HookEvent(ME_OPT_INITIALISE, OptionsAdd); diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index c9f5354ea3..47d1d5d64a 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -26,8 +26,6 @@ void CMPlugin::OptionsRead(void) { - bMUCDisable = getBool(OPT_MUCDISABLE, false); - bPreview = getBool(OPT_PREVIEW, true); bMergePopup = getBool(OPT_MERGEPOPUP, true); bMsgWindowCheck = getBool(OPT_MSGWINDOWCHECK, true); @@ -72,8 +70,6 @@ void CMPlugin::OptionsRead(void) void CMPlugin::OptionsWrite(void) { - setByte(OPT_MUCDISABLE, bMUCDisable); - setByte(OPT_PREVIEW, bPreview); setByte(OPT_MERGEPOPUP, bMergePopup); setByte(OPT_MSGWINDOWCHECK, bMsgWindowCheck); @@ -208,7 +204,7 @@ public: auto *pwszSection = TranslateT("General options"); m_opts.AddOption(pwszSection, TranslateT("Show preview of event in popup"), g_plugin.bPreview); m_opts.AddOption(pwszSection, TranslateT("Enable event notifications for instant messages"), g_plugin.bPopups); - m_opts.AddOption(pwszSection, TranslateT("Disable event notifications for group chats"), g_plugin.bMUCDisable); + m_opts.AddOption(pwszSection, TranslateT("Enable event notifications for group chats"), g_plugin.bMucPopups); pwszSection = TranslateT("Notify me of..."); m_opts.AddOption(pwszSection, TranslateT("Message"), g_plugin.maskNotify, MASK_MESSAGE); diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h index a83ef4c160..66f3e00283 100644 --- a/plugins/NewEventNotify/src/stdafx.h +++ b/plugins/NewEventNotify/src/stdafx.h @@ -148,9 +148,8 @@ struct CMPlugin : public PLUGIN void OptionsRead(void); void OptionsWrite(void); - CMOption bPopups; + CMOption bPopups, bMucPopups; - bool bMUCDisable; bool bPreview; bool bDisableNonMessage; bool bMsgWindowCheck; -- cgit v1.2.3