diff options
author | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-05 18:45:18 -0700 |
commit | a8d216e194327c7bee8a42c983f7f2ca01adb385 (patch) | |
tree | 76819d6e78c7e7cf0c5e54d319847f4731c77205 /indra/newview/llpanelpeople.cpp | |
parent | 860a82863966435bea680d8541f051e99a6c226c (diff) | |
parent | 24d146a9ff26af1f3e4cf5af2c5238ca42e2c6c7 (diff) |
Merged in my DEV-35401 "doubleton" fix.
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 35 |
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); - } -} |