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:
Inusaito Sayori
2014-12-16 19:42:27 -05:00
parent 0e48a2196f
commit cc32df6fd8
17 changed files with 173 additions and 338 deletions

View File

@@ -21,6 +21,7 @@
#include "llagent.h"
#include "llviewerregion.h"
#include "llmutelist.h"
#include "hippogridmanager.h"
LFSimFeatureHandler::LFSimFeatureHandler()
@@ -33,6 +34,7 @@ LFSimFeatureHandler::LFSimFeatureHandler()
{
if (!gHippoGridManager->getCurrentGrid()->isSecondLife()) // Remove this line if we ever handle SecondLife sim features
gAgent.addRegionChangedCallback(boost::bind(&LFSimFeatureHandler::handleRegionChange, this));
LLMuteList::instance().mGodLastNames.insert("Linden");
}
ExportPolicy LFSimFeatureHandler::exportPolicy() const
@@ -108,5 +110,33 @@ void LFSimFeatureHandler::setSupportedFeatures()
mShoutRange.reset();
mWhisperRange.reset();
}
LLMuteList& mute_list(LLMuteList::instance());
mute_list.mGodLastNames.clear();
mute_list.mGodFullNames.clear();
if (info.has("god_names"))
{
const LLSD& god_names(info["god_names"]);
if (god_names.has("last_names"))
{
const LLSD& last_names(god_names["last_names"]);
for (LLSD::array_const_iterator it = last_names.beginArray(); it != last_names.endArray(); ++it)
mute_list.mGodLastNames.insert((*it).asString());
}
if (god_names.has("full_names"))
{
const LLSD& full_names(god_names["full_names"]);
for (LLSD::array_const_iterator it = full_names.beginArray(); it != full_names.endArray(); ++it)
mute_list.mGodFullNames.insert((*it).asString());
}
}
else
{
mute_list.mGodLastNames.insert("Linden");
}
}
}