diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-18 10:02:41 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-18 10:02:41 +0000 |
commit | d1f48407056359d8b52c9822127119c3115d99e1 (patch) | |
tree | 5cf2bde4c57d2df26965fe676f74258ebb985440 /indra/newview | |
parent | 21621b4b0e1309b868436cc1a183b47b1aac17a9 (diff) | |
parent | bf668d4a184d52fe520748bbf3f8485380a1c775 (diff) |
PE merge.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 10 |
2 files changed, 32 insertions, 2 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 9b88923e7e..d37bc01885 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -82,7 +82,10 @@ public: virtual ~LLFloaterBuyLandUI(); /*virtual*/ void onClose(bool app_quitting); - + + // Left padding for maturity rating icon. + static const S32 ICON_PAD = 2; + private: class SelectionObserver : public LLParcelObserver { @@ -501,6 +504,25 @@ void LLFloaterBuyLandUI::updateCovenantInfo() { std::string region_name_txt = region->getName() + " ("+rating +")"; region_name->setText(region_name_txt); + + LLIconCtrl* rating_icon = getChild<LLIconCtrl>("rating_icon"); + LLRect rect = rating_icon->getRect(); + S32 icon_left_pad = region_name->getRect().mLeft + region_name->getTextBoundingRect().getWidth() + ICON_PAD; + rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); + + switch(sim_access) + { + case SIM_ACCESS_PG: + rating_icon->setValue(getString("icon_PG")); + break; + + case SIM_ACCESS_ADULT: + rating_icon->setValue(getString("icon_R")); + break; + + default: + rating_icon->setValue(getString("icon_M")); + } } LLTextBox* region_type = getChild<LLTextBox>("region_type_text"); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 83b99f1b27..14bc4376fe 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -51,6 +51,7 @@ #include "llviewermenu.h" #include "llvoiceclient.h" #include "llviewerobjectlist.h" +#include "lltransientfloatermgr.h" // Linden libraries #include "llfloater.h" @@ -71,7 +72,7 @@ class LLFetchAvatarData; // Avatar Inspector, a small information window used when clicking // on avatar names in the 2D UI and in the ambient inspector widget for // the 3D world. -class LLInspectAvatar : public LLInspect +class LLInspectAvatar : public LLInspect, LLTransientFloater { friend class LLFloaterReg; @@ -97,6 +98,8 @@ public: // gear menu is not open /* virtual */ void onMouseLeave(S32 x, S32 y, MASK mask); + virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } + private: // Make network requests for all the data to display in this view. // Used on construction and if avatar id changes. @@ -237,6 +240,9 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) // can't make the properties request until the widgets are constructed // as it might return immediately, so do it in postBuild. + + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this); + LLTransientFloater::init(this); } LLInspectAvatar::~LLInspectAvatar() @@ -245,6 +251,8 @@ LLInspectAvatar::~LLInspectAvatar() // view delete mPropertiesRequest; mPropertiesRequest = NULL; + + LLTransientFloaterMgr::getInstance()->removeControlView(this); } /*virtual*/ |