Buddy search adjustment
This commit is contained in:
@@ -321,18 +321,21 @@ void LLPanelFriends::filterContacts(const std::string& search_name)
|
||||
refreshNames(LLFriendObserver::ADD);
|
||||
}
|
||||
|
||||
//llinfos << "search_name = " << search_name <<llendl;
|
||||
|
||||
std::vector<LLScrollListItem*> vFriends = mFriendsList->getAllData(); // all of it.
|
||||
for (std::vector<LLScrollListItem*>::iterator itr = vFriends.begin(); itr != vFriends.end(); ++itr)
|
||||
{
|
||||
friend_name = utf8str_tolower((*itr)->getColumn(LIST_FRIEND_NAME)->getValue().asString());
|
||||
BOOL show_entry = (friend_name.find(utf8str_tolower(search_name)) != std::string::npos);
|
||||
|
||||
//llinfos << "friend_name = " << friend_name << (show_entry?" (shown)":"") <<llendl;
|
||||
if (!show_entry)
|
||||
{
|
||||
mFriendsList->deleteItems((*itr)->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
mFriendsList->updateLayout();
|
||||
refreshUI();
|
||||
}
|
||||
else if (search_name == "" && search_name != mLastContactSearch) refreshNames(LLFriendObserver::ADD);
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
name="friends" width="110">
|
||||
Contact Group:
|
||||
</text-->
|
||||
<text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" left_delta="0"
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" left_delta="0"
|
||||
name="friends" width="110">
|
||||
Contact Search:
|
||||
</text>
|
||||
</text-->
|
||||
<!--combo_box allow_text_entry="false" enabled="true" follows="right|top"
|
||||
bottom_delta="20" height="18" hidden="false" left="-255" max_chars="20" mouse_opaque="true"
|
||||
tool_tip="Buddy group" name="buddy_group_combobox" width="130">
|
||||
@@ -40,11 +40,11 @@
|
||||
All
|
||||
</combo_item>
|
||||
</combo_box-->
|
||||
<search_editor bottom_delta="0" enabled="true" follows="right|top" font="SansSerif"
|
||||
height="18" left="-255" name="buddy_search_lineedit"
|
||||
tool_tip="The friend name you want to search for" width="130" />
|
||||
<search_editor bottom_delta="-40" enabled="true" follows="left|top" font="SansSerif"
|
||||
height="18" left_delta="0" name="buddy_search_lineedit" label="Type here to search"
|
||||
tool_tip="The friend name you want to search for" width="160" />
|
||||
<button bottom_delta="-3" follows="top|right" height="22" label="0"
|
||||
left_delta="132" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info"
|
||||
left="-120" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info"
|
||||
width="22" />
|
||||
<pad bottom="-7" height="0" left="-90" width="1" />
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact"
|
||||
|
||||
Reference in New Issue
Block a user