diff options
author | elektrahesse | 2010-09-25 19:24:23 +0200 |
---|---|---|
committer | elektrahesse | 2010-09-25 19:24:23 +0200 |
commit | d2819a498a3167af490de549a3d22371ece3c2a3 (patch) | |
tree | f2bd483cc415eea4b3bf46d818b1cc2665973df3 /linden/indra | |
parent | Fixed Windows compile bug in 721c25d8. Changed std::max to llmax since Window... (diff) | |
download | meta-impy-d2819a498a3167af490de549a3d22371ece3c2a3.zip meta-impy-d2819a498a3167af490de549a3d22371ece3c2a3.tar.gz meta-impy-d2819a498a3167af490de549a3d22371ece3c2a3.tar.bz2 meta-impy-d2819a498a3167af490de549a3d22371ece3c2a3.tar.xz |
Changes the search system, so it matches the keyword against name or surname initials.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llfloaterfriends.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 | |||
464 | for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); | 464 | for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); |
465 | bIt != all_buddies.rend(); ++bIt) | 465 | bIt != all_buddies.rend(); ++bIt) |
466 | { | 466 | { |
467 | llinfos << (*bIt).first << llendl; | ||
468 | if (gCacheName->getName((*bIt).first, firstname, lastname)) | 467 | if (gCacheName->getName((*bIt).first, firstname, lastname)) |
469 | { | 468 | { |
470 | std::string test_name(firstname + " " + lastname); | 469 | std::string l_name(firstname); |
471 | LLStringUtil::toLower(test_name); | 470 | LLStringUtil::toLower(l_name); |
472 | if (test_name.find(filter) != std::string::npos) | 471 | std::string l_sname(lastname); |
472 | LLStringUtil::toLower(l_sname); | ||
473 | if (l_name.find(filter) == 0 || l_sname.find(filter) == 0) | ||
473 | { | 474 | { |
474 | temp_buddies.insert(temp_buddies.begin(), std::pair<LLUUID, LLRelationship*>((*bIt).first, (*bIt).second)); | 475 | temp_buddies.insert(temp_buddies.begin(), std::pair<LLUUID, LLRelationship*>((*bIt).first, (*bIt).second)); |
475 | } | 476 | } |