summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-01 17:19:08 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-01 17:19:08 +0300
commit9dddfef7c8a3b41cfc3584462af7d5c67f024756 (patch)
treea4ccb066c63f9ee332df6812e573d9672ed8f552 /plugins
parent89547af5b067b00cae18c44e356044c1e75361cb (diff)
fixes #4128 completely
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/groupmenu.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_clist.h2
4 files changed, 3 insertions, 8 deletions
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp
index 4c166d0fa2..1c0842eaf4 100644
--- a/plugins/Clist_modern/src/groupmenu.cpp
+++ b/plugins/Clist_modern/src/groupmenu.cpp
@@ -39,7 +39,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
if (wParam == 0 || MirandaExiting())
showOfflineinGroup = gray = false;
else {
- showOfflineinGroup = CLCItems_IsShowOfflineGroup(group);
+ showOfflineinGroup = group->bShowOffline;
gray = !group->bHideOffline;
}
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 835de2c645..b57b583774 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -326,7 +326,7 @@ static LRESULT clcOnCommand(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM
if (hit != -1 && contact->type == CLCIT_GROUP) {
switch (LOWORD(wParam)) {
case POPUP_GROUPSHOWOFFLINE:
- Clist_GroupSetFlags(contact->groupId, MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE));
+ Clist_GroupSetFlags(contact->groupId, MAKELPARAM(contact->group->bShowOffline ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE));
Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index f61ec8e2b2..35ac94c13e 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -180,10 +180,7 @@ bool CLCItems_IsShowOfflineGroup(ClcGroup *group)
{
if (!group) return false;
if (group->bHideOffline) return false;
-
- uint32_t groupFlags = 0;
- Clist_GroupGetName(group->groupId, &groupFlags);
- return (groupFlags & GROUPF_SHOWOFFLINE) != 0;
+ return group->bShowOffline;
}
MCONTACT SaveSelection(ClcData *dat)
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h
index 2adf362135..e67208047c 100644
--- a/plugins/Clist_modern/src/modern_clist.h
+++ b/plugins/Clist_modern/src/modern_clist.h
@@ -140,6 +140,4 @@ struct ClcCacheEntry : public ClcCacheEntryBase
#define CLVM_MODULE "CLVM"
#endif
-#define GROUPF_SHOWOFFLINE 0x40
-
#endif