diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterfriends.cpp | 13 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterfriends.h | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index 67d9626..e2d3f7c 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp | |||
@@ -429,7 +429,7 @@ struct SortFriendsByID | |||
429 | } | 429 | } |
430 | }; | 430 | }; |
431 | 431 | ||
432 | void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& filter_string) | 432 | void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& search_string) |
433 | { | 433 | { |
434 | LLDynamicArray<LLUUID> selected_ids = getSelectedIDs(); | 434 | LLDynamicArray<LLUUID> selected_ids = getSelectedIDs(); |
435 | S32 pos = mFriendsList->getScrollPos(); | 435 | S32 pos = mFriendsList->getScrollPos(); |
@@ -441,7 +441,7 @@ void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& filter_st | |||
441 | BOOL have_names = TRUE; | 441 | BOOL have_names = TRUE; |
442 | 442 | ||
443 | // I hate doing it this way. There's no need for it. I blame LL -- MC | 443 | // I hate doing it this way. There's no need for it. I blame LL -- MC |
444 | if (filter_string.empty()) | 444 | if (search_string.empty()) |
445 | { | 445 | { |
446 | if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE)) | 446 | if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE)) |
447 | { | 447 | { |
@@ -457,7 +457,8 @@ void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& filter_st | |||
457 | { | 457 | { |
458 | std::string firstname; | 458 | std::string firstname; |
459 | std::string lastname; | 459 | std::string lastname; |
460 | utf8str_tolower(filter_string); | 460 | std::string filter = search_string; |
461 | LLStringUtil::toLower(filter); | ||
461 | LLAvatarTracker::buddy_map_t temp_buddies; | 462 | LLAvatarTracker::buddy_map_t temp_buddies; |
462 | 463 | ||
463 | for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); | 464 | for (LLAvatarTracker::buddy_map_t::reverse_iterator bIt = all_buddies.rbegin(); |
@@ -467,10 +468,10 @@ void LLPanelFriends::refreshNames(U32 changed_mask, const std::string& filter_st | |||
467 | if (gCacheName->getName((*bIt).first, firstname, lastname)) | 468 | if (gCacheName->getName((*bIt).first, firstname, lastname)) |
468 | { | 469 | { |
469 | std::string test_name(firstname + " " + lastname); | 470 | std::string test_name(firstname + " " + lastname); |
470 | if ((utf8str_tolower(test_name)).find(filter_string) != std::string::npos) | 471 | LLStringUtil::toLower(test_name); |
472 | if (test_name.find(filter) != std::string::npos) | ||
471 | { | 473 | { |
472 | llinfos << "inserting: " << test_name << " from filter: " << filter_string << llendl; | 474 | temp_buddies.insert(temp_buddies.begin(), std::pair<LLUUID, LLRelationship*>((*bIt).first, (*bIt).second)); |
473 | temp_buddies.insert(temp_buddies.begin(), *bIt); | ||
474 | } | 475 | } |
475 | } | 476 | } |
476 | } | 477 | } |
diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h index 8206362..d2317b7 100644 --- a/linden/indra/newview/llfloaterfriends.h +++ b/linden/indra/newview/llfloaterfriends.h | |||
@@ -100,7 +100,7 @@ private: | |||
100 | 100 | ||
101 | // protected members | 101 | // protected members |
102 | typedef std::map<LLUUID, S32> rights_map_t; | 102 | typedef std::map<LLUUID, S32> rights_map_t; |
103 | void refreshNames(U32 changed_mask, const std::string& filter_string); | 103 | void refreshNames(U32 changed_mask, const std::string& search_string); |
104 | void filterContacts(const std::string& search_string); | 104 | void filterContacts(const std::string& search_string); |
105 | 105 | ||
106 | BOOL refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies); | 106 | BOOL refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies); |