From d2819a498a3167af490de549a3d22371ece3c2a3 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Sat, 25 Sep 2010 19:24:23 +0200 Subject: Changes the search system, so it matches the keyword against name or surname initials. --- linden/indra/newview/llfloaterfriends.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index e2d3f7c..c33deae 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp @@ -464,12 +464,13 @@ void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& search_st for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); bIt != all_buddies.rend(); ++bIt) { - llinfos << (*bIt).first << llendl; if (gCacheName->getName((*bIt).first, firstname, lastname)) { - std::string test_name(firstname + " " + lastname); - LLStringUtil::toLower(test_name); - if (test_name.find(filter) != std::string::npos) + std::string l_name(firstname); + LLStringUtil::toLower(l_name); + std::string l_sname(lastname); + LLStringUtil::toLower(l_sname); + if (l_name.find(filter) == 0 || l_sname.find(filter) == 0) { temp_buddies.insert(temp_buddies.begin(), std::pair((*bIt).first, (*bIt).second)); } -- cgit v1.1