summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lltabcontainer.cpp3
-rw-r--r--indra/newview/llfloaterbuyland.cpp24
-rw-r--r--indra/newview/llinspectavatar.cpp10
3 files changed, 34 insertions, 3 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index e810b6fe8f..9a715cca0b 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -214,7 +214,8 @@ LLTabContainer::Params::Params()
last_tab("last_tab"),
use_custom_icon_ctrl("use_custom_icon_ctrl", false),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
- use_ellipses("use_ellipses")
+ use_ellipses("use_ellipses"),
+ font_halign("font_halign")
{
name(std::string("tab_container"));
mouse_opaque = false;
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*/