summaryrefslogtreecommitdiff
path: root/indra/newview/llgrouplist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgrouplist.cpp')
-rw-r--r--indra/newview/llgrouplist.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 12092a02c6..38b2f4adc8 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<LLButton>("profile_btn");
mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); });
+ mNoticesBtn = getChild<LLButton>("notices_btn");
+ mNoticesBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onNoticesBtnClick(); });
+
mVisibilityHideBtn = findChild<LLButton>("visibility_hide_btn");
if (mVisibilityHideBtn)
{
@@ -470,13 +475,17 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
mInfoBtn->setVisible(true);
mProfileBtn->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);
}
}
}
@@ -489,6 +498,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 +593,11 @@ void LLGroupListItem::onProfileBtnClick()
LLGroupActions::show(mGroupID);
}
+void LLGroupListItem::onNoticesBtnClick()
+{
+ LLGroupActions::show(mGroupID, true);
+}
+
void LLGroupListItem::onVisibilityBtnClick(bool new_visibility)
{
LLGroupData agent_gdatap;