Update and Sync Mutelist with upstream alchemy
Satisfies the feature request for mute toggle to display mute status Adds dynamic mute/unmute option to P2P IM dropdown. Translators should look into the changes made in this commit for: floater_chat_history.xml, floater_instant_message.xml, floater_instant_message_concisebuttons.xml panel_avatar.xml has been taken care of for spanish and french, although they should be looked into more closely by the translators. Cleanup and Sync in related places~ Removal of old static callbacks. Moves God Names logic into LFSimFeatureHandler Adds a custom function LLMuteList::hasMute() for quickly checking if a mute is in the internal set.
This commit is contained in:
@@ -102,7 +102,11 @@ void LLPanelAvatarTab::setAvatarID(const LLUUID& avatar_id)
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this);
|
||||
mAvatarID = avatar_id;
|
||||
if (mAvatarID.notNull())
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(mAvatarID, this);
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Mute"))
|
||||
ctrl->setValue(LLMuteList::instance().isMuted(mAvatarID));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -130,11 +134,13 @@ LLPanelAvatarSecondLife::LLPanelAvatarSecondLife(const std::string& name,
|
||||
: LLPanelAvatarTab(name, rect, panel_avatar),
|
||||
mPartnerID()
|
||||
{
|
||||
LLMuteList::instance().addObserver(this);
|
||||
}
|
||||
|
||||
LLPanelAvatarSecondLife::~LLPanelAvatarSecondLife()
|
||||
{
|
||||
mCacheConnection.disconnect();
|
||||
LLMuteList::instance().removeObserver(this);
|
||||
}
|
||||
|
||||
void LLPanelAvatarSecondLife::refresh()
|
||||
@@ -278,6 +284,12 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelAvatarSecondLife::onChangeDetailed(const LLMute& mute)
|
||||
{
|
||||
if (mute.mID != mAvatarID) return;
|
||||
getChild<LLUICtrl>("Mute")->setValue(LLMuteList::instance().hasMute(mute));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// enableControls()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user