summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 92a8653252..9be2fb12d2 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -330,6 +330,8 @@ LLPanelPeople::~LLPanelPeople()
BOOL LLPanelPeople::postBuild()
{
+ mVisibleSignal.connect(boost::bind(&LLPanelPeople::onVisibilityChange, this, _2));
+
mFilterEditor = getChild<LLFilterEditor>("filter_input");
mFilterEditor->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
@@ -539,7 +541,7 @@ void LLPanelPeople::updateButtons()
}
bool item_selected = selected_id.notNull();
- buttonSetEnabled("teleport_btn", friends_tab_active && item_selected);
+ buttonSetEnabled("teleport_btn", (friends_tab_active || group_tab_active) && item_selected);
buttonSetEnabled("view_profile_btn", item_selected);
buttonSetEnabled("im_btn", item_selected);
buttonSetEnabled("call_btn", item_selected && false); // not implemented yet
@@ -589,9 +591,9 @@ void LLPanelPeople::showGroupMenu(LLMenuGL* menu)
LLMenuGL::showPopup(parent_panel, menu, menu_x, menu_y);
}
-void LLPanelPeople::onVisibilityChange(BOOL new_visibility)
+void LLPanelPeople::onVisibilityChange(const LLSD& new_visibility)
{
- if (new_visibility == FALSE)
+ if (new_visibility.asBoolean() == FALSE)
{
// Don't update anything while we're invisible.
mNearbyListUpdater->setActive(FALSE);
@@ -618,9 +620,9 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
mFilterSubString = search_string;
+ // Searches are case-insensitive
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
- mFilterEditor->setText(mFilterSubString);
// Apply new filter to all tabs.
filterNearbyList();
@@ -771,7 +773,16 @@ void LLPanelPeople::onCallButtonClicked()
void LLPanelPeople::onTeleportButtonClicked()
{
- LLAvatarActions::offerTeleport(getCurrentItemID());
+ std::string cur_tab = mTabContainer->getCurrentPanel()->getName();
+
+ if (cur_tab == FRIENDS_TAB_NAME)
+ {
+ LLAvatarActions::offerTeleport(getCurrentItemID());
+ }
+ else if (cur_tab == GROUP_TAB_NAME)
+ {
+ LLGroupActions::offerTeleport(getCurrentItemID());
+ }
}
void LLPanelPeople::onShareButtonClicked()
@@ -786,22 +797,10 @@ void LLPanelPeople::onMoreButtonClicked()
void LLPanelPeople::onOpen(const LLSD& key)
{
- // Profile View is activated through LLSideTray::showPanel(),
- // hide Profile View to be able to see Panel People content
- hideProfileView();
-
- std::string tab_name = key.asString();
+ std::string tab_name = key["people_panel_tab_name"];
if (!tab_name.empty())
mTabContainer->selectTabByName(tab_name);
else
reSelectedCurrentTab();
}
-void LLPanelPeople::hideProfileView()
-{
- LLView* view = getChildView("panel_profile_view",true,false);
- if(view && view->getVisible())
- {
- view->setVisible(false);
- }
-}