From d6c0257fa35c82768c50e215cd688d9d9122a6e3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 1 Nov 2024 14:34:28 +0300 Subject: more for #4600 - an option to apply tab creation rules for private chats to group chats --- plugins/TabSRMM/src/chat_options.cpp | 1 + plugins/TabSRMM/src/chat_tools.cpp | 8 ++++++++ plugins/TabSRMM/src/msgs.h | 2 +- plugins/TabSRMM/src/srmm.cpp | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index 01018d63b3..86c1516d29 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -506,6 +506,7 @@ public: treeCheck.AddOption(pwszSection, LPGENW("Flash window when someone speaks"), Chat::bFlashWindow); treeCheck.AddOption(pwszSection, LPGENW("Flash window when a word is highlighted"), Chat::bFlashWindowHighlight); treeCheck.AddOption(pwszSection, LPGENW("Create tabs or windows for highlight events"), g_plugin.bCreateWindowOnHighlight); + treeCheck.AddOption(pwszSection, LPGENW("Apply tab creation rules to group chats too"), g_plugin.bApplyPrivateSettings); treeCheck.AddOption(pwszSection, LPGENW("Show list of users in the chat room"), Chat::bShowNicklist); treeCheck.AddOption(pwszSection, LPGENW("Colorize nicknames in member list (you need to adjust colors)"), g_plugin.bColorizeNicks); treeCheck.AddOption(pwszSection, LPGENW("Show topic as status message on the contact list"), Chat::bTopicOnClist); diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 2a818f4c47..3f8f64d774 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -345,6 +345,14 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight if (bMustFlash && bInactive) AddUnreadContact(dat->m_hContact); } + else if (g_plugin.bApplyPrivateSettings) { + // we never raise up any channels unless they are unmuted + if (Contact::IsReadonly(si->hContact) && iMuteMode != CHATMODE_UNMUTE) + return true; + + AutoCreateWindow(nullptr, si->hContact); + } + return true; } diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index d336e290cb..87f700e74e 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -1037,7 +1037,7 @@ struct CMPlugin : public PLUGIN CMOption bCloseSend, bShowDesc, bMetaTab, bMetaBar, bErrorPopup; // chat settings - CMOption bOpenInDefault, bCreateWindowOnHighlight, bBBCodeInPopups; + CMOption bOpenInDefault, bCreateWindowOnHighlight, bApplyPrivateSettings, bBBCodeInPopups; CMOption bLogClassicIndicators, bAlternativeSorting; CMOption bLogSymbols, bClassicIndicators, bClickableNicks, bColorizeNicks, bColorizeNicksInLog; CMOption bScaleIcons, bNewLineAfterNames; diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index 1657af8321..b8e84de620 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -85,6 +85,7 @@ CMPlugin::CMPlugin() : // chat settings bOpenInDefault(CHAT_MODULE, "DefaultContainer", true), bCreateWindowOnHighlight(CHAT_MODULE, "CreateWindowOnHighlight", false), + bApplyPrivateSettings(CHAT_MODULE, "ApplyPrivateSettings", false), bBBCodeInPopups(CHAT_MODULE, "BBCodeInPopups", false), bClassicIndicators(CHAT_MODULE, "ClassicIndicators", false), bLogClassicIndicators(CHAT_MODULE, "LogClassicIndicators", false), -- cgit v1.2.3