summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimview.cpp5
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp57
-rw-r--r--indra/newview/llpanelgroupgeneral.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml12
4 files changed, 75 insertions, 0 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 609536f92d..cfd2535930 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -267,6 +267,11 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
}
else if(session->isGroupSessionType())
{
+ if (LLMuteList::getInstance()->isMuted(LLUUID::null, std::string{"Group:" + session_id.asString()}))
+ {
+ gIMMgr->leaveSession(session_id);
+ return;
+ }
user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM")))
{
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index ca429ae2f8..0c331b4cec 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -34,6 +34,7 @@
#include "llsdparam.h"
#include "lluictrlfactory.h"
#include "roles_constants.h"
+#include "llmutelist.h"
// UI elements
#include "llbutton.h"
@@ -76,6 +77,7 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
mCtrlEnrollmentFee(NULL),
mSpinEnrollmentFee(NULL),
mCtrlReceiveNotices(NULL),
+ mCtrlReceiveGroupChat(NULL), // <exodus/>
mCtrlListGroup(NULL),
mActiveTitleLabel(NULL),
mComboActiveTitle(NULL)
@@ -154,6 +156,18 @@ bool LLPanelGroupGeneral::postBuild()
mCtrlReceiveNotices->set(accept_notices);
mCtrlReceiveNotices->setEnabled(data.mID.notNull());
}
+ // <exodus>
+ mCtrlReceiveGroupChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse);
+ if(mCtrlReceiveGroupChat)
+ {
+ mCtrlReceiveGroupChat->setCommitCallback(onCommitUserOnly, this);
+ mCtrlReceiveGroupChat->setEnabled(data.mID.notNull());
+ if(data.mID.notNull())
+ {
+ mCtrlReceiveGroupChat->set(!LLMuteList::getInstance()->isMuted(LLUUID::null, std::string{"Group:" + data.mID.asString()}));
+ }
+ }
+ // </exodus>
mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
if (mCtrlListGroup)
@@ -389,6 +403,19 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
list_in_profile = mCtrlListGroup->get();
gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile);
+ // <exodus>
+ if(mCtrlReceiveGroupChat)
+ {
+ if(mCtrlReceiveGroupChat->get())
+ {
+ LLMuteList::getInstance()->remove(LLMute(LLUUID::null, std::string{"Group:" + mGroupID.asString()}));
+ }
+ else
+ {
+ LLMuteList::getInstance()->add(LLMute(LLUUID::null, std::string{"Group:" + mGroupID.asString()}));
+ }
+ }
+ // </exodus>
resetDirty();
@@ -556,6 +583,16 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
}
+ // <exodus>
+ if (mCtrlReceiveGroupChat)
+ {
+ mCtrlReceiveGroupChat->setVisible(is_member);
+ if (is_member)
+ {
+ mCtrlReceiveGroupChat->setEnabled(mAllowEdit);
+ }
+ }
+ // </exodus>
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
@@ -598,6 +635,7 @@ void LLPanelGroupGeneral::updateChanged()
mCtrlEnrollmentFee,
mSpinEnrollmentFee,
mCtrlReceiveNotices,
+ mCtrlReceiveGroupChat, // <exodus/>
mCtrlListGroup,
mActiveTitleLabel,
mComboActiveTitle
@@ -653,6 +691,12 @@ void LLPanelGroupGeneral::reset()
mInsignia->setImageAssetName(mInsignia->getDefaultImageName());
+ // <exodus>
+ mCtrlReceiveGroupChat->set(false);
+ mCtrlReceiveGroupChat->setEnabled(false);
+ mCtrlReceiveGroupChat->setVisible(true);
+ // </exodus>
+
{
std::string empty_str = "";
mEditCharter->setText(empty_str);
@@ -684,6 +728,7 @@ void LLPanelGroupGeneral::resetDirty()
mCtrlEnrollmentFee,
mSpinEnrollmentFee,
mCtrlReceiveNotices,
+ mCtrlReceiveGroupChat, // <exodus/>
mCtrlListGroup,
mActiveTitleLabel,
mComboActiveTitle
@@ -730,6 +775,18 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
mCtrlListGroup->setEnabled(data.mID.notNull());
}
+ // <exodus>
+ mCtrlReceiveGroupChat = getChild<LLCheckBoxCtrl>("receive_chat");
+ if (mCtrlReceiveGroupChat)
+ {
+ if(data.mID.notNull())
+ {
+ mCtrlReceiveGroupChat->set(!LLMuteList::getInstance()->isMuted(LLUUID::null, std::string{"Group:" + data.mID.asString()}));
+ }
+ mCtrlReceiveGroupChat->setEnabled(data.mID.notNull());
+ }
+ // </exodus>
+
mCtrlShowInGroupList->setEnabled(data.mID.notNull());
mActiveTitleLabel = getChild<LLTextBox>("active_title_label");
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index e5d766dc40..37db2e96a0 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -98,6 +98,7 @@ private:
LLTextBox *mActiveTitleLabel;
LLComboBox *mComboActiveTitle;
LLComboBox *mComboMature;
+ LLCheckBoxCtrl *mCtrlReceiveGroupChat; // <exodus/>
};
#endif
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 7290cbb5c6..aac4037bb3 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -145,6 +145,18 @@ Hover your mouse over the options for more help.
tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."
top_pad="5"
width="300" />
+ <!-- <exodus> -->
+ <check_box
+ height="16"
+ font="SansSerifSmall"
+ label="Receive group instant messages"
+ layout="topleft"
+ left="10"
+ name="receive_chat"
+ tool_tip="Sets whether you want to participate in group chat for this group."
+ top_pad="5"
+ width="300" />
+ <!-- </exodus> -->
<check_box
height="16"
label="Show in my profile"