summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-08-21 19:43:50 +0100
committerCho <cho@lindenlab.com>2014-08-21 19:43:50 +0100
commitda639d1c9817c7333b959638e9a33b6ae7c664c0 (patch)
tree1992142761bc765870da90ed2ef83b9c91ca47f6 /indra
parentd071aeb6f1ff0d98e27e93391f004d6ff947e3b1 (diff)
Show experiences with blank names as (untitled experience) in experience search, script editor, and allowed/trusted/blocked lists for ACME-1585
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelexperiencelisteditor.cpp8
-rw-r--r--indra/newview/llpanelexperiencepicker.cpp9
-rwxr-xr-xindra/newview/llpreviewscript.cpp14
3 files changed, 27 insertions, 4 deletions
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 3561268063..69fc4f458f 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -208,8 +208,14 @@ void LLPanelExperienceListEditor::onExperienceDetails( const LLSD& experience )
LLScrollListItem* item = mItems->getItem(experience[LLExperienceCache::EXPERIENCE_ID]);
if(!item)
return;
+
+ std::string experience_name_string = experience[LLExperienceCache::NAME].asString();
+ if (experience_name_string.empty())
+ {
+ experience_name_string = LLTrans::getString("ExperienceNameUntitled");
+ }
- item->getColumn(0)->setValue(experience[LLExperienceCache::NAME]);
+ item->getColumn(0)->setValue(experience_name_string);
}
LLPanelExperienceListEditor::~LLPanelExperienceListEditor()
diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp
index 7592aaa9d0..b804899e63 100644
--- a/indra/newview/llpanelexperiencepicker.cpp
+++ b/indra/newview/llpanelexperiencepicker.cpp
@@ -41,6 +41,7 @@
#include "llcombobox.h"
#include "llviewercontrol.h"
#include "llfloater.h"
+#include "lltrans.h"
#define BTN_FIND "find"
#define BTN_OK "ok_btn"
@@ -321,6 +322,12 @@ void LLPanelExperiencePicker::filterContent()
if(isExperienceHidden(experience))
continue;
+ std::string experience_name_string = experience[LLExperienceCache::NAME].asString();
+ if (experience_name_string.empty())
+ {
+ experience_name_string = LLTrans::getString("ExperienceNameUntitled");
+ }
+
item["id"]=experience[LLExperienceCache::EXPERIENCE_ID];
LLSD& columns = item["columns"];
columns[0]["column"] = "maturity";
@@ -328,7 +335,7 @@ void LLPanelExperiencePicker::filterContent()
columns[0]["type"]="icon";
columns[0]["halign"]="right";
columns[1]["column"] = "experience_name";
- columns[1]["value"] = columnSpace+experience[LLExperienceCache::NAME].asString();
+ columns[1]["value"] = columnSpace+experience_name_string;
columns[2]["column"] = "owner";
columns[2]["value"] = columnSpace+getString("loading");
search_results->addElement(item);
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index ffaffbe538..17727ef9a1 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1337,7 +1337,12 @@ void LLLiveLSLEditor::buildExperienceList()
}
else
{
- mExperiences->add(experience[LLExperienceCache::NAME].asString(), id, position);
+ std::string experience_name_string = experience[LLExperienceCache::NAME].asString();
+ if (experience_name_string.empty())
+ {
+ experience_name_string = LLTrans::getString("ExperienceNameUntitled");
+ }
+ mExperiences->add(experience_name_string, id, position);
}
}
@@ -1346,7 +1351,12 @@ void LLLiveLSLEditor::buildExperienceList()
const LLSD& experience = LLExperienceCache::get(associated);
if(experience.isDefined())
{
- item=mExperiences->add(experience[LLExperienceCache::NAME].asString(), associated, ADD_TOP);
+ std::string experience_name_string = experience[LLExperienceCache::NAME].asString();
+ if (experience_name_string.empty())
+ {
+ experience_name_string = LLTrans::getString("ExperienceNameUntitled");
+ }
+ item=mExperiences->add(experience_name_string, associated, ADD_TOP);
}
else
{