summaryrefslogtreecommitdiff
path: root/indra/newview/llmutelist.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-03-19 14:22:40 -0700
committerRichard Nelson <none@none>2010-03-19 14:22:40 -0700
commit8992f058e077a78d091c864619d9d740dc305094 (patch)
tree7d77fbc4451a4eb8b211292a44b8003cb51fdf01 /indra/newview/llmutelist.cpp
parentfd096e5011c8d777f54c7fe473b12e6730dbedc0 (diff)
parentf50be64167c254e27f635ad47d8940551f0c6ab4 (diff)
merge
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r--indra/newview/llmutelist.cpp52
1 files changed, 5 insertions, 47 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 2d3c4b187e..95094f6b52 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -128,68 +128,26 @@ LLMute::LLMute(const LLUUID& id, const std::string& name, EType type, U32 flags)
}
-std::string LLMute::getDisplayName() const
+std::string LLMute::getDisplayType() const
{
- std::string name_with_suffix = mName;
switch (mType)
{
case BY_NAME:
default:
- name_with_suffix += " " + LLTrans::getString("MuteByName");
+ return LLTrans::getString("MuteByName");
break;
case AGENT:
- name_with_suffix += " " + LLTrans::getString("MuteAgent");
+ return LLTrans::getString("MuteAgent");
break;
case OBJECT:
- name_with_suffix += " " + LLTrans::getString("MuteObject");
+ return LLTrans::getString("MuteObject");
break;
case GROUP:
- name_with_suffix += " " + LLTrans::getString("MuteGroup");
+ return LLTrans::getString("MuteGroup");
break;
}
- return name_with_suffix;
}
-void LLMute::setFromDisplayName(const std::string& display_name)
-{
- size_t pos = 0;
- mName = display_name;
-
- pos = mName.rfind(" " + LLTrans::getString("MuteGroup"));
- if (pos != std::string::npos)
- {
- mName.erase(pos);
- mType = GROUP;
- return;
- }
-
- pos = mName.rfind(" " + LLTrans::getString("MuteObject"));
- if (pos != std::string::npos)
- {
- mName.erase(pos);
- mType = OBJECT;
- return;
- }
-
- pos = mName.rfind(" " + LLTrans::getString("MuteAgent"));
- if (pos != std::string::npos)
- {
- mName.erase(pos);
- mType = AGENT;
- return;
- }
-
- pos = mName.rfind(" " + LLTrans::getString("MuteByName"));
- if (pos != std::string::npos)
- {
- mName.erase(pos);
- mType = BY_NAME;
- return;
- }
-
- llwarns << "Unable to set mute from display name " << display_name << llendl;
- return;
-}
/* static */
LLMuteList* LLMuteList::getInstance()