summaryrefslogtreecommitdiff
path: root/src/mir_app
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 /src/mir_app
parent89547af5b067b00cae18c44e356044c1e75361cb (diff)
fixes #4128 completely
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/clcitems.cpp2
-rw-r--r--src/mir_app/src/menu_groups.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 78402b8aa4..b8626f0625 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -72,6 +72,7 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t fl
group = cc->group;
group->bExpanded = (flags & GROUPF_EXPANDED) != 0;
group->bHideOffline = (flags & GROUPF_HIDEOFFLINE) != 0;
+ group->bShowOffline = (flags & GROUPF_SHOWOFFLINE) != 0;
group->groupId = groupId;
}
else group = cc->group;
@@ -101,6 +102,7 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t fl
else {
group->bExpanded = (flags & GROUPF_EXPANDED) != 0;
group->bHideOffline = (flags & GROUPF_HIDEOFFLINE) != 0;
+ group->bShowOffline = (flags & GROUPF_SHOWOFFLINE) != 0;
}
group->groupId = pNextField ? 0 : groupId;
group->totalMembers = 0;
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp
index 8d0339032f..d28c26a4f0 100644
--- a/src/mir_app/src/menu_groups.cpp
+++ b/src/mir_app/src/menu_groups.cpp
@@ -188,13 +188,14 @@ static int OnBuildGroupMenu(WPARAM wParam, LPARAM)
Menu_SetChecked(hmiHideEmptyGroups, (dwStyle & CLS_HIDEEMPTYGROUPS) != 0);
Menu_SetChecked(hmiDisableGroups, (dwStyle & CLS_USEGROUPS) == 0);
- Menu_ShowItem(hmiRenameGroup, wParam != 0);
- Menu_ShowItem(hmiDeleteGroup, wParam != 0);
- Menu_ShowItem(hmiCreateSubgroup, wParam != 0);
- Menu_ShowItem(hmiHideOfflineUsersInHere, wParam != 0);
- Menu_ShowItem(hmiHideOfflineUsersOutHere, wParam == 0);
-
ClcGroup *group = (ClcGroup *)wParam;
+
+ Menu_ShowItem(hmiRenameGroup, group != 0);
+ Menu_ShowItem(hmiDeleteGroup, group != 0);
+ Menu_ShowItem(hmiCreateSubgroup, group != 0);
+ Menu_ShowItem(hmiHideOfflineUsersInHere, group && !group->bShowOffline);
+ Menu_ShowItem(hmiHideOfflineUsersOutHere, group == 0);
+
if (group != nullptr) // contact->group
Menu_SetChecked(hmiHideOfflineUsersInHere, group->bHideOffline != 0);
return 0;