diff options
author | George Hazan <george.hazan@gmail.com> | 2024-11-01 14:34:28 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-11-01 14:34:28 +0300 |
commit | d6c0257fa35c82768c50e215cd688d9d9122a6e3 (patch) | |
tree | 1ec8a9013c3443129d2716d9d89908692e6731bd | |
parent | a44d40439f02ff71a054a84c01ec3052a644d73a (diff) |
more for #4600 - an option to apply tab creation rules for private chats to group chats
-rw-r--r-- | plugins/TabSRMM/src/chat_options.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_tools.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/srmm.cpp | 1 |
4 files changed, 11 insertions, 1 deletions
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<CMPlugin> CMOption<bool> bCloseSend, bShowDesc, bMetaTab, bMetaBar, bErrorPopup;
// chat settings
- CMOption<bool> bOpenInDefault, bCreateWindowOnHighlight, bBBCodeInPopups;
+ CMOption<bool> bOpenInDefault, bCreateWindowOnHighlight, bApplyPrivateSettings, bBBCodeInPopups;
CMOption<bool> bLogClassicIndicators, bAlternativeSorting;
CMOption<bool> bLogSymbols, bClassicIndicators, bClickableNicks, bColorizeNicks, bColorizeNicksInLog;
CMOption<bool> 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),
|