Ignore group chat, from Imprudence
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldbstrings.h"
|
||||
#include "llimview.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llnamebox.h"
|
||||
#include "llnamelistctrl.h"
|
||||
@@ -91,6 +92,7 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name,
|
||||
mCtrlEnrollmentFee(NULL),
|
||||
mSpinEnrollmentFee(NULL),
|
||||
mCtrlReceiveNotices(NULL),
|
||||
mCtrlReceiveChat(NULL),
|
||||
mCtrlListGroup(NULL),
|
||||
mActiveTitleLabel(NULL),
|
||||
mComboActiveTitle(NULL)
|
||||
@@ -219,6 +221,15 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mCtrlReceiveNotices->set(accept_notices);
|
||||
mCtrlReceiveNotices->setEnabled(data.mID.notNull());
|
||||
}
|
||||
|
||||
mCtrlReceiveChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse);
|
||||
if (mCtrlReceiveChat)
|
||||
{
|
||||
mCtrlReceiveChat->setCommitCallback(onCommitUserOnly);
|
||||
mCtrlReceiveChat->setCallbackUserData(this);
|
||||
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
|
||||
mCtrlReceiveChat->setEnabled(mGroupID.notNull());
|
||||
}
|
||||
|
||||
mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
|
||||
if (mCtrlListGroup)
|
||||
@@ -544,6 +555,14 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
|
||||
|
||||
gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile);
|
||||
|
||||
if (mCtrlReceiveChat)
|
||||
{
|
||||
bool receive_chat = mCtrlReceiveChat->get();
|
||||
gIMMgr->updateIgnoreGroup(mGroupID, !receive_chat);
|
||||
// Save here too in case we crash somewhere down the road -- MC
|
||||
gIMMgr->saveIgnoreGroup();
|
||||
}
|
||||
|
||||
mChanged = FALSE;
|
||||
|
||||
return true;
|
||||
@@ -760,6 +779,13 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
|
||||
mCtrlReceiveNotices->resetDirty();
|
||||
}
|
||||
|
||||
if (mCtrlReceiveChat)
|
||||
{
|
||||
mCtrlReceiveChat->setVisible(is_member);
|
||||
mCtrlReceiveChat->setEnabled(TRUE);
|
||||
mCtrlReceiveChat->resetDirty();
|
||||
}
|
||||
|
||||
|
||||
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
|
||||
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
|
||||
@@ -914,6 +940,7 @@ void LLPanelGroupGeneral::updateChanged()
|
||||
mCtrlEnrollmentFee,
|
||||
mSpinEnrollmentFee,
|
||||
mCtrlReceiveNotices,
|
||||
mCtrlReceiveChat,
|
||||
mCtrlListGroup,
|
||||
mActiveTitleLabel,
|
||||
mComboActiveTitle
|
||||
|
||||
Reference in New Issue
Block a user