summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-08-20 01:11:27 +0100
committerCho <cho@lindenlab.com>2014-08-20 01:11:27 +0100
commit89eac2548a9b66d8bab27a7e8d7d1ed2159e9515 (patch)
tree3a0c3d830d233331fab1edce5ab72fc9ca0e0a92
parent55ed31173798a7d5a3b7cb42c6d6d552820c5e14 (diff)
Made it possible to search for experiences with an empty search string, and show experiences with blank names as (untitled experience) for ACME-1585
-rwxr-xr-xindra/llui/llurlentry.cpp3
-rw-r--r--indra/newview/llpanelexperiencepicker.cpp4
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml1
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 67da98b95a..be08d92c78 100755
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -1235,7 +1235,8 @@ std::string LLUrlEntryExperienceProfile::getLabel( const std::string &url, const
const LLSD& experience_details = LLExperienceCache::get(experience_id);
if(!experience_details.isUndefined())
{
- return experience_details[LLExperienceCache::NAME].asString();
+ std::string experience_name_string = experience_details[LLExperienceCache::NAME].asString();
+ return experience_name_string.empty() ? LLTrans::getString("ExperienceNameUntitled") : experience_name_string;
}
addObserver(experience_id_string, url, cb);
diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp
index 0a572a8a5c..7592aaa9d0 100644
--- a/indra/newview/llpanelexperiencepicker.cpp
+++ b/indra/newview/llpanelexperiencepicker.cpp
@@ -108,7 +108,7 @@ BOOL LLPanelExperiencePicker::postBuild()
getChild<LLLineEditor>(TEXT_EDIT)->setKeystrokeCallback( boost::bind(&LLPanelExperiencePicker::editKeystroke, this, _1, _2),NULL);
childSetAction(BTN_FIND, boost::bind(&LLPanelExperiencePicker::onBtnFind, this));
- getChildView(BTN_FIND)->setEnabled(FALSE);
+ getChildView(BTN_FIND)->setEnabled(TRUE);
LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>(LIST_RESULTS);
searchresults->setDoubleClickCallback( boost::bind(&LLPanelExperiencePicker::onBtnSelect, this));
@@ -140,7 +140,7 @@ BOOL LLPanelExperiencePicker::postBuild()
void LLPanelExperiencePicker::editKeystroke( class LLLineEditor* caller, void* user_data )
{
- getChildView(BTN_FIND)->setEnabled(caller->getText().size() > 0);
+ getChildView(BTN_FIND)->setEnabled(caller->getText().size() >= 0);
}
void LLPanelExperiencePicker::onBtnFind()
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 72cebb1060..1bf1ee930c 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4028,6 +4028,7 @@ Try enclosing path to the editor with double quotes.
<!-- Experience Tools strings -->
<string name="experience_tools_experience">Experience</string>
<string name="ExperienceNameNull">(no experience)</string>
+ <string name="ExperienceNameUntitled">(untitled experience)</string>
<string name="GRID_WIDE">Grid-wide</string>
<string name="Allowed_Experiences_Tab">ALLOWED</string>
<string name="Blocked_Experiences_Tab">BLOCKED</string>