diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-21 19:30:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-21 19:30:47 +0300 |
commit | 4a13d085551a16c2d0464ae7e0709b7cd583c164 (patch) | |
tree | 0708f769437df75fe9187b347af47e62ea05d842 | |
parent | 382079ff3bb4b59381234355226fc84f09a46168 (diff) |
tabSRMM: fix for dbl click on group chats + minor code cleaning
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index abec648c45..0eafde8a99 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2294,10 +2294,7 @@ int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd) CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact, bool bActivate)
{
- wchar_t szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
-
- bool bAllowAutoCreate = false;
+ bool bAllowAutoCreate = false, bForceCreate = g_plugin.bAutoPopup || bActivate;
uint32_t dwStatusMask = M.GetDword("autopopupmask", -1);
if (dwStatusMask == -1)
@@ -2314,11 +2311,14 @@ CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact }
}
- if (bAllowAutoCreate && (g_plugin.bAutoPopup || g_plugin.bAutoTabs)) {
+ if (bAllowAutoCreate && (bForceCreate || g_plugin.bAutoTabs)) {
+ wchar_t szName[CONTAINER_NAMELEN + 1];
+ GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
+
if (pContainer == nullptr)
pContainer = FindContainerByName(szName);
- if (g_plugin.bAutoPopup) {
+ if (bForceCreate) {
if (pContainer == nullptr)
pContainer = CreateContainer(szName, 0, hContact);
return CreateNewTabForContact(pContainer, hContact, true, true);
|