Show 'No results' in Experiences Search for ACME-1313

meow-7.2.2
Cho 2014-04-19 02:56:24 +01:00
parent a58d31f602
commit 54a9087190
1 changed files with 10 additions and 2 deletions

View File

@ -416,8 +416,16 @@ void LLFloaterExperiencePicker::filterContent()
if (search_results->isEmpty())
{
LLStringUtil::format_map_t map;
map["[TEXT]"] = childGetText(TEXT_EDIT);
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("not_found", map));
std::string search_text = childGetText(TEXT_EDIT);
map["[TEXT]"] = search_text;
if (search_text.empty())
{
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("no_results"));
}
else
{
getChild<LLScrollListCtrl>(LIST_RESULTS)->setCommentText(getString("not_found", map));
}
search_results->setEnabled(false);
getChildView(BTN_OK)->setEnabled(false);
getChildView(BTN_PROFILE)->setEnabled(false);