diff options
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e3a7b749ea..f1380e7a36 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -29,6 +29,7 @@ // libs #include "llavatarname.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llmenubutton.h" #include "llmenugl.h" #include "llnotificationsutil.h" @@ -56,7 +57,6 @@ #include "llinventoryobserver.h" #include "llnetmap.h" #include "llpanelpeoplemenus.h" -#include "llsidetray.h" #include "llsidetraypanelcontainer.h" #include "llrecentpeople.h" #include "llviewercontrol.h" // for gSavedSettings @@ -526,11 +526,11 @@ LLPanelPeople::~LLPanelPeople() LLVoiceClient::getInstance()->removeObserver(this); } - LLView::deleteViewByHandle(mGroupPlusMenuHandle); - LLView::deleteViewByHandle(mNearbyViewSortMenuHandle); - LLView::deleteViewByHandle(mFriendsViewSortMenuHandle); - LLView::deleteViewByHandle(mGroupsViewSortMenuHandle); - LLView::deleteViewByHandle(mRecentViewSortMenuHandle); + if (mGroupPlusMenuHandle.get()) mGroupPlusMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mGroupsViewSortMenuHandle.get()) mGroupsViewSortMenuHandle.get()->die(); + if (mRecentViewSortMenuHandle.get()) mRecentViewSortMenuHandle.get()->die(); } @@ -1162,8 +1162,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked() { // Show add friend wizard. LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE); + if (!picker) + { + return; + } + // Need to disable 'ok' button when friend occurs in selection - if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); + picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); LLFloater* root_floater = gFloaterView->getParentFloater(this); if (root_floater) { @@ -1283,6 +1288,10 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) mAllFriendList->showPermissions(show_permissions); mOnlineFriendList->showPermissions(show_permissions); } + else if (chosen_item == "panel_block_list_sidetray") + { + LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); + } } void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata) @@ -1315,6 +1324,10 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) { setSortOrder(mNearbyList, E_SORT_BY_DISTANCE); } + else if (chosen_item == "panel_block_list_sidetray") + { + LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); + } } bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) @@ -1348,6 +1361,10 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata) { mRecentList->toggleIcons(); } + else if (chosen_item == "panel_block_list_sidetray") + { + LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); + } } bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata) @@ -1439,7 +1456,7 @@ bool LLPanelPeople::notifyChildren(const LLSD& info) container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); } else - LLSideTray::getInstance()->collapseSideBar(); + LLFloaterReg::hideInstance("people"); return true; // this notification is only supposed to be handled by task panels } |