From 683e96ed61692d26b3eba2b08fe9978de998cb41 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 9 Oct 2023 12:35:53 +0300 Subject: SL-20380 Add group notices button as hover button on Groups floater --- indra/newview/llgrouplist.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llgrouplist.cpp') diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 32af2592d3..d137440547 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -303,6 +303,7 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL item->getChildView("info_btn")->setVisible( false); item->getChildView("profile_btn")->setVisible( false); + item->getChildView("notices_btn")->setVisible(false); item->setGroupIconVisible(mShowIcons); if (!mShowIcons) { @@ -403,6 +404,7 @@ mGroupIcon(NULL), mGroupNameBox(NULL), mInfoBtn(NULL), mProfileBtn(NULL), +mNoticesBtn(NULL), mVisibilityHideBtn(NULL), mVisibilityShowBtn(NULL), mGroupID(LLUUID::null), @@ -435,6 +437,9 @@ BOOL LLGroupListItem::postBuild() mProfileBtn = getChild("profile_btn"); mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); }); + mNoticesBtn = getChild("notices_btn"); + mNoticesBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onNoticesBtnClick(); }); + mVisibilityHideBtn = findChild("visibility_hide_btn"); if (mVisibilityHideBtn) { @@ -470,6 +475,7 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) { mInfoBtn->setVisible(true); mProfileBtn->setVisible(true); + mNoticesBtn->setVisible(true); if (mForAgent && mVisibilityHideBtn) { LLGroupData agent_gdatap; @@ -489,6 +495,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) getChildView("hovered_icon")->setVisible( false); mInfoBtn->setVisible(false); mProfileBtn->setVisible(false); + mNoticesBtn->setVisible(false); if (mVisibilityHideBtn) { mVisibilityHideBtn->setVisible(false); @@ -583,6 +590,11 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } +void LLGroupListItem::onNoticesBtnClick() +{ + LLGroupActions::show(mGroupID, true); +} + void LLGroupListItem::onVisibilityBtnClick(bool new_visibility) { LLGroupData agent_gdatap; -- cgit v1.2.3 From ece46db4b234960b1510c5dcd6d3da5088f8c6f2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 20 Oct 2023 13:44:55 +0300 Subject: SL-20380 show group notice button only if user is a member of the group (#465) --- indra/newview/llgrouplist.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/llgrouplist.cpp') diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index d137440547..14310536b2 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -475,14 +475,17 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) { mInfoBtn->setVisible(true); mProfileBtn->setVisible(true); - mNoticesBtn->setVisible(true); - if (mForAgent && mVisibilityHideBtn) + if (mForAgent) { LLGroupData agent_gdatap; if (gAgent.getGroupData(mGroupID, agent_gdatap)) { - mVisibilityHideBtn->setVisible(agent_gdatap.mListInProfile); - mVisibilityShowBtn->setVisible(!agent_gdatap.mListInProfile); + if (mVisibilityHideBtn) + { + mVisibilityHideBtn->setVisible(agent_gdatap.mListInProfile); + mVisibilityShowBtn->setVisible(!agent_gdatap.mListInProfile); + } + mNoticesBtn->setVisible(true); } } } -- cgit v1.2.3