diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-12-07 15:05:57 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-12-07 15:05:57 -0500 |
commit | 3c00c1ba4590e758f84f5c97f2d407aa7e605ad8 (patch) | |
tree | 0d6771596b57ecf87f2504066543b56bbcf65d80 /indra/newview/llpanelpicks.cpp | |
parent | efe65d90e027e4385c97d76244844fa8660dc7ce (diff) | |
parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) |
merge viewer-development into web-profiles
Diffstat (limited to 'indra/newview/llpanelpicks.cpp')
-rwxr-xr-x | indra/newview/llpanelpicks.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 9fc31305ca..597ecc0589 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -335,7 +335,8 @@ void LLPanelPicks::updateData() mNoPicks = false; mNoClassifieds = false; - getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("PicksClassifiedsLoadingText")); + mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText")); + mNoItemsLabel->setVisible(TRUE); mPicksList->clear(); LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId()); @@ -352,9 +353,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) LLAvatarPicks* avatar_picks = static_cast<LLAvatarPicks*>(data); if(avatar_picks && getAvatarId() == avatar_picks->target_id) { - std::string name, second_name; - gCacheName->getName(getAvatarId(),name,second_name); - getChild<LLUICtrl>("pick_title")->setTextArg("[NAME]", name); + std::string full_name; + gCacheName->getFullName(getAvatarId(), full_name); + getChild<LLUICtrl>("pick_title")->setTextArg("[NAME]", full_name); // Save selection, to be able to edit same item after saving changes. See EXT-3023. LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID]; @@ -440,15 +441,17 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) mNoClassifieds = !mClassifiedsList->size(); } - if (mNoPicks && mNoClassifieds) + bool no_data = mNoPicks && mNoClassifieds; + mNoItemsLabel->setVisible(no_data); + if (no_data) { if(getAvatarId() == gAgentID) { - getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoPicksClassifiedsText")); + mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText")); } else { - getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText")); + mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText")); } } } @@ -485,6 +488,8 @@ BOOL LLPanelPicks::postBuild() mPicksList->setNoItemsCommentText(getString("no_picks")); mClassifiedsList->setNoItemsCommentText(getString("no_classifieds")); + mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text"); + childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickPlusBtn, this)); childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this)); childSetAction(XML_BTN_TELEPORT, boost::bind(&LLPanelPicks::onClickTeleport, this)); @@ -914,7 +919,7 @@ void LLPanelPicks::showAccordion(const std::string& name, bool show) void LLPanelPicks::onPanelPickClose(LLPanel* panel) { - panel->setVisible(FALSE); + getProfilePanel()->closePanel(panel); } void LLPanelPicks::onPanelPickSave(LLPanel* panel) |